
October 19th, 2004, 03:17 PM
|
|
Contributing User
|
|
Join Date: Oct 2004
Location: Florida
|
|
Setting controls value with javascript block
Hello,
When I try to set the value of a control on a web form with
javascript i am unable to using this code....
Code:
jscript = "<script>"
jscript = jscript & "if (confirm('data changed, sure to continue?'))"
jscript = jscript & "{document.getElementbyID('textbox1').value='1';} "
jscript = jscript & "else"
jscript = jscript & "{self.close();}"
jscript = jscript & "</script>"
Page.RegisterClientScriptBlock(x, jscript)
my form id is form1. I have tried document.form1.textbox1.value='1'
among many other methods. This seems like it should be a very simple thing to do.
what am i missing here? Please help a java noobie 
|