Solved

Mozilla - How to trigger a window reload with returned data from a popup window

Posted on 2006-06-14
5
335 Views
Last Modified: 2008-01-09
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("onpropertychange", Page.GetPostBackEventReference(Button1))

Subroutine that is to fire when variable returned:
        Private Sub TBInvisible_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TBInvisible.TextChanged
            If (TBInvisible.Text.IndexOf("PHOTO|") >= 0) Then
                PhotosSelected = PhotosSelected & TBInvisible.Text.Substring(TBInvisible.Text.IndexOf("PHOTO") + 6) & "|"
                Session(Me.GetLoggedInUserInfo() & "EmailPhotos") = PhotosSelected
                TBInvisible.Text = ""
                ReComposeEmail()
            ElseIf (TBInvisible.Text.IndexOf("GAME|") >= 0) Then
                GamesSelected = GamesSelected & TBInvisible.Text.Substring(TBInvisible.Text.IndexOf("GAME") + 5) & "|"
                Session(Me.GetLoggedInUserInfo() & "EmailGames") = GamesSelected
                TBInvisible.Text = ""
                ReComposeEmail()
            ElseIf (TBInvisible.Text.IndexOf("CREDITS|Y") >= 0) Then
                TBInvisible.Text = ""
            ElseIf (TBInvisible.Text.IndexOf("FREECREDITS|Y") >= 0) Then
                TBInvisible.Text = ""
            ElseIf (TBInvisible.Text.IndexOf("ADDEMAIL|Y") >= 0) Then
                Dim EmailContent As String
                EmailContent = Session(Me.GetLoggedInUserInfo() & "EmailContent") 'TBInvisible.Text.Substring(TBInvisible.Text.IndexOf("ADDEMAIL|") + 9)
                'Session(Me.GetLoggedInUserInfo() & "EmailContent") = EmailContent
                TBInvisible.Text = ""
                ReComposeEmail(EmailContent)
            ElseIf (TBInvisible.Text.IndexOf("REMOVEPHGM|Y") >= 0) Then
                PhotosSelected = Session(Me.GetLoggedInUserInfo() & "EmailPhotos")
                GamesSelected = Session(Me.GetLoggedInUserInfo() & "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("InvTxtID") & ".value = '" & IIf(argImageType = "P", "PHOTO|", "GAME|") & argSelectedImgDet & "';"
            sScript &= " window.close();"
            sScript &= "</script>"
            Response.Write(sScript)
0
Comment
Question by:LeeRobbins
  • 2
5 Comments
 
LVL 22

Expert Comment

by:RedKelvin
ID: 16917606
Apparently the OnChange event is only fired when actually changed by the user, take a look at the start of this link
http://www.codeproject.com/aspnet/OnChangeHarmful.asp
0
 

Author Comment

by:LeeRobbins
ID: 16923651
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.
0
 
LVL 22

Accepted Solution

by:
RedKelvin earned 250 total points
ID: 16924801
Hi, this blog should explain what is going on, and possibly how to work around it
http://www.thescripts.com/forum/thread491842.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Bada platform is becoming more and more famous this days and people talking about same. Some friends included those who have bada OS mobile asked me "what is bada?"and "what its features?". That encouraged me to research and write this article. [st…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now