Ginab
Feb 16th, 2005, 08:16 PM
Hi Everyone,
I'm a newbee and need your help on this.
I have this line of code in the page:
Protected WithEvents hdnChecklist As System.Web.UI.WebControls.TextBox
hdnChecklist.Text = "Test"
Button_Submit.Attributes.Add("OnClick", "onSubmit()")
It call the JavaScript func:
<script language="javascript"
function onSubmit(){
if document.Form1.hdnChecklist.text == "Test" {
alert(document.Form1.hdnChecklist.text);
document.Form1.submit();
}
}
</script>
For some weired reason the value of my textbox is not getting past or the function can't see it. What am I missing here??? It's such a simple test and it's driving me crazy why it doesn't work...
Thanks much!!
Gina
I'm a newbee and need your help on this.
I have this line of code in the page:
Protected WithEvents hdnChecklist As System.Web.UI.WebControls.TextBox
hdnChecklist.Text = "Test"
Button_Submit.Attributes.Add("OnClick", "onSubmit()")
It call the JavaScript func:
<script language="javascript"
function onSubmit(){
if document.Form1.hdnChecklist.text == "Test" {
alert(document.Form1.hdnChecklist.text);
document.Form1.submit();
}
}
</script>
For some weired reason the value of my textbox is not getting past or the function can't see it. What am I missing here??? It's such a simple test and it's driving me crazy why it doesn't work...
Thanks much!!
Gina