JavaScript - Why Does My Google+1 Button Have A Big Space Above It
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/ Similar TutorialsThis 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
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. 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 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'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.. i got javascripts button : Code: <input type="button" value="select" onClick="document.getElementById('input').select()" /> how can i transform "button" to image button (gif) I have 4 rows in a table. Each row consist of 4 radio buttons. Each radio button per row has different values in it but has the same name (group) ex: <input type="radio" name="a" value="1"> <input type="radio" name="a" value="2"> <input type="radio" name="a" value="3"> <input type="radio" name="a" value="4"> <input type="radio" name="b" value="1"> <input type="radio" name="b" value="2"> <input type="radio" name="b" value="3"> <input type="radio" name="b" value="4"> and so on.. If I click radio button A with value 2, I want to output the total at the bottom as "2".. Also, if I click radio button B with value 3, I want to output the total of A and B as 5 and so on.. How can I automatically calculate the answer based on which radio button was click? update: I got my answer from this site: http://stackoverflow.com/questions/1...s-using-jquery Hello, Currently, i am working on a website. I need that when the data comes from ajax in the div or span tag, it should take space by moving down the data already present there without overwriting it. But it doesnot happens. When i get data through ajax, then it overwirtes the previous data which was already present there and doesnot move the previous data downwards. Any help plz I have a 3 textareas that when the user presses the spacebar I would like for the code to execute a TAB to move between them instead. My code works if I make the replacement keycode an number or letter but it wont work if I use TAB. The browser is IE. Thank you for any help you can give. <script type="text/javascript"> function keycode(e) { if(e.keyCode==32) {return (e.keyCode=9);} } </script> </head> <body> <form> <input name="DefectNumber" id="DefectNumber" type="text" onkeypress="return keycode(event);"> <input name="DefectNumber2" id="DefectNumber2" type="text" onkeypress="return keycode(event);"> <input name="DefectNumber3" id="DefectNumber3" type="text" onkeypress="return keycode(event);"> </form> </body> Hi All, Firstly, apologies if this is already posted somewhere on the site. I did do a search of the forum, but could only find solutions for things link Perl scripts etc. What I have is a file upload input (as part of a larger form) and I want to get some javascript that will replace spaces in a filename with another character, such as an underscore or dash. If possible, I would also like to be able to replace commas with an underscore or dash. Hope someone here can help or point me to the right place! Neil Hi all, I have a script that validates a postcode, including checking that the 4th character from the end of the postcode is a space. To save sending you back to the postcode textbox to correct the error, how can I automatically force a space at the 4th character position from the end of the postcode? ie, CM12JB is wrong. Need to change it to CM1 2JB. Any ideas? Gary Hello, I need your help. I would like to insert a few blank spaces in a text string: eg. string = 123456(space)(space)(space)7891011 How do you do this? Thanks a bunch Jay Right now when someone clicks on my listbox I immediately do an update on the form to populate the selected item. Is there a way to detect if a user has clicked on some white area of a list box? If my list is sized 8 items but the list only has 4 items, if the user clicks near the bottom of the list where there is no item to select, can I detect that? Currently I get the form updating even if I click on the white area of the list and I'd like the form to update only if I actually click on an item in the list. Thanks I cannot get an address entered on a form to validate unless I leave out the space between the number and the street name. The second line of the function shows the characters that it will accept. Every way I tried to add a space to that list doesn't work. function isAlphanumeric(elem, helperMsg){ var alphaExp = /^[0-9a-zA-Z]+$/; if(elem.value.match(alphaExp)){ return true; }else{ alert(helperMsg); elem.focus(); return false; } } (This is from a tutorial I'm studying to learn how to do validation. It seems strange that the folks who put this thing together don't know there's a space between the house number and the street name. Or does that only apply to my street?) Any ideas, J Hello, I am trying to create some javascript that will create a popup and the popup itself is just an image. But since I want the image to take up the entire window i create the html in a variable to hold the image. For some reason I always get white space on the right. I already have css built into the html variable to take out padding and margins and I even specify the size(sized exactly to the image) when doing window.open. I have not been able to solve this in a couple of days and have been trying alot of different solutions with no work. Any help is appreciated, here is the code: Code: function get_radio_value() { var wrong = "<html><head><style type='text/css'>body {margin: 0; padding:0; border:0;}</style>\ <title>Incorrect, try again!</title></head><body><bgsound src='Plbt.wav'>\ <a href='javascript:window.close()'><img src='wrong.jpg'></a></body></html>"; var right = "<html><head><style type='text/css'>body {margin: 0}</style>\ <title>You are Correct!</title></head><body>\ <a href='javascript:window.close()'><img src='right.jpg'></a></body></html>"; for (var i=0; i < document.question.mquestion.length; i++) { if (document.question.mquestion[i].checked) { var rad_val = document.question.mquestion[i].value; if (rad_val != "b") { var popup = window.open('','',"resizeable=no,scrollbars=no,location=no,menubar=no,toolbar=no,width=221,height=112"); popup.document.write(wrong); pops.document.close(); } else { var popup = window.open("","window","resizeable,scrollbars=no,width=221,height=112"); popup.document.write(right); pops.document.close(); } } } } </script> |