Closed Thread Icon

Preserved Topic: document.write and tables (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18232" title="Pages that link to Preserved Topic: document.write and tables (Page 1 of 1)" rel="nofollow" >Preserved Topic: document.write and tables <span class="small">(Page 1 of 1)</span>\

 
jstuartj
Bipolar (III) Inmate

From: Mpls, MN
Insane since: Dec 2000

posted posted 08-12-2001 06:36

In javascript can you use document.write to create tables.

I need to create a dynamic table based on the input from a form.

Are there any example out there.

jstuartj


Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 08-12-2001 06:44

Yes, you can doc write tables. Shouldn't be any different that using Document.Write for anything else....

document.write("<table cellpadding=0 cellspacing=0 border=0 width=100%>");
document.write("<tr><td>" + blah + other_blah + "</td></tr>");
document.write("</table>");

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 08-13-2001 04:34

...and due to an extremely obscure bug in Internet Explorer 5 for the Mac, you need to include a newline character, "\n", after the end table tag...

document.write("</table>\n");

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 08-13-2001 09:13

Bugimus, can writeln be used instead of write in that case (so that "\n" doesn't have to be added)?



[This message has been edited by mr.maX (edited 08-13-2001).]

jstuartj
Bipolar (III) Inmate

From: Mpls, MN
Insane since: Dec 2000

posted posted 08-15-2001 01:19

Thanks for the example. I rewrote my section of code and worked just fine this time. I must have just been missing something stupid...


jstuartj



« BackwardsOnwards »

Show Forum Drop Down Menu