LeeRobbins
asked on
Mozilla - How to trigger a window reload with returned data from a popup window
I am developing in .Net and am currently using the OnPropertChange attribute to trigger an event in my calling function. The popup window is loading a hidden textbox variable when it closes and returns control to the calling function, but the change event is not firing. The same code is working properly using IE. Is there a way to work around this issue in Mozilla?
My calling VB function contains the following code:
To set the attribute
TBInvisible.Attributes.Add ("onproper tychange", Page.GetPostBackEventRefer ence(Butto n1))
Subroutine that is to fire when variable returned:
Private Sub TBInvisible_TextChanged(By Val sender As System.Object, ByVal e As System.EventArgs) Handles TBInvisible.TextChanged
If (TBInvisible.Text.IndexOf( "PHOTO|") >= 0) Then
PhotosSelected = PhotosSelected & TBInvisible.Text.Substring (TBInvisib le.Text.In dexOf("PHO TO") + 6) & "|"
Session(Me.GetLoggedInUser Info() & "EmailPhotos") = PhotosSelected
TBInvisible.Text = ""
ReComposeEmail()
ElseIf (TBInvisible.Text.IndexOf( "GAME|") >= 0) Then
GamesSelected = GamesSelected & TBInvisible.Text.Substring (TBInvisib le.Text.In dexOf("GAM E") + 5) & "|"
Session(Me.GetLoggedInUser Info() & "EmailGames") = GamesSelected
TBInvisible.Text = ""
ReComposeEmail()
ElseIf (TBInvisible.Text.IndexOf( "CREDITS|Y ") >= 0) Then
TBInvisible.Text = ""
ElseIf (TBInvisible.Text.IndexOf( "FREECREDI TS|Y") >= 0) Then
TBInvisible.Text = ""
ElseIf (TBInvisible.Text.IndexOf( "ADDEMAIL| Y") >= 0) Then
Dim EmailContent As String
EmailContent = Session(Me.GetLoggedInUser Info() & "EmailContent") 'TBInvisible.Text.Substrin g(TBInvisi ble.Text.I ndexOf("AD DEMAIL|") + 9)
'Session(Me.GetLoggedInUse rInfo() & "EmailContent") = EmailContent
TBInvisible.Text = ""
ReComposeEmail(EmailConten t)
ElseIf (TBInvisible.Text.IndexOf( "REMOVEPHG M|Y") >= 0) Then
PhotosSelected = Session(Me.GetLoggedInUser Info() & "EmailPhotos")
GamesSelected = Session(Me.GetLoggedInUser Info() & "EmailGames")
TBInvisible.Text = ""
ReComposeEmail()
End If
End Sub
----
Subroutine that loads the variable that is returned:
sScript &= "<script language=javascript>"
sScript &= " window.opener.Form1." & Request.QueryString("InvTx tID") & ".value = '" & IIf(argImageType = "P", "PHOTO|", "GAME|") & argSelectedImgDet & "';"
sScript &= " window.close();"
sScript &= "</script>"
Response.Write(sScript)
My calling VB function contains the following code:
To set the attribute
TBInvisible.Attributes.Add
Subroutine that is to fire when variable returned:
Private Sub TBInvisible_TextChanged(By
If (TBInvisible.Text.IndexOf(
PhotosSelected = PhotosSelected & TBInvisible.Text.Substring
Session(Me.GetLoggedInUser
TBInvisible.Text = ""
ReComposeEmail()
ElseIf (TBInvisible.Text.IndexOf(
GamesSelected = GamesSelected & TBInvisible.Text.Substring
Session(Me.GetLoggedInUser
TBInvisible.Text = ""
ReComposeEmail()
ElseIf (TBInvisible.Text.IndexOf(
TBInvisible.Text = ""
ElseIf (TBInvisible.Text.IndexOf(
TBInvisible.Text = ""
ElseIf (TBInvisible.Text.IndexOf(
Dim EmailContent As String
EmailContent = Session(Me.GetLoggedInUser
'Session(Me.GetLoggedInUse
TBInvisible.Text = ""
ReComposeEmail(EmailConten
ElseIf (TBInvisible.Text.IndexOf(
PhotosSelected = Session(Me.GetLoggedInUser
GamesSelected = Session(Me.GetLoggedInUser
TBInvisible.Text = ""
ReComposeEmail()
End If
End Sub
----
Subroutine that loads the variable that is returned:
sScript &= "<script language=javascript>"
sScript &= " window.opener.Form1." & Request.QueryString("InvTx
sScript &= " window.close();"
sScript &= "</script>"
Response.Write(sScript)
ASKER
I am using the onPropertyChange event in the .NET code, which fires the next code that in turn completes the process (refreshes the window and adds the data); it works great in IE, but will not execute in Netscape, Mozilla or Firefox browsers. onChange is not what is needed and I have tried it and also onBlur to check if they work with the above mentioned browsers but to no avail.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.codeproject.com/aspnet/OnChangeHarmful.asp