Return Value

L

l7alabeh

Hi,

I am having problems with the returnValue from a showModalDialog.

The value is not returned to the parent form and the the values in the
other text fields in the parent form are emptied.


Here is my code:
Parent Page:
Button4.Attributes.Add("onclick", "var strReturn;
strReturn=window.showModalDialog('TimeSelector.aspx',
null,'status:no;dialogWidth:340px;dialogHeight:310px;dialogHide:true;help:no;scroll:no');if
(strReturn != null)
document.getElementById('FromTime').Text=strReturn;")



Child Page:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Button1.Attributes.Add("onclick", "window.returnValue =
document.getElementById('TimeSelected').Text; window.close();")
End Sub

What should I do??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top