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

    Join Date
    Jun 2000
    Posts
    2
    Rep Power
    0
    Hello,
    this is a bit of a complicated one.
    My site has a frameset with two frames. One of the pages in one of these frames opens a new window. The user clicks on a button that calls a script located in the frameset document. - i have been calling this script with pener.timer();
    - but the function will not run. (it does in fact run on my own pc, but not when i upload it to the server!!)
    is this the correct way of calling this function, because i suspect that opener is the page that opened the window and not the parent frameset.
    i tried putting the function in the page that does open the window and this didnt work either!

    any help here would soothe my troubled brain.

    splendid bob http://www.robertoates.inuk.com
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Posts
    84
    Rep Power
    15
    Put the script in one of the pages that loads in the frames. In the new window reference it as such.

    window.opener.parent.framename.timer();

    "framename" will be the name you assigned to the frame the script resides in.

    Spookster
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    81
    Rep Power
    14
    Alternatively, save the script as a separate *.js file on the server (without any HTML tags) and call it from what ever page you desire.

    <SCRIPT src="myfile.js"></SCRIPT>

    Russ

    [This message has been edited by rkmarcks (edited June 15, 2000).]
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    2
    Rep Power
    0
    thanks guys. as it turned out it was ok to call the fn as opener.timer(), the problem was actually elsewhere!
    i didnt pick up on it because i had so much stuff going on - functions dotted about all over the place!

    splendid bob

Similar Threads

  1. syntax error : identifer 'Hole'
    By bootrecker in forum C Programming
    Replies: 2
    Last Post: February 2nd, 2004, 08:08 AM
  2. External JavaScript file from within a JavaScript function?
    By DKDiveDude in forum JavaScript Development
    Replies: 10
    Last Post: August 19th, 2003, 03:24 AM
  3. delimiting javascript
    By scream in forum JavaScript Development
    Replies: 3
    Last Post: August 15th, 2003, 04:03 PM
  4. getting javascript error when using PHP and javascript
    By Dalamar in forum JavaScript Development
    Replies: 8
    Last Post: December 17th, 2001, 07:41 AM
  5. IE Javascript security hole
    By paul_g in forum JavaScript Development
    Replies: 4
    Last Post: November 28th, 2001, 03:08 AM

IMN logo majestic logo threadwatch logo seochat tools logo