JavaScript - How To Pass Dynamic Variable To Another Div With Onclick?
Hello, I am trying to access a dynamic asp variable with onclick either in a javascript function where I can use it globally or set another div id with this dynamic variable.
Any help is very much appreciated. Thank you! <script> function doSomething(article_id) } return article_id; } </script> <a href="#test" onClick="doSomething("<%=rsHeadline("article_id")%>")">try here...</a> <div id="test"> <%articleid = request.querystring("article_id") %> <% Response.Write articleid %> The article id is articleid</div> Similar Tutorialsnot sure what section to post this in, basically i have html in a javascript function that i want to pass into a php. here is some of my javascript code Code: var names = document.getElementById('names').value; var nms = names.split(";;") for (i=0; i<las.length; i++) { var contentString = [ '<div id="tab-1">', '<p><h1>'+nms[i]+'</h1></p>', '</div>' +'<form action="index.php" method="post" enctype="multipart/form-data">'+ '<input id="delbutton" name="delbutton" type="submit" value="Delete">',+'</form>' } then when the button gets pressed it goes to Code: if(isset($_POST['delbutton'])=='Delete') { echo("into the php delete: " . $_POST['name2'] . "<br />\n"); echo '<pre>' . print_r($_POST,true) . '</pre>'; } basically i want to be able to access the value of nms[i] in the php call. i am able to pass anything in <input> tags like normal html, but i want to get nms[i] to go through what should i do? Hi folks, I'm frustrated . I've been trying to get this single piece of code to work. I've looked at quite a few sources out there, but everything I try fails. My site uses AJAX to upload a file, and once complete I dynamically add the file name, size, description, etc to a table. I have a javascript method that will allow me to download the file once uploaded - and I put an onclick event into some of the TDs in the row I added. (Note: I didn't want to put it in the TR because I also have a delete button in the row). I've tried Code: 1. cell1.onclick = 'javascript:downloadAttachmentFile('+attachID+');'; 2. cell1["onclick"] = new Function("downloadAttachmentFile('+attachID+')"); 3. cell3.setAttribute('onclick','javascript:downloadAttachmentFile('+attachID+');'); but none seem to work!! I know the function is ok because the files that are already on the page work correctly, meaning it's only the dynamically created rows that are having the issues. Code: function addNewTableRow(fileTable, fileTitle, fileName) { var table = getMyElement(fileTable); var rowCount = table.rows.length; var row = table.insertRow(rowCount); var cell0 = row.insertCell(0); cell0.width = 25; cell0.className = "tblTicketFilesWhite"; cell0["onclick"] = new Function("downloadAttachmentFile('+attachID+')"); } Hi!! I am trying to find out solution for this since long. I tried js but as I am not good with it, I just want to do this through PHP. I am adding dynamic rows when user clicks the Add Row button.I want to show the calculated amount like: line_total=qty*unit_price; PHP Code: if (isset($_POST['qty']) && sizeof($_POST['qty']) > 0) { for($i = 0, $maxi = count($_POST['qty']); $i < $maxi; $i++) { $quantity = (isset($_POST['qty'][$i]) && !empty($_POST['qty'][$i])) ? mysql_real_escape_string($_POST['qty'][$i]) : 0; $description = (isset($_POST['description'][$i]) && !empty($_POST['description'][$i])) ? mysql_real_escape_string($_POST['description'][$i]) : 0; $unit_price = (isset($_POST['unit_price'][$i]) && !empty($_POST['unit_price'][$i])) ? mysql_real_escape_string($_POST['unit_price'][$i]) : 0; $line_total = (isset($_POST['line_total'][$i]) && !empty($_POST['line_total'][$i])) ? mysql_real_escape_string($_POST['line_total'][$i]) : 0; ?> <?php $myvar=$quantity*$unit_price; ?> <script type="text/javascript"> jsvar = <?php echo $myvar; ?>; document.write(jsvar); // Test to see if its prints array: </script> } } This code works very well and displays the values.But if I use it in the function like; PHP Code: function line(elem) { jsvar = <?php echo $myvar; ?>; document.getElementById("line_total").value = jsvar; } And call it: PHP Code: <input type="text" name="line_total[]" id="line_total" onBlur="return line(this)"> It is not showing the result. Kindly guide me where I am going wrong? This is my function to add rows: PHP Code: <script type="text/javascript"> function addRow(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; if(rowCount<3) { var row = table.insertRow(rowCount); var colCount = table.rows[0].cells.length; for(var i=0; i<colCount; i++) { var newcell = row.insertCell(i); newcell.innerHTML = table.rows[0].cells[i].innerHTML; //alert(newcell.childNodes); switch(newcell.childNodes[0].type) { case "text": newcell.childNodes[0].value = ""; break; case "checkbox": newcell.childNodes[0].checked = false; break; case "select-one": newcell.childNodes[0].selectedIndex = 0; break; } } } else { alert("Maximum Limit Of 3 Rows Reached"); } } </script> Please help me Hi all, I need to pass a variable to an inner function and I got it to work but: (1) I don't know why it works (2) I don't know if it's right or optimal So, please look and comment: Code: for (var h = 1.0; h <= 3.0; h += 0.5) { ed.settings.formats['spacing' + String(h.toFixed(1))] = { 'block' : 'p', 'styles' : { 'marginBottom' : String((h - 1).toFixed(1)) + 'em' } } h = (function (h) { c.onRenderMenu.add(function (c, m) { m.add({ 'title': String(h.toFixed(1)), 'caption' : 'Set the line spacing to ' + String(h.toFixed(1)), 'onclick': function () { ed.formatter.apply('spacing' + this.title); return false; } }).setDisabled(false); }); return h; })(h); }; You can ignore a lot of the code as it doesn't factor into the question... and I know that re-ordering the code can eliminate my problem (but I can't re-order it because defining the formats MUST come before "renderMenu" or else it doesn't work - and I don't want to use two loops - one to define the formats and another to define the menu). The part that's freaking me out is this: Code: h = (function (h) { c.onRenderMenu.add(function (c, m) { m.add({ 'title': String(h.toFixed(1)), 'caption' : 'Set the line spacing to ' + String(h.toFixed(1)), 'onclick': function () { ed.formatter.apply('spacing' + this.title); return false; } }).setDisabled(false); }); return h; })(h); See the strange things I have to do to get h inside of c.onRenderMenu.add()? Is this right? Can I do it any "better" or more correctly? Thanks! -- Roger I'm trying to echo a php variable to my javascript function but nothing is happening Basically this php page displays bunch of records with a radio button next to each record. So when the radio button is clicked it would open that record in a new window that is clicked. Code: <input type='radio' name='option' value='$ctr' id='$ctr' onClick="edit_record('<?php echo $ctr ?>')"> <script type="text/javascript"> function edit_record(){ var value = arguements[0]; alert("record id: " + value); window.open("Edit.php", "Edit Record", "status=1, height=400, width=900, resizable=0"); } i am trying to pass the a variable "oneone" from a select box to a php page via java script. this is my html Code: <div id="wrapper"> <div id="content"> <form> Select a Customer: <select id="oneone" name="oneone" value=""> <option value="s_last">last</option> <option value="s_first ">first</option> <option value="c_city">cirty</option> </select> </form> <div> <form method="get" action="" class="asholder"> <small style="float:right">Hidden ID Field: <input type="text" id="testid" value="" style="font-size: 10px; width: 20px;" disabled="disabled" /></small> <label for="testinput">Person</label> <input style="width: 200px" type="text" id="testinput" value="" /> <input type="submit" value="submit" /> </form> </div> </div> this is my javascript Code: <script type="text/javascript"> var options = { script:"test.php?json=true&limit=6&", varname:"input", json:true, shownoresults:false, maxresults:6, callback: function (obj) { document.getElementById('testid').value = obj.id; } }; var as_json = new bsn.AutoSuggest('testinput', options); var optionsa = { script:"test.php?", varname:"one", json:false }; var as_jsona = new bsn.AutoSuggest('oneone', optionsa); </script> and the little part of my php Code: $input =$_GET['input']; $q =$_GET["one"]; can someone PLEASE tell my why i cant get this to work!!! I'm trying to overcome one feat, and I've just ran the course of my little knowledge of javascript. Here is the code that concerns us. Code: function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { populateParentWindow(xmlhttp.responseText); } } xmlhttp.open("GET","https://www.syncupsolutions.net/currentdirectory-<?php echo $_COOKIE['User'] ?>.txt",true); xmlhttp.send(); } function populateParentWindow(Directory) { $("#FTPContents").load('functions/testftp.php?HASH=' + Get_Cookie("ftphash") + "&reload=" + Directory) ; }; $(function(){ $('#swfupload-control').swfupload({ upload_url: 'functions/upload-file.php?UID=' + Get_Cookie("User"), file_post_name: 'uploadfile', file_size_limit : "10000", file_types : "*.*", file_types_description : "All Files", file_upload_limit : 5, flash_url : "functions/js/swfupload/swfupload.swf", button_image_url : 'functions/js/swfupload/wdp_buttons_upload_114x29.png', button_width : 114, button_height : 29, button_placeholder : $('#button')[0], debug: false }) .bind('fileQueued', function(event, file){ var listitem='<li id="'+file.id+'" >'+ 'File: <em>'+file.name+'</em> ('+Math.round(file.size/1024)+' KB) <span class="progressvalue" ></span>'+ '<div class="progressbar" ><div class="progress" ></div></div>'+ '<p class="status" >Pending</p>'+ '<span class="cancel" > </span>'+ '</li>'; $('#log').append(listitem); $('li#'+file.id+' .cancel').bind('click', function(){ var swfu = $.swfupload.getInstance('#swfupload-control'); swfu.cancelUpload(file.id); $('li#'+file.id).slideUp('fast'); }); // start the upload since it's queued $(this).swfupload('startUpload'); }) .bind('fileQueueError', function(event, file, errorCode, message){ alert('Size of the file '+file.name+' is greater than limit'); }) .bind('fileDialogComplete', function(event, numFilesSelected, numFilesQueued){ $('#queuestatus').text('Files Selected: '+numFilesSelected+' / Queued Files: '+numFilesQueued); }) .bind('uploadStart', function(event, file){ $('#log li#'+file.id).find('p.status').text('Uploading...'); $('#log li#'+file.id).find('span.progressvalue').text('0%'); $('#log li#'+file.id).find('span.cancel').show(); }) .bind('uploadProgress', function(event, file, bytesLoaded){ //Show Progress var percentage=Math.round((bytesLoaded/file.size)*100); $('#log li#'+file.id).find('div.progress').css('width', percentage+'%'); $('#log li#'+file.id).find('span.progressvalue').text(percentage+'%'); }) .bind('uploadSuccess', function(event, file, serverData){ var item=$('#log li#'+file.id); item.find('div.progress').css('width', '100%'); item.find('span.progressvalue').text('100%'); var pathtofile='<a href="uploads/'+file.name+'" rel="nofollow" target="_blank" >view »</a>'; item.addClass('success').find('p.status').html('Done!!! | '+pathtofile); }) .bind('uploadComplete', function(event, file){ // upload has completed, try the next one in the queue $(this).swfupload('startUpload'); loadXMLDoc(); }) You'll notice at the beginning, the functino loadXMLDoc. This function GETS the contents of a text file, which is the path to the directory the user is browsing. The next function is populateParentWindow. This is the function that dynamically updates the div that displays the files and folders of the current directory so they can see their file has been uploaded. Scroll down a little further and you'll see my problem. Code: $(function(){ $('#swfupload-control').swfupload({ upload_url: 'functions/upload-file.php?UID=' + Get_Cookie("User"), At the bottom of the above line, the : upload_url, I need it to contain the contents of the text file also, but in a POST value, like the UID, something like, directory=thedirectory. But, when I try Code: $(function(){ $('#swfupload-control').swfupload({ upload_url: 'functions/upload-file.php?UID=' + Get_Cookie("User") + "&directory=" + xmlhttp.responseText, It gives me an undefined, right off the bat before any uploading, or anything at all takes place. I'm guessing this is because this value is set on page load, and not before the actual upload actually happens. Does anyone have any ideas how I can set this value when the upload begins with the variable from the text file ? Keep in mind it has to be inside the function it's in now or it wont work. Note that the loadXMLDocument function isn't called until the upload is complete, the .bind at the bottom of the page. I've tried pulling it from the text file several ways, setting the document.title to the current directory and calling it in the function, it just always seems a step behind me or undefined. Any ideas ? Hey I have a JS value but it won't put the value in the brackets when i try to get the element by ID instead it is looking for the id named the same as the variable name. Here is what i got to explain better: Code: function fill_div(v) { document.getElementById(v).innerHTML="<img src='untitle.png' style='width:100%;height:100%;'/>"; } var x = 0; var y = 3; var area = 1; window.onload = fill_div(area+':'+x+':'+y); It ends up looking for id v instead of id 1:0:3. Any idea how i correct this ? Hello. I am very new at using javascript and jquery. Right now Im working on a website, and it has a hierarchical menu in the right and im also doing some content loading in a div, all that with javascript. My problem is that when they click on a link, I need to pass a variable "id" through the link. I dont want to pass it in the url, but I want to pass it in another way, for every link the id is going to be different. How can I pass a variable to another page and how can I retrieve it in that page so I can use it for the content loading? Thanks! I've avoided cookies for 12 years. I made my first cookie today: Code: <p><a href="projects.html" onclick="document.cookie='whichPic=8'">Set Cookie</a></p> I have an external javascript sheet with an array of images w/text and the following code: Code: var current = 0; function update() { var pic = slides[current]; document.getElementById('proj_title').innerHTML = pic.title; document.getElementById('proj_image').src = "images/slides/" + pic.image; document.getElementById('proj_location').innerHTML = "<span>Location:</span> " + pic.location; document.getElementById('proj_operation').innerHTML = "<span>Commercial Operation:</span> " + pic.commercial_operation; document.getElementById('counter').innerHTML = (current + 1) + " of " + slides.length; if(pic.link) { document.getElementById('proj_link').style.display = "block"; document.getElementById('proj_href').href = pic.link; } else { document.getElementById('proj_link').style.display = "none"; } } When the user clicks the link, it should open the page to the slideshow and it should start on slide[8]. I think what I need to do is pass the value of the cookie to the variable "current", but I don't know how to do that. Also, I only need the cookie to last long enough for the new page to load (about 20 seconds), but all of the cookie scripts I've found set expiration in days. Any guidance would be appreciated. Hi folks, Any suggestions on how you might achieve the following without using eval()? I've come up a bit short Code: function addOrSubtract(operator) { var a = 10; var b = 5; var answer = eval(a + operator + b); alert(answer); } addOrSubtract('+') // alerts 15 addOrSubtract('-') // alerts 5 Would help me tidy up some code a lot thanks. hi guys! i have a problem in passing the variable to function ,the variable which is used in<td> as table data. Code: <td onmouseover="todayevent(somevarible);" onmouseout="hideevent(somevarible);" >' + somevarible+ '</td> i want to pass somevariable by function todayevent(). how can i do this. plz help me someone. Here's something that I tested without the PHP and it worked ok. Now that I've introduced the PHP to the document it doesn't work. The PHP variable is not passing to Javascript properly. By use of some cleverly placed alert boxes, I figured out that the only thing that is getting passed forward is something called : "object HTML ImageElement" Specifically, I assign the element ID the unique ID number of the record in the SQL database. The problem isn't with the ID numbers themselves: They are alphanumeric and unique. I think it boils down to one of two lines of code. Either this isn't working (about line 12) Code: function expander(RecordID){ or perhaps it is when I am calling the function (about line 66): Code: echo "<img id='".$row['IDNumber']."' src=".$row['ImagePath']." width='5%' onMouseOver='expander(".$row['IDNumber'].");' onMouseOut='shrinker(".$row['IDNumber'].");'>";} The PHP works (I can get the images to appear, so the connection to SQL and such isn't a problem). I am sure most of the JavaScript is good, too, as I said I had it all working prior to dropping in the PHP. Since I am not going from JavaScript to PHP I don't think I need AJAX. I just need the PHP to pass to JavaScript. Any ideas? Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="class.css" /> <script type = "text/javascript" language="javascript"> //<![CDATA[ var maxheight = 150; var countShrink = 1; function expander(RecordID){ var countGrow = 1; var pic = document.getElementById(RecordID); if(pic){ var imageh = pic.height; var imagew = pic.width; if(imageh<100){ countGrow++; imageh = imageh*1.2; imagew = imagew*1.2; pic.style.height = imageh + "px"; pic.style.width = imagew + "px"; var timer = window.setTimeout(function(){expander(RecordID);},2);} } else {alert("error on");} } function shrinker(RecordID){ var pic = document.getElementById(RecordID); if(pic){var counter = 1 var imageh = pic.height; var imagew = pic.width; if(imageh>20){ imageh = imageh/1.2; imagew = imagew/1.2; pic.style.height = imageh + "px"; pic.style.width = imagew + "px"; var timer = window.setTimeout(function(){shrinker(RecordID);},3);} } else {alert("error off");} } //]]> </script> </head> <body> <?php include('menuSub.html'); require_once('connect.php'); $idnum = 'phmdv06tbu'; //$q="SELECT * FROM art WHERE IDNumber = '".$idnum."'"; $q="SELECT * FROM art ORDER BY IDNumber LIMIT 4"; $r = @mysqli_query ($dbc, $q); echo "<div class='bodyContent'><div class='imageContent'>"; if($r){ while ($row = mysqli_fetch_array($r,MYSQLI_ASSOC)){ echo "<img id='".$row['IDNumber']."' src=".$row['ImagePath']." width='5%' onMouseOver='expander(".$row['IDNumber'].");' onMouseOut='shrinker(".$row['IDNumber'].");'>";} } else{ echo '<div class="bodyContent"> Error<div>'; } echo "</div></div>"; mysqli_close($dbc); ?> </body> </html> Hello all I have a big problem I have my php like this Code: <? $codid=$_GET["cid"]; echo " <script> setTimeout(function() {CSelect();}, 100) ; </script> <div id=\"ReloadThis\"></div>"; ?> And my js funtion Code: function CSelect() { var $http, $self = arguments.callee; if (window.XMLHttpRequest) { $http = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { $http = new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) { $http = new ActiveXObject('Microsoft.XMLHTTP'); } } if ($http) { $http.onreadystatechange = function() { if (/4|^complete$/.test($http.readyState)) { document.getElementById('ReloadThis').innerHTML = $http.responseText; setTimeout(function(){$self();}, 10); } }; $http.open('GET', 'linii_c/select.php'+'?cod='+' PHP VARIABLE ', true); $http.send(null); } } who i can put my php variable into the funtion? Thanx in advence and sorry for my bad english! I'd like to place an AJAX call to load another SELECT menu in my form, and I'm having trouble finding a tutorial. Can someone point me to a good tute, or provide some guidance/examples here? For your Copying/Pasting pleasure , here's an example button for which I'd include the onclick(): Code: <button type="button" >Add</button> And here's an example SELECT menu: Code: <select id="idNumber" name="weekday_1['workPeriod_new'][] > <option value="1" >one</option> <option value="2" >2</option> </select> Thanks-a-bunch, ~ Mo NOTE: Overall, I'm pretty green in JS. Hi All I have this basic auto complete JavaScript that works well, but you need to hard code the web page. What I'm trying to do is send the "Autocomplete" variable data to the page using a perl script the working JavaScript code looks like this: var CustomArray=new Array('an apple','alligator','elephant','pear','kingbird','kingbolt','kingcraft','kingcup','kingdom','kingfish er','kingpin','SML'); Now the new code is: var CustomArray=new Array(Autocomplete); And the Perl script is sending back the data to the browser looking like this: var Autocomplete = 'an apple','alligator','elephant','pear','kingbird','kingbolt','kingcraft','kingcup','kingdom','kingfish er','kingpin','SML' I cant seem to get it to work rite full HTML code is below any help is appreciated. HTML: <html> <head> <script language="javascript" type="text/javascript" src="http://www.comicinvasion.com/Code/Java/Autocomplete/Autocomplete.js"></script> <script language="javascript" type="text/javascript" src="http://www.comicinvasion.com/Code/Java/Autocomplete/Common.js"></script> <script language="JavaScript1.2" type="text/javascript" src="http://www.ComicInvasion.com/cgi-bin/Autocomplete.pl"></script> <script> var CustomArray=new Array(Autocomplete); </script> </head> <body> <input type='text' style='font-family:verdana;width:300px;font-size:12px' id='ACMP' value=''/> <script> var obj = actb(document.getElementById('ACOMP'),CustomArray); </script> </body> </html> hi guyz i do have a problem in passing javascript variable to <input type=hidden value=""> here's my code: <?php while ($row = mysql_fetch_array($result)) { ?> <script type="text/javascript"> function viewcodec(){ var randomValueCodec = randomString(5, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'); document.getElementById('commentMarkCodeCompCodec-'+<?php echo $row['p_id'];?>).innerHTML = randomValueCodec; document.getElementById('commentMarkCodeComp-'+<?php echo $row['p_id'];?>).innerHTML = randomValueCodec; } </script> <form action="" method="post" name="postsForms"> <div class="commentBox" align="right" id="commentBox-<?php echo $row['p_id'];?>" <?php echo (($comment_num_row) ? '' :'style="display:none"')?>> <input type=text id="commentMarkname-<?php echo $row['p_id'];?>" name="commentmarkname" class="commentMarkname" size="35" maxlength="20"> <textarea class="commentMark" id="commentMark-<?php echo $row['p_id'];?>" name="commentmark" cols="60"></textarea> <input type=text id="commentMarkcode-<?php echo $row['p_id'];?>" name="commentmarkcode" class="commentMarkcode" size="35" maxlength="20"> <br clear="all" /> <span id='commentMarkCodeCompCodec-<?php echo $row['p_id'];?>'><b><script type="text/javascript">viewcodec();</script></b></span> <input type="hidden" id="commentMarkCodeComp-<?php echo $row['p_id'];?>" name="commentMarkCodeComp" value=""> <br clear="all" /> <br clear="all" /> <a id="SubmitComment" style="float:right" class="small button comment"> Comment</a> </div> </form> <?php } ?> How to: pass local variable from <head> JS function to <body> textarea I have a JS function in the head that calculates a variable. the function is triggered by the vevent of a button click. when calculation is done, how is it sent back to the page and placed in a textarea or textbox....?? /Beginner issues :/ I am trying to use an onclick statement to go to an alternate web page displaying a different version of tha file being displayed in the current page. In the HEAD section of the current page I have a global variable named currentfile that contains a file name. This function is also in the HEAD section immediately below the variable's declaration Code: function altlink() { gotolink = "http://www.mydomain.com/testpage.htm?alt=" + currentfile; return gotolink } I have tried every combination I can think of in the onclick code to get it to work but, no joy. here is an example: Code: <a href="#" onClick=altlink(); return false; <img src="change.png" width="47" height="30"></a> If anyone here can sort me out I'd really appreciate it. I just can't get the next page to load. So ill try best to describe what im doing, I grab information from a database and it displays with its model number and a value. I use that value to put into a URL so it will go to the database and delete that values entry. It works excpet it ALWAYS grabs the last value(aka the last entry). So i need it to grab what ive selected rather than the last value. Any help will be great! Code: <form name="addswitchtype" id="addswitchtype" action="<?php echo $this->url('system/switch_management/newtype'); ?>" method="POST"> <h4>Update Switch Model Information</h4> <table> <select name"switchtypeid" id="switchtypeid"> <option value="">New</option> <?php foreach($this->switchtype as $switch_type): ?> <option value"<?php echo $switch_type->switchtypeid; ?>"><?php echo $switch_type->switchmodel; ?></option> <?php endforeach; ?> </select> </table> <div id="switchtype-data" style="padding-top: 10px;"></div> <input type="submit" name="submit" value="Add Switch Type" /> <input type="button" value="Delete Switch" onclick="javascrip:document.location.href='<?php echo $this->url('system/switch_management/building/switch/' . $switch_type->switchtypeid . '/deletetype'); ?>'" /> <tr> </form> |