#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    3
    Rep Power
    0
    I have some javascript that loads a page in a frame. Once a page is loaded in that frame, I cannot load another page in that frame with the same command.
    This works in Netscape, but not in IE...

    function goToNew(site) {
    var web = "http://www.intria.com/";
    var webSite = web + month + site;

    if (site=="none") {
    top.frames[1].document.location = "blank.html";
    }
    else {
    top.frames[1].document.location = webSite;
    }
    }

    I get an 'Access is denied' error message.

    I have seen other web sites with similar code an their sites work in my IE, if anybody has an idea how I can fix this, please respond.
    Thanks
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    British Columbia
    Posts
    11
    Rep Power
    0
    The `access denied` error usually happens either because the file doesn't exist or because your path isn`t _exactly_ right -- that is, it's not a permission problem. So make sure there is a blank.html, make your string appear in an alert so you can verify that `website` contains exactly the string you think it does, and perhaps put the string in quotes(?). Looks like you should be able to get something to work the way you're going...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    3
    Rep Power
    0
    Thanks underdog but I just figured it out two days ago...

    // Dependant on what is selected, this opens a page in the bottom frame, according to month and site.
    function goToNew(site) {
    var web = "http://www.thesite.com/pmreport/";
    var webSite = web + month + site;

    if (site=="none") {
    top.frame2.location = "main.html";
    }
    else {
    top.frame2.location = webSite;
    }
    }

    this works because I am no longer assigning to the frame.document, just strictly framename.location.... thanks anyways
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    6
    Rep Power
    0
    The above is correct... the error you're getting is 'cause of security you're not allowed to access the document of a page on another server in IE

Similar Threads

  1. Need help getting JavaScript working in Netscape
    By dpleo in forum JavaScript Development
    Replies: 2
    Last Post: July 29th, 2003, 09:07 PM
  2. image slices not showing correctly in netscape
    By EAD in forum HTML Programming
    Replies: 8
    Last Post: July 15th, 2003, 03:04 PM
  3. Switching Background Images in Netscape with JavaScript...
    By staiano in forum JavaScript Development
    Replies: 2
    Last Post: June 20th, 2001, 09:23 AM
  4. Javascript and netscape help !!!
    By yoshimitsu in forum JavaScript Development
    Replies: 1
    Last Post: June 18th, 2001, 03:04 AM
  5. javascript incorrect in Netscape
    By phreq in forum JavaScript Development
    Replies: 5
    Last Post: June 17th, 2001, 06:23 PM

IMN logo majestic logo threadwatch logo seochat tools logo