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 instr to find "&" then replace it with "and"
How do I test for a null value in a datagridview cell
Linux as a Wireless-to-Wireless Router
E-Machines EL1200 BSOD at Startup - Windows XP SP2
Update table basxed on results of query
wordpress php blog
MSSQL OR within many AND's
Help with formula - from excel to VBA
Outlook Folder Size - I need item counts rather than byte counts.
Platter Remover/Exchanger toolkit