Click to See Complete Forum and Search --> : How to run a html page in a particular frame?


jschrock
05-20-2003, 02:25 PM
I have little JavaScript experience and thought someone out here can help.

I have a web page that contains three frames (A, B, C for the sake of discussion). during the onload of frame A, I call an init JavaScript function that needs to run/invoke a different html page inside one of the other existing frames C. Can this be done? Can one frame A, tell frame C to run a different html page in himself? Could someone provide a script as an example? Thanks in advance.

Jona
05-20-2003, 02:27 PM
Yes, it can be done using top.frameC.location.href="http://mySite.com/";

khalidali63
05-20-2003, 02:29 PM
put this code in the frames A's html page's javascript code section

parent.frameB.document.location.href = "the pages url that you want ot load"

you can do this once frame A is loaded completely.

jschrock
05-20-2003, 02:31 PM
Ah, thanks for you very fast response!

Jona
05-20-2003, 02:31 PM
You're welcome... Unless you were thanking Khalid. lol, Don't want to take his credit. ;)

khalidali63
05-20-2003, 02:34 PM
:D

No problem here,I volunteer myself here cus I love programming..don't have any problem with who gets the credit..:p

Jona
05-20-2003, 02:36 PM
Cool. Glad you're not... envious... lol I'm sure you're not. You're better than I am. ;)