Solved

get name attribute value

Posted on 2014-07-17
7
216 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

I have answered several questions lately that were solved utilizing the power of jQuery's AJAX functions, so I thought I would write an article demonstrating the ease of use. Why should I use jQuery as opposed to regular JavaScript? Now I know…
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
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)

785 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