Cross Frame Scripting
Results 1 to 6 of 6

Thread: Cross Frame Scripting

  1. #1
    Join Date
    Jan 2002
    Location
    Newcastle, England
    Posts
    30

    Cross Frame Scripting

    I have a web that is split into two rows, 90% and 10%. The 10% page at the bottom has a button in it that when clicked loads a html page. The trouble is it loads the page into the frame at the bottom of the screen but I want it to load the page in the entire browser window! Does anyone know how I can do this?

    The purpose of this is that the top frame is full of questions with radio buttons for answers. I would like this button to refresh the page and uncheck all the answers.

    I'll put the code I'm using at the end of the post.

    Thanks in advance,
    Ross.

    function goToURL()
    {
    window.location = "index.html";
    }

    .
    .
    .

    <INPUT TYPE="button" NAME="clear" VALUE="Start Again" onClick="goToURL()">

  2. #2
    Join Date
    Dec 2000
    Location
    Leeds, England
    Posts
    1,675
    Hi Ross

    I think you need to set the Target attribute to _Top so the full document is displayed. Not too sure though.
    I got the above from THIS link.

    Hope it helps and please post back if not!

    [Mo]

    ------------------
    "You Are The Weakest Link...Goodbye!"
    Moderator at AmazingTechs

  3. #3
    Join Date
    Mar 2002
    Location
    Southampton, UK
    Posts
    72
    try document.location instead of window.location

    this may or may not work. i guarantee nothing!

    i think that's where your problem is though.

    si

  4. #4
    Join Date
    Mar 2002
    Location
    Southampton, UK
    Posts
    72
    sorry to double post....

    if you're just looking to clear the form could you not use a reset button?

    <INPUT TYPE="reset" NAME="clear" VALUE="Start Again">

    si

  5. #5
    Join Date
    Jan 2002
    Location
    Newcastle, England
    Posts
    30
    Thanks for the replys. Thats a good link you posted goldust, some interesting reading.

    However, I still cant get this cross frame scripting working :-(

    Anyone else have any ideas?

    [EDIT]
    Have it working now! The asnwer was in that link all along goldust, just too tired to spot it the first time.
    [/EDIT]

    Also, could anyone recommend a good HTML book?

    Thanks again
    r8sso

    [This message has been edited by r8sso (edited 03-20-2002).]

  6. #6
    Join Date
    Nov 2001
    Location
    The Dairy State (moo)
    Posts
    1,238
    First of all, on the page where you declare the FRAMESET, you have to give each frame a "NAME=" attribute.

    Then, when you want to link to that frame, add a "target=framename" in the link

    Hope that helps!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •