How to set frames urls programatically

Posted by Goldytech under JavaScript category on | Views : 1827
Suppose in the page you have 2 frames
a left frame and right frame.
If you want interactively to fill the frame url with user response. This is the way of doing it.

function fillLeftFrame() {
newURL = prompt("Enter the URL of a document to show in the left frame:","")
if (newURL != null && newURL != "") {
parent.frames[0].location = newURL

Comments or Responses

Login to post response