Solved

Firefox bug? Getting an Alert message to popup in an UpdatePanel

Posted on 2009-05-08
3
612 Views
Last Modified: 2012-05-06
I can use the following code to popup a MessageBox inside an Update Panel...

System.Web.UI.ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "myKey", "alert('ALERT MESSAGE!')", true);

The problem is that in Firefox none of my drop down boxes work after the message has gone. They appear but when I select an item it doesn't change. It seems to work fine in IE.

Any ideas how to fix this or perhaps another way of producing an alert in an UpdatePanel?
0
Comment
Question by:robaherne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 24337886
Can you see when you do a VIEW SOURCE on the Page..

also maybe try...

Response.write("<Script>alert('Hello')</Script>")
0
 

Author Comment

by:robaherne
ID: 24353098
For some reason that doesn't work for buttons inside an UpdatePanel. I get...

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '<Script>alert('Hello'.
0
 

Accepted Solution

by:
robaherne earned 0 total points
ID: 24353228
FOUND THE SOLUTION!

http://forums.asp.net/t/1311393.aspx

ScriptManager.RegisterStartupScript(Button1, typeof(Button), "scriptkey","window.setTimeout(\"alert('test!')\",0);", true);

with window.setTimeout, the dropdowns will work properly after the alert.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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