Solved

get name attribute value

Posted on 2014-07-17
7
213 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

DOM Attributes and Properties treatment with jQuery 1.6 by Ivo Stoykov jQuery (http://jquery.com/) 1.6 introduces .prop() (http://api.jquery.com/prop/) and .removeProp() (http://api.jquery.com/removeProp/) methods which allow modifying or removi…
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…
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…

911 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

21 Experts available now in Live!

Get 1:1 Help Now