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

print or output the value of textfield within the table

Status
Not open for further replies.

miks

MIS
Sep 27, 2002
13
CH
hi guys!
im having a hard time outputting the value of a textfields 'text1' and 'text2' from table 'listTable' within table 'listTable2'...the two table are within the same form...below are the codes...maybe you could help me...THANX!!!


<html>
<head>
<title>Printing With Excel</title>
</head>
<body bgcolor=&quot;#FFFFFF&quot;>
<form>
<table name=&quot;listTable&quot; id=&quot;listTable&quot; width=&quot;98%&quot; border=&quot;0&quot;>
<tr>
<td colspan=&quot;3&quot;>
<div align=&quot;center&quot;><b>MAINTAIN CLIENT</b></div>
</td>
</tr>
<tr>
<td width=&quot;14%&quot;>&nbsp;</td>
<td width=&quot;62%&quot;>&nbsp;</td>
<td width=&quot;24%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;14%&quot;><b>Client No.</b></td>
<td width=&quot;62%&quot;><b>
<input type=&quot;text&quot; name=&quot;text1&quot; size=&quot;15&quot;>
</b></td>
<td width=&quot;24%&quot;><b> </b></td>
</tr>
<tr>
<td width=&quot;14%&quot;><b>Client Name</b></td>
<td width=&quot;62%&quot;><b>
<input type=&quot;text&quot; name=&quot;text2&quot; size=&quot;40&quot;>
</b></td>
</tr>
</table>

<table name=&quot;listTable2&quot; id=&quot;listTable2&quot; width=&quot;98%&quot; border=&quot;0&quot;>
<tr>
<td colspan=&quot;3&quot;>
<div align=&quot;center&quot;><b>MAINTAIN CLIENT</b></div>
</td>
</tr>
<tr>
<td width=&quot;14%&quot;>&nbsp;</td>
<td width=&quot;62%&quot;>&nbsp;</td>
<td width=&quot;24%&quot;>&nbsp;</td>
</tr>
<tr>
<td width=&quot;14%&quot;><b>Client No.</b></td>
<td width=&quot;62%&quot;><b>
//value of text1 here
</b></td>
<td width=&quot;24%&quot;><b> </b></td>
</tr>
<tr>
<td width=&quot;14%&quot;><b>Client Name</b></td>
<td width=&quot;62%&quot;><b>
//value of text2 here
</b></td>
</tr>
</table>

<input type=button value=Print onClick=&quot;rewrite(this.form)&quot;>
</form>

 
Try putting a name attribute on the form (e.g. <form name=&quot;myform&quot;>) and then reference the fields by document.myform.text1.value and document.myform.text2.value. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top