Solved

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

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

Independent Software Vendors: 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

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

635 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