• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

How to search hidden control inside a jquery control

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
napoleontan
Asked:
napoleontan
1 Solution
 
alien109Commented:
To select and element by id in jQuery, you'll need to include the "#"

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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now