General discussion

Locked

Javascript

By amd_ghouse ·
Dynamically how to change the src value of the frame tag with in frame set in java script

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Javascript

by GeoffreyC In reply to Javascript

Make sure you name the frame:
<frame name="myTop" src="first.html">
In the JavaScript use:
parent.myTop.location='Second.html';
You can use this in <A HREF="javascript:location='menu.html';parent.myTop.location='Second.html';">
The first location is for if you are calling from a different frame, and should be set to the original content if you want to keep it there.
You can use it in the same way in a <script> block:
parent.myFrameName.location="newPage.html"

Collapse -

Javascript

by amd_ghouse In reply to Javascript

The question was auto-closed by TechRepublic

Collapse -

Javascript

by Cedric King In reply to Javascript

You don't need to change the Src value in the frame tag. You can just direct the desired page into the desired frame by pointing to it just like an element. With Javascript, write the following and runs it when you want to change the Src :
document.FrameName.location = "Desired.html"

Collapse -

Javascript

by amd_ghouse In reply to Javascript

The question was auto-closed by TechRepublic

Collapse -

Javascript

by amd_ghouse In reply to Javascript

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums