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!

Write to layers, PLEASE HELP

Status
Not open for further replies.

maybe

Instructor
Jul 11, 2001
14
0
0
GB
Can any body tell me and point me in the right direction.

Is it possible to write to a scrollable area, so onMouse Over I can just change the content without having the link to other pages.

Thanks in advance.
 
hi

here is one of the solutions:

<span id=daOne style=&quot;position:absolute&quot;></span>-relative if u want 2 put it into the table

ie4x:
if (document.all)
document.all.daOne.innerHTML='new content'
ie5x, nn6:if (document.getElementById) document.getElementById(&quot;daOne&quot;).innerHTML='new content'

or use DOM (for DOM browsers)
textnode = document.createTextNode(&quot;some text&quot;);
document.getElementById(&quot;span1&quot;).appendChild(textnode);


nn4x:
if(document.layers){
with (document.layers.daOne.document){
open()
write('new content')
close()
}
}

but i'd suggest you to use layers for netscrap..

known bugs: netscrap & layers/divisions/spans/whatever.. scraps everything onresize, that's why you should reload onresize..


another solution:

use iframe (DOM objects & ie4+)

iframe - floating frame..

top.frames.iframeid.src=&quot;newfile.htm&quot; - for ie4x (& for dom, i guess..)
& for dom:
document.getElementById(iframename).src=&quot;newfile.htm&quot;

for nn - you can load new files into the layers (layer tag, div & span tags with position attribute):
document.layers.layername.src=&quot;newfile.htm&quot;
or
document.layers.layername.load(width,&quot;newfile.htm&quot;) where width is a number..
Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top