Microsoft
Software
Hardware
Network
Question : jquery set value of hidden form field
I have a simple form with a hidden form field:
<input type="hidden" name="test" id="test" value="" />
I'm trying to change the value of this field using jquery, but am not having any luck. There are several posts regarding the inability to get or change a hidden field's value, but there must be a way.
Here is the basic code that I'm using within a function:
$("#test").val("1234");
I've also tried:
$("#test").attr("value","1
234");
and
$("input#test:hidden").att
r("value",
"1234");
Answer : jquery set value of hidden form field
This should work.
<script type="text/javascript">
$(do
cument).re
ady(functi
on(){
$("#test").val("1234");
});
</script>
Random Solutions
Using jquery to hide dynamically added divs
Dual monitor support
Getting Values From Form Controls
VB.Net 2008 Modal MDIChild
Exchange - outgoing messages stuck in SMTP Queue after repair install -
OWA 2007- can you create a URL to the Light client?
How to draw or place an Ellipse on MS Access Report
Scripting vs coding
Application.Width returns wrong size
Using IAS Authentication logs to document VPN User access to network via ASA 5520