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

simple id related question

Status
Not open for further replies.

786snow

Programmer
Nov 12, 2006
75
Hi,

if I have an array of checkboxes, and I do not give them id. Is it true to say that their id will be automatically

check_all[0] & check_all[1], or this has notning to do with id, this just way to use them, since it is an array

2. is it necessray to give id to text boxes, checkboxes etc?

*************

<TR>
<td><INPUT TYPE=checkbox NAME=check_all VALUE=E >
<b>Select all documents</b></td>
</TR>
<tr>
<td><input type="checkbox" name="check_all"
value="E"/ > Account statements </td>
</tr>
 
1. No, id will never automatically default to anything.
2. Check boxes need name and value to be parsed successfully on the receiving page. They do not require an id for that.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
ID is mainly used for CSS styling and scripting.

The only HTML code that I can think of that needs ID is <label> for the "for" attribute.

[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top