Click to See Complete Forum and Search --> : Cross Frame Scripting


r8sso
March 20th, 2002, 07:17 AM
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()">

goldust
March 20th, 2002, 11:49 AM
Hi Ross http://discussions.virtualdr.com/smile.gif

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 (http://vgacd.subportal.com/ebiz/build/programming/html/974.htm) link.

Hope it helps and please post back if not! http://discussions.virtualdr.com/smile.gif

[Mo]

------------------
"You Are The Weakest Link...Goodbye!"
Moderator at AmazingTechs (http://url=http://www.forums.amazingtechs.com/cgi-bin/ikonboard/ikonboard.cgi)

si
March 20th, 2002, 12:07 PM
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

si
March 20th, 2002, 12:11 PM
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

r8sso
March 20th, 2002, 06:56 PM
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?


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


Also, could anyone recommend a good HTML book?

Thanks again
r8sso

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

spragers2
March 21st, 2002, 03:09 PM
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 http://discussions.virtualdr.com/biggrin.gif

Hope that helps!