Google map not working till refresh web address: http://mobile.smartagent.co.nz/users/348/properties when you click on the properties, the map can't display, it will display if you refresh the page. any idea why and how to fix it thanks in advance!
Look at the javascript console and find the missing file - and get that link sorted out. Then refresh and check the new errors.
Hi there, all the problem you mention sorted, but still got the same problem, can not show the map unless refresh any more help please?
I don't know how to fix them undefined is not a function, no idea where is the undefined photoswipe for the photos slideshow, it working fine on the website initialize is not defined, it working ok on html using the same script within the <body>. no idea why need define on jquery
doing the digging for you... I looked at line 56 of your source and find this <script type="text/javascript"> $('a').live('click', function() { var $this = $(this); if ( !$this.attr('rel') || $this.attr('rel') != 'external' ) $(document.getElementById( $this.attr('href') )).remove(); }); </script> Code (markup): I would suggest it should have a document ready wrapped around it <script type="text/javascript"> $( document ).ready(function() { $('a').live('click', function() { var $this = $(this); if ( !$this.attr('rel') || $this.attr('rel') != 'external' ) $(document.getElementById( $this.attr('href') )).remove(); }); }); </script> Code (markup): Why is the document ready inside a function in this? (function(window, $, PhotoSwipe) { $(document).ready(function() { $("#gallery a").photoSwipe( { enableMouseWheel: false, enableKeyboard: false }); $("#gallery a:first").click(); }); }(window, window.jQuery, window.Code.PhotoSwipe)); Code (markup):
the script you mention is for photoswipe, I did change to have a document ready wrapped around it, but nothing change, I also deleted both script you mention that will affect the map, now the map still can't display could you have another digging for me please? if you go to the website again now, it won't have those script there .
You should have probably fixed your code rather than just removing it. You still get an error with <body style="margin:0px; padding:0px;" onload="initialize()"> Code (markup): Is initialize meant to initialize the maps? when I click on a property I get this error Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened. js?sensor=false&_=1403840728457:8 Code (markup): That relates to this code function getScript(src) { document.write('<' + 'script src="' + src + '"' + ' type="text/javascript"><' + '/script>'); } Code (markup): I'm not a jquery expert but I do know that it offers 2 vastly superior ways to load scripts. So long as you've got it loaded you might as well use it var scriptpathandname = '/folder/file.js'; $.ajax({ url: scriptpathandname, dataType: "script", cache: true }).done(function() { console.log( 'Done: '+scriptname); // Success }); Code (markup): or $.getScript( "/folder/file.js", function( data, textStatus, jqxhr ) { console.log( textStatus ); // Success console.log( jqxhr.status ); // 200 }); Code (markup):
sorry, my level is not high enough to understand all what you say do you mean I got to add the script in the <head> or <body> part?
So you are just editing this code, you didn't write it? Are you able to get the original guy to help? Or hire someone locally who can come in and show you the ropes?
yes, I just editing the code, I get the code on line, can't find the original guy. that's why I try to get someone help to fix it here, I thought it's a simple fix as ithe map just need to refresh to display. could you give me another tips please?