Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open HTML file with Javascript?

Status
Not open for further replies.

Dummy99

Programmer
Apr 25, 2002
30
0
0
FR
I have a "Menu" frame and a "Main" frame.
At the start, "MyMenu.html" gets opened/displayed in "Menu" frame and "MyHomePage.html" gets opened/displayed in "Main" frame.

By clicking "Log-In" in the "Menu" frame, the user gets a Log-In form in the "Main" frame.

Upon completeing & submitting the Log-In form, "MyNewMenu.html" gets opened/diplayed in the "Menu" frame (replacing "MyMenu".html).

If the user clicks "Home" in "MyNewMenu", the original "MyMenu" gets opened/displayed in the "Menu" frame.
This is easily done by using:

<a href="MyMenu.html" target="menu">Home</a>

At this point I also want the original "MyHomePage.html" to be opened/displayed in the "main" frame but I don't know how to do this.

I thought of having a Javascript funtion in "MyMenu" with
a "onload="MyLoading()" in the "body" tag where the function
would open "MyHomePage.html" Target="Main" but I don't know the code for this file opening and I can't find any references for this.

Can you help? Not only would I like to know the code but also where I can find references for such code.

Many thanks.

 
You'll find that most web designers now stay away from frames because there are more modern ways of doing things. I recommend that you consider redesigning your web page(s) without frames.

Also, the "mymenu.html" and other pages and functions starting with "my" will give the idea that this is some kind of school assignment. Your site and your questions will be evaluated as more professional if you give more professional-sounding names to your design,

Without seeing the actual code, it's difficult to figure out what you have and why it's not working the way you want.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top