473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Alert box only popping up once

I have written a code so far that only pops up if you are using internet explorer. It asks you to make sure that your browser is up to date, but it pops up on every page on my site. I would like it to pop up only once.

I have the code written so that it is all in java and in an external file.

Expand|Select|Wrap|Line Numbers
  1. if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
  2.  var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
  3.  if  (ieversion>=7)
  4. var stay=confirm("The following site needs the most up-to-date browser. If you do not have that browser then you may encounter som prblems on the site. Please click 'ok' to make sure you have the most up-to-date browser. If you wish to view the site anyway please click 'cancel.'")
  5. if (stay)
  6. window.location="http://www.microsoft.com/windows/internet-explorer/default.aspx"}
How should I go about fixing this?
Sep 6 '10 #1
1 2594
RamananKalirajan
608 512MB
On opening the popup initially perform the check for window.name

Expand|Select|Wrap|Line Numbers
  1. if(window.name=="")
  2. {
  3.   your code...
  4.   window.name="value";
  5. }
  6. else
  7. {
  8.   return false;
  9. }
  10.  
Thanks and Regards
Ramanan Kalirajan
Sep 7 '10 #2

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

Similar topics

3
by: Lee David | last post by:
I'm trying to have a popup window of new changes when a person comes to my web page and something has changed. I can see the "alert" popping up, but not the page. The page would look better and...
2
by: Kenneth | last post by:
Hi, In a document I have three lines that detects and redirects to another page is a session variable is 0 If Session("Customer_ID")=0 Then Response.Redirect("myPage.aspx") End If What I...
3
by: Bill Nguyen | last post by:
Once applied the latest security patches from Microsoft, OL on our VB app client machines keep popping up dialog box asking for permission to send mail using OL. Is there anyway to by pass this...
3
by: Learner | last post by:
Hello, I have two buttons on one of my VehicleDetails.aspx page. Obiviously these two buttons takes the user to two different pages. Now my client is interested in having a linkbutton instead of...
3
by: Wayne Deleersnyder | last post by:
Hi All, I'm trying to create a function that will cause a pop-up alert to appear if dates which were chosen from a drop-down list were invalid on a page. There's 4 dates, so there's the...
5
by: dwmartin18 | last post by:
Hello everyone. I have quite the puzzling problem with a script I have been working on lately. I have created a function that can be called to create a new html element (e.g. input, select, div,...
2
by: Darvon | last post by:
Hello everyone. I have this website I would like to add some simple password protection to.. Nothing too fancy, so I decided to pull out an old javascript I came across sometime in the past that...
3
by: pavanpvss | last post by:
hi , I have written a javascript function like this. function call(frm) { var loc_name = document.frm.loca.value; //alert('<'+loc_name+'>'); //var objRegExp =...
11
by: AAaron123 | last post by:
In Page_Load I have the following wanting the popup to appear the first time (only) that the page is displayed. I get it each time. Can this be fixed? thanks Static beenHere As Boolean = False ...
0
by: phpuser123 | last post by:
This is the script I modified.What I wanted here is as soon as the getDisplay() method is invocked,to get an alert box so I instantiated the alert class and implemented some codes fr this..But when I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.