Solved

How to search hidden control inside a jquery control

Posted on 2009-05-09
1
371 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
[X]
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
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

691 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