Current location: Hot Scripts Forums » General Web Coding » JavaScript » dynamically create table


dynamically create table

Reply
  #1 (permalink)  
Old 11-18-09, 04:30 PM
anvi123 anvi123 is offline
New Member
 
Join Date: Nov 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
dynamically create table

hi all,

I have below table

HTML Code:
<TABLE id=tblGrid cellSpacing=0 cellPadding=0 border=1>
<TR class="rowHeader">
<td>
<html:text property="name" style="WIDTH: 20px"/>
</td>
</tr>
<TR>
<td>
name	
</td>
</tr>

</table>
Reply With Quote
  #2 (permalink)  
Old 11-18-09, 04:36 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
It would be a big help to people here if you mentioned what sort of problem you're having, or what the issue is, or what the question is. Otherwise all we can do is guess at what it is that you might want.

Quote:
Originally Posted by anvi123 View Post
hi all,

I have below table
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
  #3 (permalink)  
Old 11-18-09, 05:23 PM
anvi123 anvi123 is offline
New Member
 
Join Date: Nov 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
dynamically create a table

I want to create a table dynamically like below using javascript, if I click the button.

Code:
name   
jhon

empno    dept 
111           rrrrr
can ayone helps me with examples?

Last edited by anvi123; 11-18-09 at 05:29 PM.
Reply With Quote
  #4 (permalink)  
Old 11-18-09, 09:22 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
This looks like homework.
Reply With Quote
  #5 (permalink)  
Old 11-18-09, 11:45 PM
anvi123 anvi123 is offline
New Member
 
Join Date: Nov 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
add a table dynamically

Hi all,

Whenever I click the button addtables()....it has to keep on adding tables dynamically as many as the user wants.
like below


Is it possible to keep on adding a existing table like below.. whenever the use clicks addtables() button using javascript?

for example I have a table like below.. whenever user clicks the addtable button. It should keep onadding tables.

Code:
Empno  dept city

111      IT    ny

Empno  dept city

111      IT    ny

Empno  dept city

111      IT    ny
so on........

Code:
<table>
<table width =20%  border =1, cellspacing =0 cellpadding = 0>
<tr>
<td>
EMPno
</td>
<td>
dept</td>
<td>
city
</td>
</tr>
<tr>
<td>
html:text property="empno"
style="WIDTH: 20px" />
</td>
<td>
html:text property="dept"
style="WIDTH: 20px" />
</td>
<td>
html:text property="city"
style="WIDTH: 20px" />
</td>

</table

</table>
Is it possible with javascript?

Could you please send me the examples?

thanks
Reply With Quote
  #6 (permalink)  
Old 11-19-09, 02:21 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
I've never seen this notation before.

HTML Code:
<td>
html:text property="dept"
style="WIDTH: 20px" />
</td>
I would expect something like this:

HTML Code:
<td style="width:20px">dept</td>
Yes it is possible with javascript, but I don't think it is practical.
Reply With Quote
  #7 (permalink)  
Old 11-19-09, 07:07 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by wirehopper View Post
I've never seen this notation before.

HTML Code:
<td>
html:text property="dept"
style="WIDTH: 20px" />
</td>
It's a Struts ActionForm tag: StrutsTags - Struts Wiki

anvi123, you're either in the wrong forum (you probably want to be in the Java forum), or you're trying to use Struts in a way I'm not familiar with.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
  #8 (permalink)  
Old 11-19-09, 07:24 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
The missing < confused me.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax Error Nikas Database 4 05-15-08 10:48 AM
MYSQL database countll Database 2 06-19-07 04:20 PM
What do you think of my database structure? Oskare100 Database 5 12-27-06 07:43 AM
Help - Dynamically create a table using PHP pink-fairy PHP 3 03-07-05 07:19 PM
Newbie MySQL fccolon PHP 2 03-16-04 10:54 AM


All times are GMT -5. The time now is 01:58 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.