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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHTML and Table 2

Status
Not open for further replies.

iooo

Programmer
Dec 27, 2000
31
CA
Hi
I wanted to know how can i display data in columns without using frames
 
if you're asking how to make a table, you can use this example:

<table border=1>
<tr><!--new row1 -->
<td>hi i am in row1, colunm1<td><!--new column-->
<td>hi i am in row1, colunm2</td><!--new column-->
</tr><!--end row1 -->
<tr><!--new row2 -->
<td>hi i am in row2, colunm1<td> <!--new column -->
<td>hi i am in row1, colunm2</td><!--new column-->
</tr><!--end row2 -->
</table>

if you're asking how to edit the values in the table, you can give the cells an id like so (IE4+ || NS6 only):

<td id=&quot;luc&quot;>hi i am in row2, colunm1<td>

luc.innerHTML=&quot;some text or html&quot;


jared@aauser.com
 
Hi

I wanted to display a Table Dynamically on the web page in 2 columns
Eg:

column1 column2
data1 data2

I tried with the following code but it did not work
FORM1.Document.body.insertAdjacentHTML &quot;BeforeEnd&quot;, _
&quot;<table>&quot;
FORM1.Document.body.insertAdjacentHTML &quot;BeforeEnd&quot;, _
&quot;</table>&quot;

and with
document.body.outerHTML = &quot;<Table border = 100>&quot;
document.body.outerHTML =&quot;</Table> &quot;

but it did not give me any result
it would be great if some one could help me with it
Thanks

 
HI

what is the difference between
insertAdjacentHTML,OuterHtml and innerHtml

Thanks
 
innerHTML:

Sets or retrieves the HTML between the start and end tags of the object.

outerHTML:

Sets or retrieves the object and its content in HTML.

(more info/examples: )

insertAdjacentHTML:

Inserts the given HTML text into the element at the location.

(more info/examples: )

jared@aauser.com
 
Hi

I wanted to display a Table Dynamically on the web page in 2 columns
Eg:

column1 column2
data1 data2

I tried with the following code but it did not work
FORM1.Document.body.insertAdjacentHTML &quot;BeforeEnd&quot;, _
&quot;<table>&quot;
FORM1.Document.body.insertAdjacentHTML &quot;BeforeEnd&quot;, _
&quot;</table>&quot;

and with
document.body.outerHTML = &quot;<Table border = 100>&quot;
document.body.outerHTML =&quot;</Table> &quot;

but it did not give me any result
it would be great if some one could help me with it
Thanks



 
1.why do you have _'s in your code

2. insertAdjacentHTML is a method, sou use ()'s:

.insertAdjacentHTML(&quot;BeforeEnd&quot;,&quot;<table>&quot;)
jared@aauser.com
 
Hi

I tried with what u said
.insertAdjacentHTML(&quot;beforeend&quot;,&quot;<table>&quot;)
it did not work
just now i saw a article with DOM .do u have an sample code ??
thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top