Solved

How to search hidden control inside a jquery control

Posted on 2009-05-09
1
365 Views
Last Modified: 2012-06-27
I have a dialog that contains a grid.

I was trying to set the hidden value using the $('hiddenInputName').val('avalue') and get it using val method with no parameter but it does not seem to work.

I resolved back in doing it in document.getElementById('hiddenInputName').value = 'avalue'.

Is there a way to do it in jquery?
var abc = target.get(0).textContent;
 

// The jquery method Im trying

$('hiddenInputName').val(selectedKatasiki);
 

// The old style javascript that works

document.getElementById('hiddenInputName').value = abc;

Open in new window

0
Comment
Question by:napoleontan
1 Comment
 
LVL 12

Accepted Solution

by:
alien109 earned 500 total points
ID: 24343494
To select and element by id in jQuery, you'll need to include the "#"

$('#hiddenInputName').val(selectedKatasiki);
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
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…

744 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

10 Experts available now in Live!

Get 1:1 Help Now