I changed it as you suggested but the value still isn't being set. :(
The funny thing is, when I remove the hidden field, I get a JavaScript
error, so I know it's being referenced properly. Really wierd.
Paul
"Bruce Barker" <br******************@safeco.com> wrote in message
news:%2*****************@TK2MSFTNGP10.phx.gbl...
your client script is wrong. javascript is case sensitive you you are
dynamically creating a "Value" property and setting its value. of cource
this is not posted back. try:
document.forms[0].MyHiddenFieldName.value='something';
-- bruce (sqlwork.com)
"PJ6" <no****@nowhere.net> wrote in message
news:e0**************@TK2MSFTNGP14.phx.gbl... From a control's onkeypress the below javascript snippet is executed. I
am attmpting to set the value of a hidden field... I believe I'd be able
to get the contents of the hidden field by using
"Page.Request.Item(MyHiddenFieldName)" sever-side, no? Unfortunately the
field doesn't look like it's even being set. Is there something special I
need to do?
TIA,
Paul
----------------------------
if (event.keyCode == 13)
{
event.returnValue=false;
event.cancelBubble = true;
document.forms[0].MyHiddenFieldName.Value='something';
document.forms[0].submit();
}