Need to load page twice for javascript to run in IE

Discussion in 'Site Programming, Development and Design' started by DavidLJ, Apr 9, 2011.

  1. I am using a javascript library (Googlemaps) on my site www.dljsoftware.co.uk/golf/Layout.aspx. The page works correctly on my development system using the VS2008 built in webserver. When I upload it to my Winhost site, it works correctly if viewed in Firefox or Chrome, but using IE8 some of the javascript does not run initially (there are no markers displayed on the map). If I then reload the page (from the menu control), the page displays correctly.

    I tried getting help from the Googlemaps forum, and it was suggested that I use a diffreent version of the Googlemaps library. This did not work, and I wonder if it is something to do with the timing that the code loads, as the code does run correctly when I reload it.

    Can anyone suggest anything that I could try.

    David
     
    Last edited by a moderator: Oct 14, 2015
  2. Ray

    Ray

    Try setting your domain name as one of the trusted sites on your IE 8 security settings. Should be under Tools/Internet Options/Security.
     
  3. Thanks, Ray

    Unfortunately, this does not make any difference, and it would not solve my problem as the site is intended for public access. It is just very wierd that the script to display the markers runs correctly when I reload the page, so I do not think it can be anything to do with security rights.

    The page uses an update panel to give a partial postback on changing the grid, and at the same time runs the javascript function pageLoad. Could it be some conflict with the update panel?, but again why does it work when I reload the page,and why does it work in Firefox and Chrome.

    I have a similar problem for another page which I wrote some while ago. This used to display properly, but now requires reloading. I have not changed any coding on the page, so has ther been some update to the Net Framework 3.5, which might be relevant.

    Your help is appreciated
    David
     
  4. Ray

    Ray

    It really sounds like a browser compatibility issue. Also try setting the compatibility mode in IE and see if that helps.
     

Share This Page