Java Script issue
-
Hi all, I am registering one student so its corrosponding id is getting generated. i want to display this id in message box and redirect to another page , but i am not able to display alert box or message box because before displaying message i am redirecting to another page. how to solve this problem. Thanks, Amit Patel
-
Hi all, I am registering one student so its corrosponding id is getting generated. i want to display this id in message box and redirect to another page , but i am not able to display alert box or message box because before displaying message i am redirecting to another page. how to solve this problem. Thanks, Amit Patel
Are you using alert and location.window.href in the same javascript function? If yes it should work, because as far as I know is alert blocking... Could you post a bit of the code, for a better understanding? Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
-
Are you using alert and location.window.href in the same javascript function? If yes it should work, because as far as I know is alert blocking... Could you post a bit of the code, for a better understanding? Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
Hi, < string script = "<script language='javascript'>"; script += "alert('" + patientId + "');\n"; script += "</script>"; RegisterStartupScript("StartUp", script); Response.Redirect("NewAppointment.aspx");> Because of this Page is redirecting to another page and pop up is not coming Regards, Amit patel
-
Hi, < string script = "<script language='javascript'>"; script += "alert('" + patientId + "');\n"; script += "</script>"; RegisterStartupScript("StartUp", script); Response.Redirect("NewAppointment.aspx");> Because of this Page is redirecting to another page and pop up is not coming Regards, Amit patel
In that case, you shouldn't use Response.Redirect on the server. Do the redirect within your script:
...
script += "window.location.href='http://Myserver/Myclient/NewAppointment.aspx';";
...Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
-
Hi all, I am registering one student so its corrosponding id is getting generated. i want to display this id in message box and redirect to another page , but i am not able to display alert box or message box because before displaying message i am redirecting to another page. how to solve this problem. Thanks, Amit Patel
Page.RegisterClientScriptBlock("redirect", "<script>alert('You will be redirected in anoher page!'); window.location='default2.aspx';</script>");
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
-
Page.RegisterClientScriptBlock("redirect", "<script>alert('You will be redirected in anoher page!'); window.location='default2.aspx';</script>");
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
-
Hi , Thanks all Page.RegisterClientScriptBlock("redirect", "<script>alert('You will be redirected in anoher page!'); window.location='default2.aspx';</script>"); This code is working fine Thanks blue boy
You are welcome.
I Love T-SQL www.aktualiteti.com "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
-
Are you using alert and location.window.href in the same javascript function? If yes it should work, because as far as I know is alert blocking... Could you post a bit of the code, for a better understanding? Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
if you can do this with javascript then you can use alert box like this alert(pass the value of generated id value) and then redirect to next page.
-
if you can do this with javascript then you can use alert box like this alert(pass the value of generated id value) and then redirect to next page.
Lol, thanks again for repeating the answer. Saying something twice is better than once :)
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.