how to deal with value attribute of any element (hidden input in my case)
i have tried with two styles
alert($("#projectManager").attr("value"));
and
alert($("#projectManager").val());
but it returns ‘undefined’.
any help?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Make sure you specify id=”projectManager” on the input field. a ‘name’ attribute is not enough for this selector. And .val() is the way to go to get a field value.