JavaScript - Help With Html Table Problem (button Issue)
I need some help making a button function do what I want it to do. I have a index page that shows all my projects in a table with tabs you can click on that shows certain parts of all projects (ie tab for finance, project title). For now, every single project is shown on the website when you bring up the index page. Also the top part of the page, where I have the issue, there is a drop down list of all the projects with a "GO" button next to it. I want a user to be able to scroll down that list and click the button and the page would only show that particular project, ie choosing the tabs to go back and forth dealing with the one project only. The tabs are each its own .php file with the exact coding in all of them. Here is what I have on my index page that I need help on in order to make this button work. Any help will be appreciated. My main issue is this coding
Code: <input type="button" value="GO" name="proj_list" /> But here is the whole index page Code: <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>2009 Events</title> <link rel="stylesheet" type="text/css" href="../css/dddropdownpanel.css" /> <link rel="stylesheet" type="text/css" href="../css/sortable.css" /> <link rel="stylesheet" type="text/css" href="../css/datepicker.css" /> <link rel="stylesheet" type="text/css" href="../css/main.css" /> <link rel="stylesheet" type="text/css" href="../css/chromestyle.css" /> <link rel="stylesheet" type="text/css" href="../css/ajaxtabs.css" /> <script type="text/javascript" src="../includes/datepicker.js"></script> <script language="javascript" src="../includes/tablesort.js"></script> <script language="javascript" src="../includes/tableActions.js"></script> <script language="javascript" src="../includes/chrome.js"></script> <script language="javascript" src="../includes/ajaxtabs.js"></script> </head> <body> <div id="container"> <div id="header"> <?php include("../header.php"); ?> </div> <div id="navbar2"> <?php include("../menu.php"); ?> </div> <div id="content"> <div id="breadcrumb"> <script language="javascript" src="../includes/breadcrumbs.js"></script> </div> <?php // If the user wants to add a project if (isset($addproject)): else: $dbcnx = @mysql_connect("xxxxx", "xxxxxx", "xxxxxxxx"); if (!$dbcnx) { echo( "<P>Unable to connect to the xxxxxxxxx" . "database server at this time.</P>" ); exit(); } mysql_select_db("techweb", $dbcnx); if (! @mysql_select_db("techweb") ) { echo( "<P>Unable to connect to the xxxxxxx" . "database at this time.</P>" ); exit(); } // If a project has been submitted, // add it to the database. if ("SUBMIT" == $proj_submit) { $sql = "INSERT INTO projects SET " . "proj_priority='$priority', " . "proj_title='$title', " . "proj_bdlead='$bdlead', " . "proj_englead='$englead', " . "proj_objective='$objective', " . "proj_capability='$capability', " . "proj_approach='$approach', " . "proj_venue='$venue', " . "proj_tradeshow='$tradeshow', " . "proj_funding='$funding', " . "proj_src-ds='$src-ds', " . "proj_src-cap='$src-cap', " . "proj_src-irad='$src-irad', " . "proj_status='$status', " ; if (mysql_query($sql)) { echo("<P>Your project has been added.</P>"); } else { echo("<P>Error adding submitted project: " . mysql_error() . "</P>"); } } echo("<h1 style='text-align:left'> 2009 Projects </h1>"); // Request the text of all the projects $result = mysql_query( "SELECT * FROM projects"); if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit(); } ?> <form id="projects" method="post" action="project.php"> <select id="project_list" name="proj_list"> <optgroup label="projects"> <?php // Display the details of each event in a table while ( $option = mysql_fetch_array($result) ) { echo("<option label=" . $option["proj_title"] . "value=" . $option["ID"] . ">" . $option["proj_title"] . "</option>"); } ?> </optgroup> </select> <input type="button" value="GO" name="proj_list" /> <? endif; ?> <div id="tabcontainer"> <ul id='tabs' class='shadetabs'> <?php // Populate tabs with data related to the selected project echo ("<li><a href='project.php' rel='container' class='selected'>Project</a></li>"); echo ("<li><a href='capability.php' rel='container'>Demo Capability</a></li>"); echo ("<li><a href='approach.php' rel='container'>Approach</a></li>"); echo ("<li><a href='venue.php' rel='container'>Venue/Trade Shows</a></li>"); echo ("<li><a href='financials.php' rel='container'>Financials</a></li>"); ?> </ul> <!-- <ul id='tabs' class='shadetabs'> <li><a href='project.php' rel='container' class='selected'>Project</a></li> <li><a href='capability.php' rel='container'>Demo Capability</a></li> <li><a href='approach.php' rel='container'>Approach</a></li> <li><a href='venue.php' rel='container'>Venue/Trade Shows</a></li> <li><a href='financials.php' rel='container'>Financials</a></li> </ul> --> <div id="divcontainer" style="border:1px solid gray; width:600px; margin-bottom: 1em; padding: 5px"> <p>Please select a project using the drop-down menu above. Use the tabs to view information about the selected project.</p> </div> <script type="text/javascript"> var countries=new ddajaxtabs("tabs", "divcontainer") countries.setpersist(true) countries.setselectedClassTarget("link") //"link" or "linkparent" countries.init() </script> </div> Similar TutorialsI have a table with tabs on it that calls different php files once the tab is clicked and on top of the table I have a drop list and a button. the whole table has 5 tabs and in there are 15 unique id with information on each tab that the table show when you click on the tab. The drop down list is a selection that you choose from of each of the 15 unique IDs. Once you choose one then click the button you should then only see that specific information about that particular id. (It can be in the table where you click each tab or all of it on one page I dont care.) So I need to get this button to work. I am very unfamiliar with buttons (thats why I am posting this) and I hope someone can help me Code: <form id="projects" method="post" action="project.php"> <select id="project_list" name="proj_list"> <optgroup label="projects"> <?php // Display the details of each event in a table while ( $option = mysql_fetch_array($result) ) { echo("<option label=" . $option["proj_title"] . "value=" . $option["ID"] . ">" . $option["proj_title"] . "</option>"); } ?> </optgroup> </select> <input type="button" VALUE="GO" onClick=location("****Do not know what to put here******) /> <? endif; ?> <div id="tabcontainer"> <ul id='tabs' class='shadetabs'> <?php // Populate tabs with data related to the selected project echo ("<li><a href='project.php' rel='container' class='selected'>Project</a></li>"); echo ("<li><a href='capability.php' rel='container'>Demo Capability</a></li>"); echo ("<li><a href='approach.php' rel='container'>Approach</a></li>"); echo ("<li><a href='venue.php' rel='container'>Venue/Trade Shows</a></li>"); echo ("<li><a href='financials.php' rel='container'>Financials</a></li>"); ?> </ul> <!-- <ul id='tabs' class='shadetabs'> <li><a href='project.php' rel='container' class='selected'>Project</a></li> <li><a href='capability.php' rel='container'>Demo Capability</a></li> <li><a href='approach.php' rel='container'>Approach</a></li> <li><a href='venue.php' rel='container'>Venue/Trade Shows</a></li> <li><a href='financials.php' rel='container'>Financials</a></li> </ul> --> <div id="divcontainer" style="border:1px solid gray; width:600px; margin-bottom: 1em; padding: 5px"> <p>Please select a project using the drop-down menu above. Use the tabs to view information about the selected project.</p> </div> <script type="text/javascript"> var countries=new ddajaxtabs("tabs", "divcontainer") countries.setpersist(true) countries.setselectedClassTarget("link") //"link" or "linkparent" countries.init() </script> </div> I'm almost finished with this app for XUL / HTML Table Generation, and i have a really strange problem... The HTML strings in the Arrays can be changed, and the HTML file saved, and the HTML page reloaded, and the changes will render. However, i have one array, no matter what i change the HTML strings to, it refuses to render the changes made to the HTML strings. It's quite confusing... the array in question is Code: // Humidor InnerHTML HumidorInnerHTML[0] = "<img src='NoImage.gif' style='height:100px; width:100px;'>"; HumidorInnerHTML[1] = "<input type='textbox' id='Others_Caption" + HumidorIndex + "'>"; HumidorInnerHTML[2] = "<input type='textbox' value='85' id='Others_Height" + HumidorIndex +"'>"; HumidorInnerHTML[3] = "<input type='textbox' value='85' id='Others_Width" + HumidorIndex +"'>"; HumidorInnerHTML[4] = "<img src='NoImage.gif' style='height:100px; width:100px;'>"; HumidorInnerHTML[5] = "<img src='NoImage.gif' style='height:100px; width:100px;'>"; HumidorInnerHTML[6] = "<img src='delete.png' onClick=DeleteRow('" + HumidorIndex + "','Humidor_Table');>"; HumidorInnerHTML[7] = "<img src='add.png' onClick=AddRow('" + HumidorIndex + "','Humidor_Table');>"; and the function that generates the HTML Table on the fly (and adds the cell data to them) is he Code: function AddRow(index, DIV) { MyTable = document.getElementById(DIV); var newCell; var newRow = MyTable.insertRow(index); var Length; switch (DIV) { case "Intro_Table" : Length = IntroInnerHTML.length; break; case "Image_Table" : Length = ImageInnerHTML.length; break; case "Watch_Table" : Length = WatchInnerHTML.length; break; case "Others_Table" : Length = OthersInnerHTML.length; break; case "Humidor_Table" : Length = HumidorInnerHTML.length; break; } for (var i = 0; i < Length; i++) { newCell = newRow.insertCell(i); switch (DIV) { case "Intro_Table": newCell.innerHTML = IntroInnerHTML[i]; break; case "Image_Table": newCell.innerHTML = ImageInnerHTML[i]; break; case "Watch_Table": newCell.innerHTML = WatchInnerHTML[i]; break; case "Others_Table": newCell.innerHTML = OthersInnerHTML[i]; break; case "Humidor_Table": newCell.innerHTML = WatchInnerHTML[i]; break; } } // Update the Index Counters switch (DIV) { case "Intro_Table": IntroIndex++; break; case "Image_Table": ImageIndex++; break; case "Watch_Table": WatchIndex++; break; case "Others_Table": OthersIndex++; break; case "Humidor_Table": HumidorIndex++; break; } } when the page is loaded, the Init() function is started, that code is he Code: function Init() { AddRow(1, "Intro_Table"); AddRow(1, "Image_Table"); AddRow(1, "Watch_Table"); AddRow(1, "Humidor_Table"); AddRow(1, "Others_Table"); } Did i miss something? there must be something i've over looking. I have even tried isolating some other external JS, and CSS includes that i have, and isolating them has no change in the result. the html file is live he http://kevinjohnson.clanteam.com/XML...anageSite.html thanks Hi, I am new to javascript, Please help me with the issue below. My javascript code below should actually fetch the data from html table on button click. function displaymessage() { alert ("button pressed"); var table_cells = new Array(); var table7 = document.getElementById('Auth'); for (i=0,n=table7.rows.length; i < n ; i++) { var Rowdata = table7.rows[i]; table_cells[i] = new Array(); for(j=0,cols = Rowdata.cells.length; j < cols; j++) { table_cells[i,j] = Rowdata.cells[j].innerHTML; alert (table_cells[i,j]); } } alert (table_cells[1,1]); alert (table_cells[2,1]); alert (table_cells[3,1]); alert (table_cells[4,1]); alert (table_cells[5,1]); alert (table_cells[6,1]); alert (table_cells[7,1]); alert (table_cells[8,1]); } The problem with my code above is that the statement "alert (table_cells[i,j]);" executes properly and shows the correct value. But the other alert statements shows only the value of the last row of the table. i.e., my table has 9 rows. and all the alert statements shows 9th row's 2nd column's value outside the for loop. But inside the for loop it executes fine. I tried it in IE7. I seem to miss something. Could someone please help me out with this? Thanks in advance. Hey guys. This is vague because I dont know what exactly to tell you but please reply with me so I can fix this. I want to add something to my forum. Specifically, I want to add a HTML and Picture button for when you go to reply. Like posting an article here, there are also these options (font, alignment, insert image) I do not know how to achieve this but shouldnt be too hard. Here are the two sources you will need to look through to help me fix the forum. http://neoweather.com/FWFORUM.JS http://static.websimages.com/JS/fw.js THANKS Hey guys. I want to add something to my forum. Specifically, I want to add a HTML and Picture button for when you go to reply. Like posting an article here, there are also these options (font, alignment, insert image) I do not know how to achieve this but shouldnt be too hard. Here are the two sources you will need to look through to help me fix the forum. http://neoweather.com/FWFORUM.JS http://static.websimages.com/JS/fw.js THANKS hello, i have this script that doesn't work exactly right yet. but i can't figure it out what i need to chance to let it work. in the script i want the button to be enabled when both text boxes are filled, atm when i fill in 1 it will already enable the button and thats exactly what i don't want. im quite a nooby in this so could some1 help me ? tyvm in advance code___________________ <html> </head> <script type="text/javascript"> function ButtonDisable1(text) { if (text.length > 0) document.getElementById("submit_button").disabled = false; else document.getElementById("submit_button").disabled = true; } </script> </head> <body> <input type="text" id="search_text" onchange="ButtonDisable1(this.value)"> <input type="text" id="search2_text" onchange="ButtonDisable1(this.value)"> <input type="submit" id="submit_button" value="Search" disabled="true"> </body> </html> I have a website using this pageslide function http://srobbin.com/blog/jquery-pageslide/ Basically the page you see in the example is acting as a side menu bar and when you click the links on that page, it performs the sliding action and a new page slides into the screen. I'm wondering if there is any way to get the back button to slide it back to the main page, rather than having to click a link to go back? Can someone explain to me as to why the "New Art" button in the navigation doesn't have the "on" function as the others where you hover over the button and the text turns orange? Keep in mind, I didn't design/develop this site...I'm merely just trying to insert a button in the nav for a friend of mine. Thanks for your help it is greatly appreciated! Here's the website: http://www.thejam2.com/two/ And the code: Code: } menuImage = {}; function makeMenu(){ var imgs = ["thejam", "newart", "theartist","viewit","orderit","theCollage","theBorder","detailedImages","theMusicians"]; for(i in imgs){ menuImage[imgs[i]+"off"] = new Image(); menuImage[imgs[i]+"off"].src = "pics/menu_"+imgs[i]+".gif"; menuImage[imgs[i]+"on"] = new Image(); menuImage[imgs[i]+"on"].src = "pics/menu_"+imgs[i]+"_on.gif"; } document.write('<div id="menu"><table width="'+((ns4) ? 794 : '100%')+'" cellpadding=0 cellspacing=0 border=0>'); if(ns4) document.write('<tr><td><img src="pics/spacer.gif" width="418" height="1"></td><td><img src="pics/spacer.gif" width="94" height="1"></td><td><img src="pics/spacer.gif" width="94" height="1"></td><td><img src="pics/spacer.gif" width="94" height="1"></td><td><img src="pics/spacer.gif" width="94" height="1"></td><td><img src="pics/spacer.gif" width="94" height="1"></td></tr>'); document.write('<tr><td width="100%"> </td>'); document.write('<td width="94" background="pics/button_guitarBig.gif" width="75">' + makeButton('bios.php?artist=about','thejam','jamMenu') + '<br></td>'); document.write('<td width="94" background="pics/button_starBig.gif" width="75">' + makeButton('newart.php','newart','newart') + '<br></td>'); document.write('<td width="94" background="pics/button_guitarBig.gif" width="75">' + makeButton('bios.php?artist=mike_keirstead','theartist') + '<br></td>'); document.write('<td width="94" background="pics/button_starBig.gif" width="75">' + makeButton('jam2.php','viewit','viewMenu') + '</td>'); document.write('<td width="94" background="pics/button_guitarBig.gif" width="75">' + makeButton('jam2.php?loc=order','orderit') + '</td></tr>'); document.write('<tr><td> </td><td>'); makeJamMenu(); document.write('</td><td colspan="4" align="center">'); makeViewMenu(); document.write('</td></tr></table></div>'); } How you handle back button scenario in firefox browser. The problem is when i click browser back button , the javascript on load is not executed and page is rendered from cache. It works in IE.. I have set's of radio buttons that have on click functions, and when i restore the form data i would like the onclick functions to re-calculate. Is there a simply way such as if this.checked = true run onclick function that i can apply to every radio with onload???
Reply With Quote 01-10-2015, 01:51 PM #2 Philip M View Profile View Forum Posts Supreme Master coder! Join Date Jun 2002 Location London, England Posts 18,371 Thanks 204 Thanked 2,573 Times in 2,551 Posts You cannot auto-click for security reasons. But you can use local storage to keep the status of the radio buttonds and reinstate them on page reload. You can then run a script to do whatever is required. Hello to all and thank you for any help beforehand. I have an issue with the script below, Select the top dropdown and the second gets populated, this is a nice piece of script, the only problem is that when the information is posted and presented on the process page I click page back to the form to rectify some other field but the ajax resets so I have to select Country & City each time even if thease fields are correct. I know that back button as well as bookmark is a problem with ajax but i think there is a solution the only thing is I don't know how to apply it to this script. Source of the script: http://www.dhtmlgoodies.com/index.ht...chained_select Ajax file: http://www.dhtmlgoodies.com/AJAX/ajax.js test.html Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title></title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <script type="text/javascript" src="ajax.js"></script> <script type="text/javascript"> var ajax = new Array(); function getCityList(sel) { var countryCode = sel.options[sel.selectedIndex].value; document.getElementById('dhtmlgoodies_city').options.length = 0; // Empty city select box if(countryCode.length>0){ var index = ajax.length; ajax[index] = new sack(); ajax[index].requestFile = 'getCities.php?countryCode='+countryCode; // Specifying which file to get ajax[index].onCompletion = function(){ createCities(index) }; // Specify function that will be executed after file has been found ajax[index].runAJAX(); // Execute AJAX function } } function createCities(index) { var obj = document.getElementById('dhtmlgoodies_city'); eval(ajax[index].response); // Executing the response from Ajax as Javascript code } function getSubCategoryList(sel) { var category = sel.options[sel.selectedIndex].value; document.getElementById('dhtmlgoodies_subcategory').options.length = 0; // Empty city select box if(category.length>0){ var index = ajax.length; ajax[index] = new sack(); ajax[index].requestFile = 'getSubCategories.php?category='+category; // Specifying which file to get ajax[index].onCompletion = function(){ createSubCategories(index) }; // Specify function that will be executed after file has been found ajax[index].runAJAX(); // Execute AJAX function } } function createSubCategories(index) { var obj = document.getElementById('dhtmlgoodies_subcategory'); eval(ajax[index].response); // Executing the response from Ajax as Javascript code } </script> </head> <body> <form action="" method="post"> <table> <tr> <td>Country: </td> <td><select id="dhtmlgoodies_country" name="dhtmlgoodies_country" onchange="getCityList(this)"> <option value="">Select a country</option> <option value="dk">Denmark</option> <option value="no">Norway</option> <option value="us">US</option> </select> </td> </tr> <tr> <td>City: </td> <td><select id="dhtmlgoodies_city" name="dhtmlgoodies_city"> </select> </td> </tr> </table> </form> </body> </html> Here's the content of getCities.php Code: <?php if(isset($_GET['countryCode'])){ switch($_GET['countryCode']){ case "no": echo "obj.options[obj.options.length] = new Option('Bergen','1');\n"; echo "obj.options[obj.options.length] = new Option('Haugesund','2');\n"; echo "obj.options[obj.options.length] = new Option('Oslo','3');\n"; echo "obj.options[obj.options.length] = new Option('Stavanger','4');\n"; break; case "dk": echo "obj.options[obj.options.length] = new Option('Aalborg','11');\n"; echo "obj.options[obj.options.length] = new Option('Copenhagen','12');\n"; echo "obj.options[obj.options.length] = new Option('Odense','13');\n"; break; case "us": echo "obj.options[obj.options.length] = new Option('Atlanta','21');\n"; echo "obj.options[obj.options.length] = new Option('Chicago','22');\n"; echo "obj.options[obj.options.length] = new Option('Denver','23');\n"; echo "obj.options[obj.options.length] = new Option('Los Angeles','24');\n"; echo "obj.options[obj.options.length] = new Option('New York','25');\n"; echo "obj.options[obj.options.length] = new Option('San Fransisco','26');\n"; echo "obj.options[obj.options.length] = new Option('Seattle','27');\n"; break; } } ?> Hi to All, I have this problem: I' dl ike that, if one clicks a button, appear window_explorer in which it' s possible to choose an image that it will put in the specific td of the table. <head> <script> function add_pic() { document.forms[0].pic.value == code to choose image ... } </script> </head> <body> <form method="POST" name="FrontPage_Form1"> ... <table> <tr><td><button onClick="add_pic()">Insert Statitistic map</button></td></tr> <tr><td>Comments</td></tr> <tr><td id="pic" name="pic"> PLACE IN WHICH IMAGE APPEAR </td></tr> </table> ... </body> Thanks in advance !!! P.S. I use IE6 and Windows XP I need to make a table fadeout with JavaScript when I click a button. The table is simple. Code: <table id="users_table" style="border:1px solid #000;border-collapse: collapse;" border='1'> <tr class="dataRow"> <td>11</td> <td>12</td> <td>13</td> </tr> <tr class="dataRow"> <td>21</td> <td>22</td> <td>23</td> </tr> <tr id="row3" class="dataRow"> <td>31</td> <td>32</td> <td>33</td> </tr> <tr class="dataRow"> <td>41</td> <td>42</td> <td>43</td> </tr> </table> There is a button that calls a function called fadeout(). I cannot find a way to make the table fade out with just that one function. Is that even possible? If not, what other functions are necessary to make this happen? Hi, I need a button that not only resets what is typed in the textarea but also hides all shown tables... Here's how my current set up is... ---------text area------ with a reset button table1 title (when clicked, shows a table under it) table2 title (when clicked, shows a table under it) table3 title (when clicked, shows a table under it) the tables under the main tables have buttons that when clicked on inserts texts in the textarea. Any help would be much much appreciated! Hey All, I've got the following few lines of code that set some radio button values within a table: Code: document.getElementById('Price' + lineNumber).value = price; document.getElementById('Term' + lineNumber).value=term; document.getElementById('Type' + lineNumber).value=Type; I also have a table with id="example" that these input fields sit within. In Firefox, this works without an issue, but in IE, I get a 'document.getElementById(...) is null or not an object' error. How can I fix the above code to work with a table ID? I need to keep the table ID present for some other JS code that works off of it. Any help would be greatly appreciated. Thanks. Hello! I am trying to collapse a table via JS, and the following code works in IE, yet not in Mozilla. I have read lots of other posts (on the world wide web) in regards to possibly tackling this with div, or span: however, in my case, I cannot modify the already existing HTML of the code. Could you please assist me - why is it that the following code works in IE, yet not in Mozilla? More INFO: Please note that although I am using the variable id below, I have also tried this via the defined element el. However -- using el doesn't work in either browsers. Please also note that the function is being called like so: HTP.p( '<table BORDER=0 BORDERCOLOR="#d1dce9" CELLPADDING="0" WIDTH=100% style="border-collapse:collapse;"> <tr> <td onClick="ftoggle(this);" width="100%" style="cursorointer;"><font face="Calibri" color ="#3A5894" size=2><B>[+] Click here to Show/Hide the Table</B></font></td> </tr><tr> <td colspan="1" style="display:none;color:#ff0000;">'); <head> <script language="JavaScript"> function ftoggle(id){ var el = document.getElementById(id); if(id.parentNode.nextSibling.childNodes.item(0).style.display=="") { id.parentNode.nextSibling.childNodes.item(0).style.display="none"; } else { id.parentNode.nextSibling.childNodes.item(0).style.display=""; } } </script> </head>'); Hello, I'm trying to make it so that when a user clicks a <li> it opens a marker on my map. The map and markers work fine within the map...but I can't seem to get my selector outside of the map to work. Thanks in advanced, this has been bugging me for days now! here is the javascript i have for the map so far... Code: var infowindowLevel = 0; function initialize() { var companyLogo = new google.maps.MarkerImage('images/googlemaps/logo23.png', new google.maps.Size(154,76), new google.maps.Point(0,0), new google.maps.Point(50,50) ); var companyShadow = new google.maps.MarkerImage('images/googlemaps/logo_shadow2.png', new google.maps.Size(154,60), new google.maps.Point(0,0), new google.maps.Point(30, 35) ); var footSolutionsLogo = new google.maps.MarkerImage('images/googlemaps/fslogo2.png', new google.maps.Size(154,76), new google.maps.Point(0,0), new google.maps.Point(50,50) ); var footSolutionsShadow = new google.maps.MarkerImage('images/googlemaps/logo_shadow2.png', new google.maps.Size(154,60), new google.maps.Point(0,0), new google.maps.Point(30, 35) ); var myLatlng = new google.maps.LatLng(38.030034,-121.214445); var myOptions = { zoom: 9, center: myLatlng, navigationControl: true, navigationControlOptions: {style: google.maps.NavigationControlStyle.DEFAULT}, mapTypeControl: true, scaleControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var fs1 = new google.maps.LatLng(37.971961, -121.300540); var fs = new google.maps.Marker({ position: fs1, map: map, icon: footSolutionsLogo, shadow: footSolutionsShadow, title:"Foot Solutions - Stockton(CLICK ME)" }); var stf2 = new google.maps.LatLng(37.664285,-120.953553); var stf2 = new google.maps.Marker({ position: stf2, map: map, icon: companyLogo, shadow: companyShadow, title:"Shoes That Fit - Modesto(CLICK ME)" }); var stf3 = new google.maps.LatLng(38.409277, -121.383330); var stf3 = new google.maps.Marker({ position: stf3, map: map, icon: companyLogo, shadow: companyShadow, title:"Shoes That Fit - Elk Grove(CLICK ME)" }); var contentString = '<div id="windowContent">'+ '<div id="bodyContent">'+ '<img src="images/googlemaps/fslogo.jpg" alt="Logo" /> '+ '<h3>Stockton</h3>'+ '<p><img src="images/googlemaps/store1.jpg"/> ' + '</p> '+ '<p class="link"><a target="_blank" href="http://maps.google.com/maps?f=d&source=s_d&saddr=&daddr=2210+Pacific+Ave,+Stockton,+CA+95204&hl=en&geocode=&mra=ls&sll=37.0625,-95.677068&sspn=51.841773,57.744141&ie=UTF8&z=16">Get Directions! (Google Maps)</a></p> '+ '</div>'+ '</div>'; var contentString2 = '<div id="windowContent">'+ '<div id="bodyContent">'+ '<img src="images/googlemaps/stflogo.jpg" alt="Logo" /> '+ '<h3>Modesto</h3>'+ '<p><img src="images/googlemaps/store2.jpg"/> ' + '</p> '+ '<p class="link"><a target="_blank" href="http://maps.google.com/maps?f=d&source=s_d&saddr=&daddr=2401+E+Orangeburg+Ave,+Modesto,+CA+95355&hl=en&geocode=&mra=ls&sll=38.409009,-121.383419&sspn=0.012644,0.014098&ie=UTF8&z=16"> Get Directions! (Google Maps) </a></p> '+ '</div>'+ '</div>'; var contentString3 = '<div id="windowContent">'+ '<div id="bodyContent">'+ '<img src="images/googlemaps/stflogo.jpg" alt="Logo" /> '+ '<h3>Elk Grove</h3>'+ '<p><img src="images/googlemaps/store3.jpg"/> ' + '</p> '+ '<p class="link"><a target="_blank" href="http://maps.google.com/maps?f=d&source=s_d&saddr=&daddr=8649+Elk+Grove+Blvd,+Elk+Grove,+CA+95624&hl=en&geocode=&mra=ls&sll=37.971882,-121.300619&sspn=0.01272,0.014098&ie=UTF8&z=16">Get Directions! (Google Maps)</a></p> '+ '</div>'+ '</div>'; var infowindow = new google.maps.InfoWindow({ content: contentString, //maxWidth: 300, }); var infowindow2 = new google.maps.InfoWindow({ content: contentString2, // maxWidth: 300, }); var infowindow3 = new google.maps.InfoWindow({ content: contentString3, // maxWidth: 300, }); google.maps.event.addListener(fs, 'click', function() { infowindow.open(map,fs) }); google.maps.event.addListener(stf2, 'click', function() { infowindow2.open(map,stf2) }); google.maps.event.addListener(stf3, 'click', function() { infowindow3.open(map,stf3) }); } here is the <li>'s I want to use as the "buttons".. Code: <ul class="locations"> <li> <strong>Address</strong> <strong>Phone</strong> : <strong>Fax</strong> : </li> <li> <strong>Address</strong> <strong>Phone</strong> : <strong>Fax</strong> : </li> <li> <strong>Address</strong> <strong>Phone</strong> : <strong>Fax</strong> : </li> </ul> how do i make a html button stay down when pressed, until another button within a specified group of buttons is pressed, at which point it is released and the other button stays pressed?
Hi all, I would like to have an HTML button which, when clicked by the user, contacts the server and runs a Python script on the server. When the Python script finishes running, the current HTML page automatically reloads a file from the server. Is that possible? YJ |