473,597 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I remove the display of popup on hitting the back button of the browser

375 Contributor
Hi,


I have two questions

a)

I have a registration page which on successfull registration throws an popup alert

Expand|Select|Wrap|Line Numbers
  1. ClientScript.RegisterStartupScript(this.GetType(), "strJsMessage", "<script language='javascript'>alert('Registered Successfully!');window.document.forms[0].action='index.aspx';window.document.forms[0].submit();</script>");

The popup works fine, and on successfull registration redirects to another page. But when I hit the back button on IE browser, I once again see the popup window which is not visible in Mozilla browser.


Can anyone kindly let me know how to make this popup disappear when it comes to hitting the back button in IE browser

b) I have used required field validator controls and a validation summary which pops up the message about all the required fields that are missing on clicking of the button.

The problem is it shows the summary only but when i chooose the messagebox option as true, it does not popup the message. but when i choose the show summary option it shows.

Any idea.

Regards
cmrhema
Aug 9 '09 #1
4 3386
danielc
5 New Member
i don't know what is your implementation of that, but i think you have to do some checking statement of your page_load event, to check is it load by post(summit), or just page_load only.
Aug 13 '09 #2
danielc
5 New Member
(b) Don't know what are u talking about. Can't help u. Sorry.
Aug 13 '09 #3
cmrhema
375 Contributor
Its ok Danielc, I resolved the issue but disabling the back browser button.
Aug 13 '09 #4
Frinavale
9,735 Recognized Expert Moderator Expert
It is not a good idea to disable the back button of the persons browser.
If the person were to leave your page you will have disabled their back button and they will not be able to use it during normal browsing.

I'd use a hidden field to store a boolean that indicates whether or not to display the pop up. This value will be cached and so when the cached version of the page is displayed you can still determine whether or not to display the popup.
Aug 14 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

38
5036
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
9
36962
by: Ken | last post by:
I am trying to create one image using JavaScript; then later in the script remove the image - not just remove the src. The following creates the image, but I have been unable to remove it. How do I structure document.getElementById('num1').removeChild(image_display); ? <input type=file name="picture1" onChange="image(this.value, 'num1');" Id="pt1"> <div id='num1'></div>
9
3907
by: Rathtap | last post by:
I want to popup a window from my codebehind. The reason is that during the postback the code needs to do some validations and to build the arguments that are passed in the url. How can I achieve this functionality? The reason I do not want to use Response.Redirect is because when the user comes back to the first page, all the selections that were made(which are the arguments) disappear.
2
2066
by: tao lin | last post by:
Hi, all I am using VS2003 under WinXP. My WebApp has a WebForm which has a html form has some search condition textbox, once the user fill in the condition and click submit button. My app will stay in the same WebForm but open a popup window in the browser to show the search results. So I implement like this: private void btnSubmit_Click(object sender, System.EventArgs e)
1
5735
by: dapkniht | last post by:
Hello, Here's my situation... I have an ASP.NET 2.0 (C#) page with a link button. When a user clicks the button I need it to execute the code behind code for the link button on click event. At the end of the code behind code for the link button click event, I use JavaScript to popup another browser window (using window.open). This all works fine. It's basically a confirmation popup.
5
4390
by: knowdotnet | last post by:
Hi all, Which is the best way to return a value back to the web page from a pop up page? I have a asp.net web application which opens a popup page on a link button click. The Link button is contained in a datagrid column. When i submit the popup page I want a value from the page to be returned to the parent page and is to be updated in a dataset, thereby updating the datagrid. I want the parent page to be refreshed on submitting the pop...
2
3256
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully validated my HTML and CSS code. 1. When I clear cache and refresh my webpage, it takes 3 tries before the popup window displays - I click on the button once, a white window the size of my webpage displays. I close it and click on the button again (for...
5
1957
by: wreed06 | last post by:
I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully validated my HTML and CSS code. 1. When I clear cache and refresh my webpage, it takes 3 tries before the popup window displays - I click on the button once, a white window the size of my webpage displays. I close it and click on the button again (for the same...
11
5284
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. How do I submit that form1 from the javascript from my current window? Thanks.
0
7965
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5426
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3881
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2399
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.