Results 1 to 3 of 3

Thread: add a table to document.write

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2002
    Location
    Hampton Beach
    Posts
    513

    Question add a table to document.write

    This displays the image under my text...
    Ex:
    News Flash
    Img

    I want to put this img to appear after my text. Text will appear in cell1 and right next to into a split cell will display the img..
    Ex:
    News Flash Img

    how can I modify this line to do this:

    document.write("<IMG SRC='"+pics[thenum]+"' border='0' width='"+pic_width+"' height='"+pic_height+"' name='img1'>\n");

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2002
    Location
    Hampton Beach
    Posts
    513
    I modified my code:

    document.write(' <table border="1" width="100%">');
    document.write(' <tr>');
    document.write(' <td width="50%">Bureau of Child</td>');
    document.write(' <td width="50%">Development</td>"');
    document.write(' <tr> ');
    document.write(' </table>');

    How Do I add this line to 4th line of my code?

    Add THIS:

    document.write("<IMG SRC='"+pics[thenum]+"' border='0' width='"+pic_width+"' height='"+pic_height+"' name='img1'>\n");


    TO THIS:
    document.write(' <td width="50%">Development</td>"');

  3. #3
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    Code:
    document.write(' <td width="50%">Development<IMG SRC='"+pics[thenum]+"' border='0' width='"+pic_width+"' height='"+pic_height+"' name='img1'></td>"');
    does that not work?

    edit: maybe it should be this:
    Code:
    document.write(' <td width="50%">Development<IMG SRC="'+pics[thenum]+'" border="0" width="'+pic_width+'" height="'+pic_height+'" name="img1"></td>');
    Have I helped you? Please Rate my posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width