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!

forms and JS

Status
Not open for further replies.

gus121

Technical User
May 9, 2002
298
GB
Hi I wish to disable/enable HTML form elemnts in an ASP application.
Is it possible access the content of html form with javascript by using anything other than the forms name attribute. For example is it possible to use the ID attribute in a form html tag to identify different form elements.

<script>
document.formname.elementname.disabled
</script>

<input type=&quot;checkbox&quot; name=&quot;Option22&quot; id=&quot;chk1&quot;>

or is it possible as in this example i found on the net to have multiple name attributes for one form element?

<input name=&quot;test2&quot; type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;B1&quot;>

thanks

Angus
 
bad idea to have multiple names on the same element.

=========================================================
while (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top