Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

change <form> attributes

http://jsfiddle.net/knowlton/f7z63/4/

How do I change the name attribute of my form?

HTML:
<form name="smith"></form>

jquery:

$('form').attr("name", "hoowah");   ////////////  DOES NOT WORK
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tom Knowlton

ASKER

When I try this for my asp.net page --  and I do a "View Page Source" ...   the form name has not changed.  It still says:

<form name="aspnetForm" method="post" action="default.aspx" id="aspnetForm" style="background-color: #E1DFDB;">
use firefox or chrome, right click on the first field and choose << inspect element >>
else you just see the original content not the modified content
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>>use firefox or chrome, right click on the first field and choose << inspect element >>
else you just see the original content not the modified content
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Ahhh -- yes -- I see the change.

Thanks!
thx