Solved

How to search hidden control inside a jquery control

Posted on 2009-05-09
1
367 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

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

773 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