Solved

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

Posted on 2009-05-08
3
613 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

734 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