Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to search hidden control inside a jquery control

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
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 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)
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…

861 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