Solved

get name attribute value

Posted on 2014-07-17
7
211 Views
Last Modified: 2014-07-19
http://jsfiddle.net/sevensnake/UugWW/133/

I like to get the name attribute value.
I will use it to pass it .

so if I need id comment I can get the name attribute value from it.
0
Comment
Question by:sevensnake77
  • 3
  • 2
7 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40202717
Confused what you are trying to get, there are no inputs or text type elements in the fiddle.
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 40202744
http://jsfiddle.net/sevensnake/UugWW/135/


Ok get the name value of the textarea. for example if i want id=Comments2 name value only  and pass it to my textbox.
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 40202753
so it will look like this.
http://jsfiddle.net/sevensnake/UugWW/139/
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 58

Accepted Solution

by:
Gary earned 250 total points
ID: 40202774
If you want to get the name value of element with a specific ID then use

$("#Comments2").attr("name")

http://jsfiddle.net/UugWW/144/

Else it is still not making sense
0
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 250 total points
ID: 40202778
to get the name attribute : .attr("name")
example :

var name = $("#yourId").attr("name");

Open in new window

0
 
LVL 9

Author Comment

by:sevensnake77
ID: 40202785
yeah couldn't think of the syntax.  Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now