Solved

get name attribute value

Posted on 2014-07-17
7
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

691 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