S
Sergei
Hi,
I am displaying modal dialog and passing values from the main form to the
modal dialog and back.
It works fine but if I used the following syntax on Page_Load(just for
testing) in VB to assign value form the object to text Box it gives error
'Object required'
Dim strResponse As String
strResponse = strResponse & "<script language=""JavaScript"">" & vbCrLf
strResponse = strResponse & "var aForm; " & vbCrLf
'Error is on the page- Object required
strResponse = strResponse & "aForm = window.document.body.all[""TextBox1""];
" & vbCrLf
strResponse = strResponse & "window.alert(aForm); " & vbCrLf
strResponse = strResponse & "</script>" & vbCrLf
Response.Write(strResponse)
I want to assign a value from an object to TextBox in Java script but I
don't know how to refer to TextBox on page.
Is it - window.document.forms('formname').elements('elementname') didn't
work
Thanks for your response.
I am displaying modal dialog and passing values from the main form to the
modal dialog and back.
It works fine but if I used the following syntax on Page_Load(just for
testing) in VB to assign value form the object to text Box it gives error
'Object required'
Dim strResponse As String
strResponse = strResponse & "<script language=""JavaScript"">" & vbCrLf
strResponse = strResponse & "var aForm; " & vbCrLf
'Error is on the page- Object required
strResponse = strResponse & "aForm = window.document.body.all[""TextBox1""];
" & vbCrLf
strResponse = strResponse & "window.alert(aForm); " & vbCrLf
strResponse = strResponse & "</script>" & vbCrLf
Response.Write(strResponse)
I want to assign a value from an object to TextBox in Java script but I
don't know how to refer to TextBox on page.
Is it - window.document.forms('formname').elements('elementname') didn't
work
Thanks for your response.