• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

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
0
Tom Knowlton
Asked:
Tom Knowlton
  • 3
  • 2
2 Solutions
 
leakim971PluritechnicianCommented:
0
 
Tom KnowltonWeb developerAuthor Commented:
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;">
0
 
leakim971PluritechnicianCommented:
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
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
haloexpertsexchangeCommented:
you are not going to see the changes with a normal view source.
To changes that javascript does you need to see the generated source.
I have firefox and something called web developer and when I right click to view source I can go to something called web developer->view source->generated source and that shows all changes that have happened because of javascript
0
 
Tom KnowltonWeb developerAuthor Commented:
>>>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!
0
 
Tom KnowltonWeb developerAuthor Commented:
thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now