Can you populate a <div> after it is defined

liunx

Guest
I want to put a standard layout into an ssi include<br />
eg<br />
<div id=area1><br />
<div id=area2><br />
</div><br />
<div id=area3><br />
</div><br />
</div><br />
<div id=area4><br />
</div><br />
<br />
And the each .shtml file will include this layout<br />
and define the content of these areas.<br />
<br />
Can this be done?<!--content-->Yes you can.<br />
<br />
You've given the <DIV> it's own ID's so you can get them by:<br />
obj = document.getElementById('idOfTheDiv')<br />
Then you can say something like<br />
obj.innerHTML = '<b>This</b> or this'<br />
or work like the DOM model, with nodes en childs.<!--content-->That seems almost like writing a program<br />
or almost similar to<br />
document.write(...........)<br />
for each line<br />
<br />
Not really what I had in mind - I was thinking more like<br />
<br />
<-- include layout --><br />
<br />
<area 1 content<br />
All in standard HTML / XHTML format<br />
end area 1 ><br />
<br />
etc<!--content-->if the html looks ok after the page has loaded then it's fine, so and include would add them in<!--content-->
 
Back
Top