JavaScript - Google +1 Button Not Appearing
This is my last resort. I do not javascript - I have the code Google sent me on http://www.countyfairgrounds.net - and I have 3600 other pages I would like it on - but for the life of me - I cannot figure out why it does not work. Lately I have tried to make it work on http://www.countyfairgrounds.net/ads.html - I have tried the Google forums. Does anyone here speak Google +1 code? I surely would appreciate it
Similar TutorialsHello, I am trying to have my print button appear only once the script for my validation button has gone through without any errors. To do this, I used the following script in my validation button (I've truncated most of it since you get the point after two lines): // hidden field var lrcf = this.getField("LastRCFalse"); var ei = this.getField("Employee ID number"); if ( lrcf.value != ""){ var tempname = lrcf.value; if (tempname == "Employee ID number") {ei.setFocus();}} else { var ei = this.getField("Employee ID number"); if (ei.value != "" && (ei.value == "0000000" || ei.value < 1259)){ app.alert("Employee ID number, if entered, must be between 0001259 and 0999999") ei.setFocus();} else { var city = this.getField("Effective date"); if (city.value == ""){ app.alert("Please enter Effective date") city.setFocus();} else { var gmf = this.getField("Gender"); if (gmf.value != "M" && gmf.value != "F" ){ app.alert("Please select gender of employee") gmf.setFocus();} else { // Making fields visible for printing VisibleToPrint(); app.alert("Your form is ready to print. Please press the PRINT button on this form.",3) The red part is where it all seems to be breaking apart. I've verified that none of the script before is incorrect and it all goes smoothly except that my print button does not appear afterwards. (The print button doesn't have any complicated script just a "execute a menu item" and is put as hidden in common properties so that no one can print before having gone through the verification). Should I have created another print button which sits on top of the other one? I am really new to this so any help would be greatly appreciated. http://vietnamthereandback.com/mainpage.html The arrows next to the songs previews are randomly appearing/disappearing on page refresh. There are always 8 arrows, but each refresh shows the arrows in different places. This has really got me stumped. If anyone has any thoughts, I'd really appreciate hearing them. The basic button/arrow code is below. The only thing that changes in the MP3 file name. <code> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30"> <PARAM NAME=movie VALUE="http://www.vietnamthereandback.com/Clips/audioplay.swf?file=http://www.vietnamthereandback.com/Clips/reflections.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.vietnamthereandback.com/Clips/buttons/negative_small&bgcolor=0xffffff&mode=playpause"> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent> <embed src="http://www.vietnamthereandback.com/Clips/audioplay.swf?file=http://www.vietnamthereandback.com/Clips/reflections.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.vietnamthereandback.com/Clips/buttons/negative_small&bgcolor=0xffffff&mode=playpause" quality=high wmode=transparent width="30" height="30" align="" TYPE="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object> </code> If you look on the top right corner of the site I'm working on, the +1 button doesn't line up with the other social media icons. Why? http://customwovenlabels.com/ There is a serious conflict b/w Google plus button and lightbox script the buttons works fine in all other pages but when lightbox script is added to the page there is some problem. It has a JavaScript error and the Google plus one button wont show up in the header. the error says uncaught error for the length. the length parameter is used in both lightbox.js and plusone.js here is the link http://www.ornusweb.com/what_we_done.html can some one please give me a code snippet to solve this issue 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> I have a page with a GoogleMap with a GoogleBar and I would like the GoogleBar to appear with something written in it already and to have that search executed. In other words, I would like to "write something to the GoogleBar and press Enter" automatically as soon as the map loads. How can I do this? btw: By GoogleBar, I mean the search bar that appears on the map after using the enableGoogleBar() function. Hi, I'm not sure where I have translated this incorrectly. I have one google map embedded on my page which works fine. But I wanted to add a second one. I thought the easiest way to do this would be to have a second page which is called later on with all the details on it for the second map. However although I think (this I presume is where I went wrong) I have replicated the instructions correctly the place holder for the second map just remains blank. This is the code for my called page with the instructions for the second map: PHP Code: <?php echo $_POST['Map'] . '<br />'; ?> <div id="placemap_canvas"></div> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html {height:250px} body {height:250px} #placemap_canvas {width:100%; height:150px;} </style> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true" /> </script> <script type="text/javascript"> var latlng = new google.maps.LatLng ( <?php include("dbconnect.php"); $result = mysql_query("SELECT * FROM regions WHERE RegionPId='{$_POST['Map']}'"); while($row = mysql_fetch_array($result)){ echo $row['maplink']; } mysql_close($con); ?> ); var myOptions = { zoom: 4, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("placemap_canvas"), myOptions); } </script> And this is the script of the main page, just in case I would be better off keeping them both in one place. Code: <head> <script type="text/javascript"> function loadSubPlace(File,ID,Msg,Eile,EID,Esg){ loadXMLDoc1(File,ID,Msg); var mimer = setTimeout(function(){loadXMLDoc1(Eile,EID,Esg)},5000); } </script> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html {height:250px} body {height:250px} #map_canvas {width:30%; height:250px;} </style> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true" /> </script> <script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng ( <?php include("dbconnect.php"); $result = mysql_query("SELECT * FROM countries WHERE Country='{$_SESSION['Country']}'"); while($row = mysql_fetch_array($result)){ echo $row['Map']; } mysql_close($con); ?>); var myOptions = { zoom: 4, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } </script> </head> <body onload="initialize()"> <div class="countryright" id="map_canvas"> include("dbconnect.php"); $snowball=explode(';',$_POST['syringa']); $turnsol=$snowball[1]; $violet =$snowball[2]; $wakerobin=$snowball[3]; global $turnsol; global $violet; global $wakerobin; echo '<center><b><big>' . $wakerobin. '</big></b></center><br /><br />'; $result=mysql_query("SELECT * FROM regions WHERE country='{$turnsol}' AND region='{$violet}' AND place='{$wakerobin}' AND sub !='' ORDER BY sub ASC"); while($row = mysql_fetch_array($result)){ $wheat="{$row['RegionPId']};{$turnsol};{$violet};{$wakerobin};{$row['sub']}"; $tigerlilly=$row['RegionPId']; echo '<input type="button" class="button3" name="place" id="place" value="' . $row['sub'] . '" onclick="loadSubPlace(\'getPlace.php\',\'txtHintPlaceSub\',\'hepatica=' . urlencode($wheat) . '\',\'getPlaceMap.php\',\'placemapcanvas\',\'Map=' . urlencode($tigerlilly) . '\');" />'; } echo '<input type="button" class="button3" name="addplace" id="addplace" value="Add Place" onclick="loadXMLDoc1(\'getAddPlaceSub.php\',\'txtHintPlaceSub\', encodeURI(\'addsubplace=' . $_POST['syringa'] . '\'));" />'; echo '<br /><br /><div id="txtHintPlaceSub"></div><br /><br />'; mysql_close($con); ?> I've cut out the script that doesn't relate to this so I hope I haven't missed anything important. I have a two dropdown menus, the second drop down menu appears depending on what is selected in the first dropdown menu. Problem is that in some browsers, if something is selected in the first dropdown menu, then if I click on the second dropdown menu then a dropdown does not occur, but if I select something in the first dropdown menu again and then click on the second dropdown menu, then the dropdown appears in the second dropdown menu. Why is this happening? In Internet Explorer, Firefox and Safari, my second drop down menu appears straight away when I click on it after selecting something on the first dropdown menu for the first time. In google chrome and opera, I have to select options from the first dropdown menu twice to be able to get the second dropdown menu working. The jquery code for the second dropdown menu is below: Code: $("#optionDropId").change(function(){ var OptDrop = new Array(); OptDrop.abc = ["",1,2]; OptDrop.abcd = ["",1,2,3]; OptDrop.abcde = ["",1,2,3,4]; OptDrop.trueorfalse = [1]; OptDrop.yesorno = [1]; var selectedValue = $(this).val(); $("#numberDropId").html(""); $.each(OptDrop[selectedValue], function(x,y){ $("#numberDropId").append($("<option></option>").attr("value", y).html(y)); }); }); The full code is in Jsfiddle. (the full code might not work fully in JSfiddle but it works in browsers on its own file and the full code shows the order of my code. [1]: http://jsfiddle.net/XZ7um/2/ Hello All, I am having a few issues. I have added a piece of code in and it doesn't seem to be working. I have highlighted this in bold. Any Ideas? <html> <body> <SCRIPT LANGUAGE="JavaScript"> <head> <TITLE>Find the Correct Number Game</TITLE> </head> a=(prompt('please enter your name:',0)); // prompt for player name document.write(' Hello ' ,a); var guessme=Math.round(Math.random()*(49)+1); var speech='Choose a number between 1 and 50'; function process(hiddennumber) { var guessnumber=document.forms.guesstable.guessnumber.value; var speech='"'+guessnumber+ '" Letters are not allowed. Please enter digits only!.'; document.forms.guesstable.guessnumber.value=''; if (guessnumber==hiddennumber) { document.forms.guesstable.prompt.value='Congratulations! '+hiddennumber+' is correct!'; alert ('Well done - the mystery number is '+hiddennumber+'! \n\nIf you want to play again click the button.'); speech=''; document.location=document.location; } if (hiddennumber<guessnumber) { speech='Less than '+ guessnumber; } if (hiddennumber>guessnumber) { speech='Greater than '+ guessnumber; } if (guessnumber=='') { speech='You didn\'t guess anything!' } document.forms.guesstable.prompt.value=speech; document.forms.guesstable.guessnumber.focus(); } </SCRIPT> </body> </html> <FORM onSubmit="" NAME="guesstable"> <CENTER> <TABLE ALIGN="left" BGCOLOR="#888889" BORDER="5" CELLPADDING="5"> <TR> <TD BGCOLOR="#004081"> <FONT COLOR="#ffffff" FACE="Arial"><B>Find the Correct Number</B></FONT> </TD> </TR> <TR> <TD> <CENTER> <INPUT TYPE="text" NAME="prompt" SIZE="31" MAXLENGTH="60" VALUE="Find the correct number which is between 1 and 50"><BR> <INPUT TYPE="text" NAME="guessnumber" SIZE="3" MAXLENGTH="3" VALUE=""> <INPUT TYPE="button" VALUE="Enter" onClick='process(guessme)'> </CENTER> </TD> </TR> </TABLE> </CENTER> </FORM> The code so far works, but the rows form horizontally rather than vertically. This is my first time working with XMLHttpRequest() so it's probably pretty sloppy. Also, when the function runs again, it creates another row above the previous row, I'll add a screen shot. http://tinyurl.com/7c7fylb - What it looks like when I've typed "bloodb" which means everything after the return if statement has ran twice Code: function findCard() { str = document.getElementById("cardName").value; if (str.length<=4) { return; } xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","CardInfo/cards.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; var strLng = str.length; var x = xmlDoc.getElementsByTagName("card"); var table = document.getElementById("cardDisplay") var newRow = table.insertRow(0) for (i=0; i { var resaultStr = x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue.slice(0,strLng) if (str==resaultStr) { newRow.insertCell(0).innerHTML=x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue } } } hi, I am looking for help creating javascript auto-apearing box, which will appear when someone onmouse on the hyperlink. In the appeared box I want to show some PHP script and other text. See in my example attached Regards. http://www.glenoaksbigsur.com Naturally it's an IE6 problem. The dropdown menu at the top behaves fine on every page except the homepage. The homepage has a uses jQuery and a Stepcarousel script. It secondary nav is appearing behind the #maincontent div. I've tried adjusting the z-index to 10000. No result. I scanned both js files to see if there was a z-index conflict. The largest z-index is 50. It's only happening in IE6. Any suggestions? Hi, I have placed a form validation script in my HTML and I think its all in the right place, however, when i load the page an error appears saying can not get object. Once I click past it, the form validation works as normal. Not sure how to get rid of this error. I have placed the link to the external validation script in the document head Any ideas? HTML Code: <div class="mb_content"> <h2>Work</h2> <div class="mb_content_inner"> <p>IMAGES COMING SOON.</p> </div> </div> <div class="mb_content"> <h2>Contact</h2> <p class="con_details_tel">tel: </p> <p class="con_details_email">email: </p> <div class="mb_content_inner"> <form id='contactus' name='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'> <fieldset > <input type='hidden' name='submitted' id='submitted' value='1'/> <input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/> <input type='text' class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' /> <div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span></div> <div class='container'> <label for='name' >Name: </label><br/> <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/> <span id='contactus_name_errorloc' class='error'></span> </div> <div class='container'> <label for='email' >Email:</label><br/> <input type='text' name='email' id='email' value='<?php echo $formproc->SafeDisplay('email') ?>' maxlength="50" /><br/> <span id='contactus_email_errorloc' class='error'></span> </div> <div class='container'> <label for='message' >Message:</label><br/> <span id='contactus_message_errorloc' class='error'></span> <textarea name='message' id='message'><?php echo $formproc->SafeDisplay('message') ?></textarea> </div> <div class='container'> <input type='submit' name='Submit' value='Submit' /> </div> </fieldset> </form> <script type='text/javascript'> var frmvalidator = new Validator('contactus'); frmvalidator.EnableOnPageErrorDisplay(); frmvalidator.EnableMsgsTogether(); frmvalidator.addValidation("name","req","Please provide your name"); frmvalidator.addValidation("email","req","Please provide your email address"); frmvalidator.addValidation("email","email","Please provide a valid email address"); frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)"); </script> </div> </div> </div> Here is the start of the javascript that is producing the error:- Code: function Validator(frmname) { this.validate_on_killfocus = false; this.formobj = document.forms[frmname]; if (!this.formobj) { alert("Error: couldnot get Form object " + frmname); return; } Can anyone help? Thanks nevblanc79 Hello, I followed a Mega Drop Down menu tutorial and everything is working great, except for some reason on certain pages - when the menu drops down, some table elements behind the menu actually appear in front of it? I'm not quite sure what or why this is happening. Here is the URL for reference. http://gem-tech.com.mytempweb.com/store/pc/home.asp Here is an example of what I am talking about: Here is how it should look: Any help would be appreciated, thanks! Can the Google API replace scraping? You can get blocked by Google if you scrape, but can you get the same info from the Google API at no risk?
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 i'm still a relative noob and this has me stuck - i have a save button with a "save as copy" in the save dropdown list. add new item directs to a premade/formatted project that is used as a template, so on that item i only want/need the "save as copy" but on all other items that use the form i need to only have the "save" function. is there any way to either change the function of the button depending on item that is being viewed in the edit screen OR hide the "save" button and only show the button associated with "save as copy - and vis versa for the rest of the items?? current button code is - protected function getToolbar() { $options = array(); $user = JFactory::getUser(); $create_ms = $user->authorise('core.create', 'com_pfmilestones'); $create_task = $user->authorise('core.create', 'com_pftasks'); $options[] = array( 'text' => 'JSAVE', 'task' => $this->getName() . '.save'); $options[] = array( 'text' => 'Save as new project', 'task' => $this->getName() . '.save2copy', 'options' => array('access' => ($this->item->id > 0))); PFToolbar::dropdownButton($options, array('icon' => 'icon-white icon-ok')); item used as template is id=8 any help or suggestions would be greatly appreciated.. Hi, I am not entirely sure what I am doing wrong here, and I have been looking at this for ages, so apologies in advance if I have become so bleary eyed I can't see something simple. I use php to create buttons based on values pulled for a table. The problem I have is when you click on the first button the javascript function works great, when you click on the next button you get the same output even though it should be different results. I am working in ff and I can see on my firebug console that the javascript function is being called, but it is not passing the new value of the second or third button, it just keeps repassing the value of the first button. So not entirely sure where I am going wrong here. My page is: Code: <script type="text/javascript"> function loadXMLDoc2(File,ID,Msg){ if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById(ID).innerHTML=xmlhttp.responseText; } } var params=Msg; xmlhttp.open("POST",File,true); xmlhttp.setRequestHeader("Pragma", "Cache-Control:no-cache"); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params); } </script> <head> <body> <?php $con = mysql_connect("localhost","user","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydb", $con); $result = mysql_query("SELECT DISTINCT theme FROM goods WHERE category='{$_POST['category']}' ORDER BY theme DESC"); while($row = mysql_fetch_array($result)){ echo '<input type="text" class="hidden" name="theme" id="theme" value="' . $row['theme'] . '" ><input type="button" class="button3" name="product" id="product" value="' . $row['product'] . '" onClick="loadXMLDoc2(\'getShow.php\',\'txtHint\',\'theme=\'+encodeURI(document.getElementById(\'rtheme\').value))" > '; } echo '<br /><br /> <div id="txtHint"><div> <br /> <br />'; mysql_close($con); ?> And getShow.php produces a table with a list of product images, names and prices, based on theme. So basically not sure where I am going wrong here? i got javascripts button : Code: <input type="button" value="select" onClick="document.getElementById('input').select()" /> how can i transform "button" to image button (gif) |