Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Inserting text into a page...


Message #1 by "Yoel Pedersen" <y.pedersen@g...> on Sat, 25 May 2002 17:10:22
Hello...

I have a frameset including two frames, leftframe and rigthframe.

In the document located in the frame leftframe I have a script that writes 
a table to the document located in rigthframe.

<script>
function AddTable(){
parent.rightframe.document.writeln("<table><tr><td>Cell 
1<\/td><\/tr><\/table>");
}
</script>

The output generated is:

<table><tr><td>Cell 1</td></tr></table>

Now I want to be able to make a script that inserts a cell above the one 
already created in the table...how can I do that? I want the output to be:

<table><tr><td>New cell generated by the script I am looking 
for...</td></tr><tr><td>Cell 1</td></tr></table>

Thanks in advance,

Yoel Pedersen

  Return to Index