how to visit the iframe in frameset

Z

zhanye815

This problem is this:a page is made up of frameset, but i can't visit
the iframe(inline frame) of the frame in the framset.just like the
frameset have 3 frames,the third frame have a iframe(inline frame) .how
to ?Thank you for help.
 
M

Martin Honnen

a page is made up of frameset, but i can't visit
the iframe(inline frame) of the frame in the framset.just like the
frameset have 3 frames,the third frame have a iframe(inline frame) .


What exactly does that mean that you "can't visit the iframe"? Is is not
visible? Do you want your script to access the iframe and change its
contents? You should be able to access
top.frames[2].frames[0].location.href = 'whatever.html';
to load whatever.html in the iframe.
 
Z

zhanye815

thank you Martin,
i have 1.htm that include a iframe named "textedit",the code below work
well,but when i put 1.htm into a frameset ,the code can't do any
effect.


<img src="' onclick="format('Bold')">
<script language="javascript">
function format(command){
var textedit=document.frames("textedit");
var sText = textedit.document.selection.createRange();
if (!sText==""){
if (arguments[1]==null)
textedit.document.execCommand(command);
else
textedit.document.execCommand(command,false, arguments[1]);
textedit.focus();
}
}
</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top