About frames
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   prads_gupta
Posted On:   Monday, February 11, 2002 11:42 PM


Hi,

I am facing a problem in doing this, please tell me. I have a web page with three frames and on cliking a button in one frame, i want to display some text in both the remaining frames, how can it be possible.

Thanks & Regards,
Prads

Re: About frames

Posted By:   Firat_Tiryaki  
Posted On:   Wednesday, February 13, 2002 02:08 PM

Be careful creating objects in other frames in IE . IE is only able to create objects when a function is called in the frame that will create the object...

Re: About frames

Posted By:   Firat_Tiryaki  
Posted On:   Wednesday, February 13, 2002 02:05 PM

for this kind of thing calling a function on the other frames can be useful



window.frames[1].writeMyDocument();

Re: About frames

Posted By:   Firat_Tiryaki  
Posted On:   Wednesday, February 13, 2002 02:03 PM

you can access the frames by window's frames object



just as the select object the first frame is window.frames[0] second is window.frames[1]...

Re: About frames

Posted By:   Nitesh_Naveen  
Posted On:   Tuesday, February 12, 2002 02:34 AM

From one frame to access any other frames you can use the document.frames object. For eg. if you have 3 frames... from frame1 you can access frame 2 by document.frames[1] or document.frames[frameName] and frame 3 by document.frames[2].
You can write to the document of another frame by using
 document.frames[frameName].document.write("String to be written");
Or you can have a Div tag inside each frame's htms and use

//In Netscape
parent.frames[frameName].document.divId.document.write("String you need to write");
// Or In IE as
parent.frames[frameName].document.all[divId].innerHTML = "String you need to write";
About | Sitemap | Contact