471,316 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

how to update a text box

Hi,

I am creating a list of text boxes in a PHP code. like below

<form name=matrix>
<table border=1 width=100%><tr>
<td><input type=text size=3 name=box1-1 value=0></td>
<td><input type=text size=3 name=box1-2 value=0></td>
....
</tr></table>

Now I would like to update this values in each box in th e nd of this page.

How do I do that ?

Any idea? Or is it possible?

Thanks...
Jul 23 '05 #1
2 1260
kak3012 wrote on 22 dec 2004 in comp.lang.javascript:
I am creating a list of text boxes in a PHP code. like below

<form name=matrix>
<table border=1 width=100%><tr>
<td><input type=text size=3 name=box1-1 value=0></td>
<td><input type=text size=3 name=box1-2 value=0></td>
....
</tr></table>
I don't see any PHP
Now I would like to update this values in each box in th e nd of this
page.


<input size='3' name='box1-1' id='box1-1' value='0'>
<input size='3' name='box1-2' id='box1-2' value='0'>
.......
.......
<script type='text/javascript>
document.getElementById('box1-1').value='1';
document.getElementById('box1-2').value='2';
</script>
</html>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #2
On Wed, 22 Dec 2004 16:59:30 +0100, kak3012 <s0*****@student.dtu.dk> wrote:

[snip]
<form name=matrix>
Forms should be identified with an id attribute. Only add the name
attribute if you want backward compatibility with old browsers like NN4.
<table border=1 width=100%><tr>
You need to quote that width attribute value. Validating your pages
(<URL:http://validator.w3.org/>) will catch mistakes like that.

[snip]
Now I would like to update this values in each box in th e nd of this
page.

How do I do that ?


Your question is somewhat vague, but the FAQ
(<URL:http://jibbering.com/faq/>) and the notes
(<URL:http://www.jibbering.com/faq/faq_notes/faq_notes.html>) cover
accessing form controls and their values.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mark | last post: by
5 posts views Thread by Stephen Plotnick | last post: by
5 posts views Thread by explode | last post: by
1 post views Thread by Selvakumar | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.