JavaScript - Http Site Showing Errors But Https Is Not (google Webmaster)
My website is https and I have both the http and https in my webmaster account and the http version is showing 150+ errors for one of the plugins but https version in Webmaster account does not show any. Do I need to worry about the http version since it redirects to the https?
Similar TutorialsHi, I am writing JavaScript code that runs inside HTTP page, I need to make XMLHttpRequest to a REST web service. The service is running on the same site but it only accepts HTTPS. I tried to prefix the URL with https:// and Firefox rejected it as cross-site scripting attempt. It's not really cross site as I am calling the same site. I don't have an option to redirect the entire page to https. Is there a proper way to implement this request? Sergey p.s. (sorry if this is a dumb question, I am a JavaScript newbie) I had to develop a word game for a class project. The final is revolving around this class project but I was marked down some points for this project. I need to find out what I did wrong so I can pass my Final Exam. The program passed Google Chrome and Safari, but the teacher said it didn't pass Firefox Error Console. Any pointers will help. <html> <head> <title> Project </title> <script type="text/javascript" src="http://balance3e.com/random.js"></script> <script type="text/javascript"> function GetLetter() // Assumes: There are 5 letters // Results: Returns a single letter { var letter letter = RandomOneOf(['a', 'e', 'l', 'm', 'n']); return letter; } </script> <script type="text/javascript"> function GetWord(lastLetter) // Assumes: There is a letter the user has selected // Results: Returns a four letter word ending with the letter the user has selected { var word lastLetter = document.getElementById('lastLetter').value word = ''; l = 0; while (l < 3) { word = word + GetLetter(); l = l + 1; } return word + lastLetter; } </script> <script type="text/javascript" src="http://balance3e.com/random.js"></script> <script type="text/javascript"> function CheckWord(word) // Assumes: The user entered a word // Results: Will check to see if the word matched the winning word { var cWord cWord = false; if (word=="lane" || word=="lean" || word=="mama" || word=="meal" || word=="name") { cWord = true; } return cWord } </script> <script type="text/javascript"> function trytowin() // Assumes: The user returned a true or false answer // Results: Will Check to see if the user has won or lost { var word, t = 0; document.getElementById('winningWord').value = ""; document.getElementById('winLoss').value = 'Lose'; document.getElementById('lowords').innerHTML = ''; valid = false; while (t < 20 && valid == false) { word = GetWord(lastLetter); valid = CheckWord(word); document.getElementById('lowords').innerHTML = document.getElementById('lowords').innerHTML + word + '<br>'; t = t + 1; if (valid == true) { document.getElementById('winningWord').value = word; document.getElementById('winLoss').value = 'Won after ' + t + ' times!'; } } } </script> </head> <body> <p> Your word is: <input type="text" id="winningWord" size=10><br> You: <input type="text" id="winLoss" size=20><br> Type in a letter chosen from a,e,l,m,n <input type="text" id="lastLetter" size=2 value=""> Press the button to get a word ending with that letter and see if you won<input type="button" value="Try to Win!" onclick="trytowin();"> <hr> <div id="lowords"></div> </body> </html> how can I get my custom markers to show? I have got my code in place, everything works except, doesn't show my custom marker?! here is my code: Code: <script type="text/javascript"> //<![CDATA[ if (GBrowserIsCompatible()) { // A function to create the marker and set up the event window // Dont try to unroll this function. It has to be here for the function closure // Each instance of the function preserves the contends of a different instance // of the "marker" and "html" variables which will be needed later when the event triggers. function createMarker(point,html) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); marker.image = "images/google-pin.png"; marker.shadow = "images/google-pin-shadow.png"; marker.iconSize = new GSize(90, 70); marker.shadowSize = new GSize(90, 70); markerOptions = { icon:marker }; }); return marker; } // Display the map, with some controls and set the initial location var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(51.3992613899243,-1.32983778443008), 8); // Set up three markers with info windows var point = new GLatLng(51.4769752333875,-2.53517458867092); var marker = createMarker(point,'<div style="width:240px">Some stuff to display in the First Info Window. With a <a href="http:// www.econym.demon.co.uk">Link<\/a> to my home page<\/div>') map.addOverlay(marker); var point = new GLatLng(50.8391656924497,-0.154312843280554); var marker = createMarker(point,'Some stuff to display in the<br>Second Info Window') map.addOverlay(marker); var point = new GLatLng(50.8340528225749,-0.259947032613667); var marker = createMarker(point,'Some stuff to display in the<br>Third Info Window') map.addOverlay(marker); var point = new GLatLng(51.5168824045344,-2.6926718990779); var marker = createMarker(point,'Some stuff to display in the<br>Third Info Window') map.addOverlay(marker); var point = new GLatLng(50.954582894922,-0.145016932400171); var marker = createMarker(point,'Some stuff to display in the<br>Third Info Window') map.addOverlay(marker); } // display a warning if the browser was not compatible else { alert("Sorry, the Google Maps API is not compatible with this browser"); } // This Javascript is based on code provided by the // Community Church Javascript Team // http://www.bisphamchurch.org.uk/ // http://econym.org.uk/gmap/ //]]> </script> I used the Google Internal Site Search script for my site but its search only the index.htm, how can I make it search the entir web site.
hello you wonderful informative folks helped me make a resume site for myself some time ago i have since lost the username for ftp access to the site and remade it with paid hosting instead of free hosting, with my own domain name and everything the old site was number 2 for searching for patrick allard on google, but the new site is far down the list new site: http://patrickallardcomputerwhiz.com/ ive tried contacting the free hosting provider, trying to get him to delete the site or relink it, even giving him the password and offering $10 as i expected the customer service on free hosting isn't top notch does anyone have any ideas on how i might fix this? i have a script that measures the window size and - at this point - only adjusts the width of one css element. first function: Quote: var myWidth = 0, myHeight = 0; function getWindowSize() { if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } // window.alert( 'Width = ' + myWidth ); // window.alert( 'Height = ' + myHeight ); } second function: Quote: //changecss JavaScript Functions by Shawn Olson //Copyright 2006-2008 //http://www.shawnolson.net function changecss(theClass,element,value,sheet) { //Last Updated on October 10, 1020 //documentation for this script at //http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html //ms: 5.5.11 added sheet: you have to point at the stylesheet by number var cssRules; var added = false; var mySheet = document.styleSheets[sheet]; if (mySheet['rules']) { cssRules = 'rules'; } else if (mySheet['cssRules']) { cssRules = 'cssRules'; } else { //no rules found... browser unknown } for (var R = 0; R < mySheet[cssRules].length; R++) { if (mySheet[cssRules][R].selectorText == theClass) { if(mySheet[cssRules][R].style[element]){ mySheet[cssRules][R].style[element] = value; added=true; break; } } } if(!added){ try{ mySheet.insertRule(theClass+' { '+element+': '+value+'; }',mySheet[cssRules].length); } catch(err){ try{mySheet.addRule(theClass,element+': '+value+';');}catch(err){} } } } i call the function in a php script that is to rule out that the server is talking to a mobile device, however, it echos javascript and a document ready function: Quote: $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/android|...(non relevant code)...|zte\-/i',substr($useragent,0,4))) { echo '<link rel="stylesheet" type="text/css" href="1" />'; //the above never happens as i am testing on big screen } else { //echo '<link id="screensize" rel="stylesheet" type="text/css" href="stylesheet.php?cssid=47&mediatype=screen" />'; echo '<script type="text/javascript">'; echo '$(document).ready(function() { getWindowSize(); //ms: these variables come back: myWidth, myHeight if (myWidth >=1225) { changecss(".core-pageWidth","width","1225px",1); } else if (myWidth >1000) { myWidth=myWidth - 20; changecss(".core-pageWidth","width",myWidth+"px",1); } else if (myWidth >910) { myWidth=myWidth - 20; changecss(".core-pageWidth","width",myWidth+"px",1); } }); </script>'; } the changecss() does not work in https but works fine in http. is this to be expected? mario Hi all, I'd like to insert an image with fixed position in all https pages. Is it possible? How? Thank you very much 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. I can access the JS library at http://climbhigh.com/avmws_1011243.js, but not at https://climbhigh.com/avmws_1011243.js. I need to either make that library available via HTTPS, or provide the full path (http://climbhigh.com/avmws_1011243.js) when referencing the JS in my HTML code. The JS library is in the ssl and public_html directories, so it should be able to be accessed. When I manually provide the full path, it defaults back to: avmws_1011243.js. Maybe it's because I am not too familiar with JS but this issue seems simple, I just can't wrap my head around it. I am hoping someone with fresh eyes can take a look. Thanks! i am getting security alert from microsot internet explorer. when i click on image icon,which will open a new window. message which i get is Do you want to view only the webpage content that was deliverd securely? This webpage contains content that will not be delivered using a secure HTTPS connection,which could compermise the security of the entire webpage. YES NO Actualy my application is on https//.... which will call http://... because of that i get this issue. i know i can bypass this with doing some settings in internet explorer. But my client wants me to do through java script coding so that they could not see this message at all. Please give suggestions. Thanks in Advance !! 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. Hey guys so im kind of lost right now. I am trying to import html files directly from a website. How is the best way about doing this? I need to do this over and over again, at least every 2 seconds. My friend said there was a http/https send command or something? Anyone know? 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?
Hello, in clipbucket when I try to upload a big file like 50 Mb at the end uploadify fails to upload and says HTTP error, how can I get more error details to solve this? I have no problem with small files upload, and php settings "max_execution_time, max_post_size, max_upload_size" etc are correctly setted... Thank you! Hello, Please take a look at http://dev.wanderthewest.com/test2_good.html Each of the left links link 1 link 2 link 3 link 4 link 5 simply calls the my_ext_func() JS function (defined in a different IFRAME!). so far, so good. now please also open http://dev.wanderthewest.com/test2_bad.html "link1" here for example shows in my FF the following error: Error: Permission denied for <http://dev.wanderthewest.com> to get property Window.my_ext_func from <http://googleads.g.doubleclick.net>. Source File: http://dev.wanderthewest.com/test2_bad.html Line: 31 and similar ones for link 2 link 3 link 4 link 5 now, what is the difference between test2_bad.html and test2_good.html ? test2_bad.html simply has the ADSENSE code on top of the google map. please look again at the error returned in FF: Permission denied for <http://dev.wanderthewest.com> to get property Window.my_ext_func from <http://googleads.g.doubleclick.net>. in other words http://googleads.g.doubleclick.net doesn't like the fact that I am trying to call a function from another IFRAME (Window.my_ext_func). Do you have any idea how to fix this? I really must use some links that call a JS function defined in a different IFRAME. Thanks a lot for your time. Sorin I have a text box that is updated automatically via a javascript that posts back. It works fine in IE, but not in firefox. I know I call the aspx correctly, because other code work. I tried to insert the URL that I send in the browser, and it returns data. So either the event handler is never called, or else the response is empty in firefox. Any ideas? Code: function CreateReq() { var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } return xmlhttp; } function fetch(){ var xmlhttp=CreateReq(); //alert ("fetch"); xmlhttp.open("GET", "CtrlLoader.aspx?MachinePrefix="+ document.getElementById('LblMachinePrefix').value+ "&RequestTime="+ (new Date()).getTime()+"&method=Refresh",false);//was true xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { document.getElementById('TxtCtrlConsole').value+=xmlhttp.responseText; for (var i=0;i<200;i++) document.getElementById('TxtCtrlConsole').scrollTop=document.getElementById('TxtCtrlConsole').scrollHeight; } } xmlhttp.send(null); } Edit: it appears, that it s the onreadystate function that is never called. I tried adding an alert to it. I also tried init of onreadystatechange before open. No effect for firefox Hi i want to find out the idle time when there is no http request is going on... i dont want to track any mouse or key board events... i dont want that... i read these thread but it is only about screen idle time http://www.codingforums.com/showthre...t=33068&page=2 i am trying to track the time when there is no transaction going between client and server and no http request is sending . if i will get that time then that time i can use to load my additional javascript files... so further transaction of user will become speed up.... i appreciate your help THANKS Does anyone know how to go about getting a function a bit like fckeditor / ckeditor where when you type a full URL into the 'link to' box it automatically removes the 'http://' part on the fly (i.e. as soon as another character after the initial 'http://' is typed), just leaving the user with www.etc.... in the input? I am trying to build something similar, and am a bit lost going through the fckeditor code! Thanks, Neil I'l not good in Javascript and I can't find anything about what I want.. . On a sports website there is a table with our ranking and results. On this site the content is changed weekly, but it stays in the same tables.. . Is it possible to make a javascript to get those tables and put them on my own website so the content will change on my site when the content is changed on the sports site? Please help me, it would save me lot of time.. . THx For example ,There is a "Link" called "go to view" at the bottom of the my page, which is redirecting to http://localhost/test.php . if we use $_SERVER['HTTP_REFERER'] in test.php page It will display the url of the page from which link was clicked. The problem is this my URL can be seen at the target page. This needs to be avoided. How can i do this using javascript ? |