Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confirm box not functioning

Status
Not open for further replies.

firsttube

Technical User
Apr 21, 2004
165
CA
I have a web page that when it loads a confirm box opens likes this:
Code:
var agree = confirm("This is the confirm text.");
if (agree)
		{
			return true;
		} else {
			window.location.href = "[URL unfurl="true"]http://www.google.com";[/URL]
		}

The problem is, that on one person's computer, when the page loads the confirm box does not pop up and it automatically goes to the location.href redirection.

Could the browser be remember this person'a answer and just going to the "Else" line? I'm not sure how it is possible that this only happens on one user's computer.


Information is not Knowledge, Knowledge is not Wisdom, Wisdom is not Truth, Truth is not Beauty, Beauty is not Love, Love is not Music, Music is the best.
 
I'd say that person probably has some option enabled somewhere (whether in their browser, in their OS, an accessiblity add-on, or other 3rd-party add-on) that either "auto accepts" certain dialogs, or prevents them from appearing in the first place.

If they had JS disabled, they wouldn't see it, but neither would the redirection work.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
is there any way to detect whether they have javascript enabled or not?

Information is not Knowledge, Knowledge is not Wisdom, Wisdom is not Truth, Truth is not Beauty, Beauty is not Love, Love is not Music, Music is the best.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top