Javascript Alert Box does not Display

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Mar 2007
Posts: 158
Reputation: vuyiswamb is an unknown quantity at this point 
Solved Threads: 5
vuyiswamb's Avatar
vuyiswamb vuyiswamb is offline Offline
Junior Poster

Javascript Alert Box does not Display

 
0
  #1
Sep 13th, 2008
Good Evening Guys, Today its my Birthaday.

I have a If statement that i use to return an integer that will mean Success or Failure , now am testing for that integer in my ASP.NET 2.0 Page lke this

  1. if (Res == 1)
  2. {
  3.  
  4.  
  5. Response.Write("<script> alert('You have Successfully Registred');</script>");
  6.  
  7.  
  8. Response.Redirect("login.aspx", false);
  9. }
  10. else
  11. {
  12.  
  13.  
  14.  
  15. Response.Write("<script> alert('Invalid Data has been Entered');</script>");
  16.  
  17.  
  18. }

Now if the value is 1, then it should Display the Message and after the Message has been Clicked it should move to the login Page. Now my Problem is that it moves to the Login Page without a Alert Message being Displayed And the send Alert for invalid Entry, will not show anythingm, there is a Warning sign on my Page at the Bootom left of my Page. What is wrong with my Javascript

Thanks
Last edited by vuyiswamb; Sep 13th, 2008 at 7:53 pm.
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 370
Reputation: greeny_1984 is an unknown quantity at this point 
Solved Threads: 29
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz

Re: Javascript Alert Box does not Display

 
0
  #2
Sep 15th, 2008
the methodu u used is obselete in case of asp.net 2.0 ,u should javascript like this
  1.  
  2. ClientScript.RegisterStartupScript(this.GetType(), "msg", "<script> alert('Machine Details Added Successfully!'); </script>");
If u r query is achieved,mark the thread as solved

Live and Let Live
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 158
Reputation: vuyiswamb is an unknown quantity at this point 
Solved Threads: 5
vuyiswamb's Avatar
vuyiswamb vuyiswamb is offline Offline
Junior Poster

Re: [Resolved]Javascript Alert Box does not Display

 
0
  #3
Sep 15th, 2008
Thank you , its working
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC