473,574 Members | 3,176 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help in detecting aol popup blocker

hi,

i have some forms which use javascript for data validation, e.g.,
checking to make sure all required fields are completed, checking that
data falls within valid ranges for certain fields, etc.

if an error occurs, i'm sending the user a message via the alert
window. the form is then not submitted until the errors are corrected.

however, i've discovered that some users using the aol browser are
able to submit the form without correcting all the errors. upon
investigating further, i suspect that it has to do with the aol
browser settings automatically blocking any popup windows.

my question is: is there a way to detect if the user's browser agent
has popup blocking enabled so that i can redirect the user to a
different page with a message that their form will be submitted
unvalidated?

or if anyone has better ideas on how to handle this, i'd greatly
appreciate any assistance.

tia.
-----
-dy
Jul 20 '05 #1
13 5837
In article <6q************ *************** *****@4ax.com>, dave yan
<ji************ ****@pacbell.ne t> writes:
i have some forms which use javascript for data validation, e.g.,
checking to make sure all required fields are completed, checking that
data falls within valid ranges for certain fields, etc.

if an error occurs, i'm sending the user a message via the alert
window. the form is then not submitted until the errors are corrected.
An alert window, or an alert message? I assume you mean a popup window that
alerts the user?
however, i've discovered that some users using the aol browser are
able to submit the form without correcting all the errors. upon
investigatin g further, i suspect that it has to do with the aol
browser settings automatically blocking any popup windows.
Its not unique to AOL's popup blocker. Any popup blocker will cause your page
to fail if you rely on popups.
my question is: is there a way to detect if the user's browser agent
has popup blocking enabled so that i can redirect the user to a
different page with a message that their form will be submitted
unvalidated?
No. You can try to open a window, and then see if it exists. It won't tell you
whether a popup blocker closed it or a fast optical mouse closed it. Only that
it isn't open anymore.
or if anyone has better ideas on how to handle this, i'd greatly
appreciate any assistance.


Sure. Anything but a popup. An alert, a confirm, even a hidden/visible div with
a warning in it. Any of which would be more reliable than a popup window. (Yes,
I use AOL's popup blocker).
--
Randy
Jul 20 '05 #2
On Wed, 24 Sep 2003 07:35:23 -0500, kaeli
<in************ ********@NOSPAM att.net> wrote:
In article <6q************ *************** *****@4ax.com>,
ji************ ****@pacbell.ne t enlightened us with...

or if anyone has better ideas on how to handle this, i'd greatly
appreciate any assistance.

You should never rely on client-side scripting to validate data. It is a
convenience to the user to not have to get an error after the page is
submitted, saving them time and you bandwidth. However, your server-side
code should validate the exact same things the client-side code does.
This takes care of popup killers, browsers without script at all (or
turned off), and malicious users who might try to screw up your database
or back-end application on purpose.


i agree wholeheartedly, but the end-user has a bare minimum hosting
package, so there's not much i can do on the server-side. i've been
telling them to upgrade and they've been reluctant to do so.

That said, an alert will not set off a popup blocker.

i'm using a code snippet like this:

msg += myfield.name;
alert(msg);

if (msg == null) return true;
else return false;

in the form, i use the onsubmit event handler:
onsubmit="retur n checkform(this) ;"

yet, users using the aol browser do not receive the alert message and
the form is submitted with the data errors.
-------------------------------------------------
~kaeli~
All I ask for is the chance to prove that money
cannot make me happy.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------


-----
-dy
Jul 20 '05 #3
On 24 Sep 2003 02:46:15 GMT, hi************@ aol.com (HikksNotAtHome )
wrote:
In article <6q************ *************** *****@4ax.com>, dave yan
<ji*********** *****@pacbell.n et> writes:
i have some forms which use javascript for data validation, e.g.,
checking to make sure all required fields are completed, checking that
data falls within valid ranges for certain fields, etc.

if an error occurs, i'm sending the user a message via the alert
window. the form is then not submitted until the errors are corrected.
An alert window, or an alert message? I assume you mean a popup window that
alerts the user?


i guess it would be alert message. i'm not sure if i'm using the right
terminology. i'm using:

alert(msg);

with msg containing the names of the fields which contain errors or
which are empty.

[snipped]
or if anyone has better ideas on how to handle this, i'd greatly
appreciate any assistance.


Sure. Anything but a popup. An alert, a confirm, even a hidden/visible div with
a warning in it. Any of which would be more reliable than a popup window. (Yes,
I use AOL's popup blocker).


i think i'm using an alert instead of a popup. there is an 'ok' button
on the dialog box.

-----
-dy
Jul 20 '05 #4
In article <5a************ *************** *****@4ax.com>, dave yan
<ji************ ****@pacbell.ne t> writes:
Sure. Anything but a popup. An alert, a confirm, even a hidden/visible div

with
a warning in it. Any of which would be more reliable than a popup window.

(Yes,
I use AOL's popup blocker).


i think i'm using an alert instead of a popup. there is an 'ok' button
on the dialog box.


Yes, thats an alert, not a popup window. If you will post a URL to the page in
question, or a sample page that demonstrates the problem, I will be happy to
test it using AOL's browser. I know of no reason why AOL would disallow the
alert, I use them and get them when using the AOL browser.
--
Randy
Jul 20 '05 #5
In article <in************ *************** *****@4ax.com>,
ji************* ***@pacbell.net enlightened us with...

msg += myfield.name;
alert(msg);

if (msg == null) return true;
else return false;

in the form, i use the onsubmit event handler:
onsubmit="retur n checkform(this) ;"


Don't set false/true depending on the alert. AOL probably returns false
on the object or someting silly. AOL, if anything, tends to be a silly
browser that does unexpected things.
Set your return value depending on if the values are valid.

if (isValid(docume nt.myForm.myFie ld.value))
{
return true;
}
else
{
alert("problem" );
return false;
}

-------------------------------------------------
~kaeli~
All I ask for is the chance to prove that money
cannot make me happy.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #6
"HikksNotAtHome " <hi************ @aol.com> schrieb im Newsbeitrag
news:20******** *************** ****@mb-m04.aol.com...
In article <5a************ *************** *****@4ax.com>, dave yan
<ji************ ****@pacbell.ne t> writes:
Sure. Anything but a popup. An alert, a confirm, even a hidden/visible
divwith
a warning in it. Any of which would be more reliable than a popup
window.(Yes,
I use AOL's popup blocker).
i think i'm using an alert instead of a popup. there is an 'ok' button
on the dialog box.


Yes, thats an alert, not a popup window. If you will post a URL to the

page in question, or a sample page that demonstrates the problem, I will be happy to test it using AOL's browser. I know of no reason why AOL would disallow the alert, I use them and get them when using the AOL browser.
--
Randy


Are you aware that everybody can submit your form without validation just by
deactivating Javascript in the browser settings? If this is a problem you
have to either server-side validate (which was suggested before and you say
is not possible) or make sure not to provide the form to non-Javascript
browsers (which you should only do if your target audience is very
special-interest and has a high motivation to send the form, so they will
enable Javascript for this purpose).

You can do this by creating the form with Javascript (use the
document.write( ) function) or by writing it into a hidden <div> which lays
over a visible one that contains a message that Javascript must be enabled.
Then you simply turn the hidden <div> visible with an onLoad event. If
Javascript is disabled the user sees the message instead of the form. (Be
aware that non-CSS browsers see both in this case...)

HTH
Markus
Jul 20 '05 #7
"Markus Ernst" <de******@yahoo .com> writes:
Are you aware that everybody can submit your form without validation just by
deactivating Javascript in the browser settings? If this is a problem
.... then tough luck. Nothing to do about it :)
Server side validation is the only validation that cannot be avoided, and
therefore the only validation that can be trusted.

[Only give form to javascript enabled clients] You can do this by creating the form with Javascript (use the
document.write( ) function) or by writing it into a hidden <div> which lays
over a visible one that contains a message that Javascript must be enabled.


It doesn't prevent the user from turning off Javascript after the page
has been created/made visible, and it sure doesn't stop the from
making their own form (or even sending a custom designed GET request
to the server using telnet).

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #8
On 24 Sep 2003 23:37:33 GMT, hi************@ aol.com (HikksNotAtHome )
wrote:
In article <5a************ *************** *****@4ax.com>, dave yan
<ji*********** *****@pacbell.n et> writes:
Sure. Anything but a popup. An alert, a confirm, even a hidden/visible div

with
a warning in it. Any of which would be more reliable than a popup window.

(Yes,
I use AOL's popup blocker).


i think i'm using an alert instead of a popup. there is an 'ok' button
on the dialog box.


Yes, thats an alert, not a popup window. If you will post a URL to the page in
question, or a sample page that demonstrates the problem, I will be happy to
test it using AOL's browser. I know of no reason why AOL would disallow the
alert, I use them and get them when using the AOL browser.


thank you very much. again, any suggestions or comments are greatly
appreciated.

http://ctpberk.org/mentor/mentorapply-js.php

(sorry about the delayed response. i got caught up in something else
for a while.)

----
-dy
Jul 20 '05 #9
On Mon, 29 Sep 2003 15:11:39 +0200, "Markus Ernst"
<de******@yahoo .com> wrote:

Are you aware that everybody can submit your form without validation just by
deactivating Javascript in the browser settings? If this is a problem you
have to either server-side validate (which was suggested before and you say
is not possible) or make sure not to provide the form to non-Javascript
browsers (which you should only do if your target audience is very
special-interest and has a high motivation to send the form, so they will
enable Javascript for this purpose).

You can do this by creating the form with Javascript (use the
document.write () function) or by writing it into a hidden <div> which lays
over a visible one that contains a message that Javascript must be enabled.
Then you simply turn the hidden <div> visible with an onLoad event. If
Javascript is disabled the user sees the message instead of the form. (Be
aware that non-CSS browsers see both in this case...)

HTH
Markus


thanks for the suggestion. right now, i have two pages with the form.
on the first page, there is a javascript page redirect. if the browser
is javascript-disabled, then the page is not redirected and the form
is does not have any scripting associated with any events. (also, no
placeholder data in the fields.)

if the browser is enabled, the page is redirected to the form with
javascript validation.

----
-dy
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
5035
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...
10
3178
by: Agony.COM | last post by:
Hi there all, Is there a way, using Javascript, that you can detect if a popup window has opened successfully? I'm tring to work out if someone is running popup blocking software or not. Cheers, @ndyB
2
3277
by: QA | last post by:
http://www.popupcheck.com/popup_manual/modeless.asp can still have a popup even when I have a popup blocker - google toolbar. I want to know the technology, but I can not read the source code. Anyone knows the trick to get around the blocker?
26
6799
by: Raffi | last post by:
Hi, We have a database application that runs in a popup Internet Explorer application window. The reason for this is to isolate the casual user from the address bar and the typical IE navigation buttons. The application has a browser test page that displays an error message when a popup blocker is found and opens a popup page stating the...
13
6253
by: ldan | last post by:
Hi everybody, I would not consider myself an expert in javascript - but so far whatever I know, helped me reaching my goals. Recently I started to experience a lot of javascript errors related to opening up a popup window in an application I wrote. The error messages are quite diverse: "Object doesn't support this property or method" or...
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...
7
8461
by: rob c | last post by:
Hi Does anyone know what triggers a "popup blocker"? I'm going to be opening some sub-windows from my main page and don't want to get caught in a blocker. Thanks Rob
3
4504
by: Yisehaq | last post by:
Hi guys I am trying to prepare few html pages which contain OLAP cubes on a CD. The problem I have is that the popup blocker blocks the OLAP modules from being shown. Therefore, I wanted to write script that will check if the popup blocker is enabled and tell the user to allow the site. I tried my own scripts and after several tries I looked...
1
1663
mageswar005
by: mageswar005 | last post by:
hi, how to detect yahoo popup blocker, in my site i open a popup window but some local pc yahoo popup blocker can control my popup window. how can i detect the popup blocker....
0
7843
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...
0
8111
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. ...
1
7863
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...
0
8140
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5660
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5336
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...
0
3776
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...
1
2282
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
0
1102
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.