Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 02, 2011 02:03 AM by Yanping Wang - MSFT
Member
219 Points
126 Posts
Feb 24, 2011 07:54 AM|LINK
edit my problem now.
<div style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; width: 100%; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; margin: 8px;">
now i want to do back and refresh the page~
how to do it ??
Response.Write("<script>if(confirm('ABC')){ history.go(-1); } </script>");
now can do back , but the page din't refresh.
Participant
911 Points
371 Posts
Feb 24, 2011 08:53 AM|LINK
Hi,
Response.Write("<script>alert('Available in Malaysia'); location.href = 'Default2.aspx'; </script>");
Use this line. This first show up the alert box and if you click "OK" it navigate to Default2.aspx page.
Mark as answer if this post solves your requirements....
Thanks
r.eswaran
Feb 24, 2011 10:20 AM|LINK
Star
14886 Points
1534 Posts
Microsoft
Feb 28, 2011 06:59 AM|LINK
hi MrJx,
thanks for posting! check the solution as follow:
<script type="text/javascript"> onload=function(){ var e=document.getElementById("refreshed"); if(e.value=="no")e.value="yes"; else{e.value="no";location.reload();} } </script> <a href='newpage.html'>open</a> <input type="hidden" id="refreshed" value="no">
here is a similar explation for your reference: http://www.webdeveloper.com/forum/showthread.php?t=137518
hope this helps, thanks!
Mar 01, 2011 03:31 AM|LINK
cannot work..
still is the same....
okay now me got page1 and page2...
me at page2 create a back button and want to refresh the page1.
how??
Response.Write("<script>window.navigate(history.go(-1));</script>");
this is my back button function at page2
Mar 02, 2011 02:03 AM|LINK
thanks for your reply!
as far as I know, window.navigate is used to open a specified page, for instance: window.navigate('http://www.google.com').
in page 2 just write like code below you mentioned above
in page 1:
<script type="text/javascript"> onload=function(){ var e=document.getElementById("refreshed"); if(e.value=="no")e.value="yes"; else{e.value="no";location.reload();} } </script> <a href='page2.html'>open</a> <input type="hidden" id="refreshed" value="no">
MrJx
Member
219 Points
126 Posts
Alert Problem
Feb 24, 2011 07:54 AM|LINK
edit my problem now.
<div style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; width: 100%; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; margin: 8px;">
now i want to do back and refresh the page~
how to do it ??
Response.Write("<script>if(confirm('ABC')){ history.go(-1); } </script>");now can do back , but the page din't refresh.
</div>Eswaran_MCA
Participant
911 Points
371 Posts
Re: Alert Problem
Feb 24, 2011 08:53 AM|LINK
Hi,
Response.Write("<script>alert('Available in Malaysia'); location.href = 'Default2.aspx'; </script>");
Use this line. This first show up the alert box and if you click "OK" it navigate to Default2.aspx page.
Mark as answer if this post solves your requirements....
Thanks
r.eswaran
r. eswaran
MrJx
Member
219 Points
126 Posts
Re: Alert Problem
Feb 24, 2011 10:20 AM|LINK
now i want to do back and refresh the page~
how to do it ??
Response.Write("<script>if(confirm('ABC')){ history.go(-1); } </script>");now can do back , but the page din't refresh.
Yanping Wang...
Star
14886 Points
1534 Posts
Microsoft
Re: Alert Problem
Feb 28, 2011 06:59 AM|LINK
hi MrJx,
thanks for posting!
check the solution as follow:
<script type="text/javascript"> onload=function(){ var e=document.getElementById("refreshed"); if(e.value=="no")e.value="yes"; else{e.value="no";location.reload();} } </script> <a href='newpage.html'>open</a> <input type="hidden" id="refreshed" value="no">here is a similar explation for your reference: http://www.webdeveloper.com/forum/showthread.php?t=137518
hope this helps, thanks!
Feedback to us
Develop and promote your apps in Windows Store
MrJx
Member
219 Points
126 Posts
Re: Alert Problem
Mar 01, 2011 03:31 AM|LINK
cannot work..
still is the same....
okay now me got page1 and page2...
me at page2 create a back button and want to refresh the page1.
how??
Response.Write("<script>window.navigate(history.go(-1));</script>");
this is my back button function at page2
Yanping Wang...
Star
14886 Points
1534 Posts
Microsoft
Re: Alert Problem
Mar 02, 2011 02:03 AM|LINK
hi MrJx,
thanks for your reply!
as far as I know, window.navigate is used to open a specified page, for instance: window.navigate('http://www.google.com').
in page 2 just write like code below you mentioned above
Response.Write("<script>if(confirm('ABC')){ history.go(-1); } </script>");
in page 1:
<script type="text/javascript"> onload=function(){ var e=document.getElementById("refreshed"); if(e.value=="no")e.value="yes"; else{e.value="no";location.reload();} } </script> <a href='page2.html'>open</a> <input type="hidden" id="refreshed" value="no">hope this helps, thanks!
Feedback to us
Develop and promote your apps in Windows Store