473,513 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onClick="windows.location..." Fails after IE 6 Security Update onW/ME?

Hi,

I have been using this trick for some time on a home page. The idea is
to verify the user's browser has Javascript enabled before allowing the
user to access a logon page. The NoJavascript.html page has instructions
for turning on Javascript.

<a href="/NoJavascript.html"
onclick="window.location='/Logon';return false;">Logon </a>

A Windows/ME PC using IE 6 now consistently goes to the
NoJavaScript.html page when the button is clicked even though Javascript
is enabled.

This has been working for several months and continues to work with IE 6
on Windows/XP and other browsers such as Firefox, Opera, etc.

I think the problem is related to the W/ME PC installing the IE 6
Cumulative security Update SP1 (KB896727). Has anyone else encountered a
similar problem and found a solution?

Roger
Aug 20 '05 #1
4 13559
Roger wrote:
Hi,

I have been using this trick for some time on a home page. The idea is
to verify the user's browser has Javascript enabled before allowing the
user to access a logon page. The NoJavascript.html page has instructions
for turning on Javascript.

<a href="/NoJavascript.html" onclick="window.location='/Logon';return
false;">Logon </a>

A Windows/ME PC using IE 6 now consistently goes to the
NoJavaScript.html page when the button is clicked even though Javascript
is enabled.
Does this only fail locally?
Mick

This has been working for several months and continues to work with IE 6
on Windows/XP and other browsers such as Firefox, Opera, etc.

I think the problem is related to the W/ME PC installing the IE 6
Cumulative security Update SP1 (KB896727). Has anyone else encountered a
similar problem and found a solution?

Roger

Aug 20 '05 #2
Sometimes it's nice to know whether a user's browser supports cookies
and whether they have javascript enabled, even if just to gather
statistics.

For the former, upon the initial request and no indication that the
client is a former visitor, you can send back a cookie with the
response from the server, which response is simply a "server has moved"
directing the browser back to a shill page on your server, which apache
picks up and then redirects back to the original (only by now you know
what the cookie situation is so you don't need to do any more monkey
business).

It means that new users and those without cookies need to suffer
through 2 redirects (so they can wind up at a page that looks like what
they clicked on or typed into the browser's address bar). Really, it
is much classier if you can do a single redirect to the same page.
This is trickier, though, because how do you differentiate between a
first hit and redirected browser hit for browsers without cookies.
Something to think about.

Frankly, this cookie stuff is overblown from my point of view. If
they're returning and have cookies, you obviously know (as the server).
If not, does it really gain you anything to do that redirection to
determine cookie capability - I'm thinking no, unless you're desparate
for statistics. If the visitor hasn't made a single click on your
site, chances are your knowing about cookies is not going to make any
difference.

Anyway, you were interested in javascript. Now as far as that goes, If
I remember correctly, you could not do an onLoad="preempt redirection
by self submitting, thus determining js status" because the redirection
takes priority. However, since you are not interested in redirections
when js is missing, it should work for you (at least on my IE 6) is
that you can have a mini nothing form, and then have an
onload="document.forms[0].submit()". And since you'll use a POST
method, the user will never see address bar changes.

Good luck,
Csaba Gabor from Vienna

Aug 20 '05 #3
Sometimes it's nice to know whether a user's browser supports cookies
and whether they have javascript enabled, even if just to gather
statistics.

For the former, upon the initial request and no indication that the
client is a former visitor, you can send back a cookie with the
response from the server, which response is simply a "server has moved"
directing the browser back to a shill page on your server, which apache
picks up and then redirects back to the original (only by now you know
what the cookie situation is so you don't need to do any more monkey
business).

It means that new users and those without cookies need to suffer
through 2 redirects (so they can wind up at a page that looks like what
they clicked on or typed into the browser's address bar). Really, it
is much classier if you can do a single redirect to the same page.
This is trickier, though, because how do you differentiate between a
first hit and redirected browser hit for browsers without cookies.
Something to think about.

Frankly, this cookie stuff is overblown from my point of view. If
they're returning and have cookies, you obviously know (as the server).
If not, does it really gain you anything to do that redirection to
determine cookie capability - I'm thinking no, unless you're desparate
for statistics. If the visitor hasn't made a single click on your site,
chances are your knowing about cookies is not going to make any
difference.

Anyway, you were interested in javascript. Now as far as that goes, if
I remember correctly, you could not do an onLoad="preempt redirection
by self submitting, thus determining js status" because the redirection
takes priority. However, since you are not interested in redirections
when js is missing, it should work for you (at least on my IE 6). You
can have a mini nothing form, and have an
onload="document.forms[0].submit()". And since you'll use a POST
method, the user will never see address bar changes.

Good luck,
Csaba Gabor from Vienna

Aug 20 '05 #4
Mick White wrote:
Roger wrote:
Hi,

I have been using this trick for some time on a home page. The idea is
to verify the user's browser has Javascript enabled before allowing
the user to access a logon page. The NoJavascript.html page has
instructions for turning on Javascript.

<a href="/NoJavascript.html"
onclick="window.location='/Logon';return false;">Logon </a>

A Windows/ME PC using IE 6 now consistently goes to the
NoJavaScript.html page when the button is clicked even though
Javascript is enabled.

Does this only fail locally?
Mick


On a local LAN -- the production application is running on Redhat Fedora
Core 3 Apache. A test version of the application runs on W/XP with
Apache. Accessing either application now results in the same failure.

Roger


This has been working for several months and continues to work with IE
6 on Windows/XP and other browsers such as Firefox, Opera, etc.

I think the problem is related to the W/ME PC installing the IE 6
Cumulative security Update SP1 (KB896727). Has anyone else encountered
a similar problem and found a solution?

Roger

Aug 20 '05 #5

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

Similar topics

6
9926
by: Yvan J. Gagnon | last post by:
I am currenly developing a web site using Macromedia fireworks, and am trying to figure out a way (through hand-coding) of attaching a javascript function (onClick="doit=false") to each of the...
10
67730
by: Eric-Sebastien Lachance | last post by:
Hey there, I decided to just create a 100% height and width div that filled the space over a background header image, and add an onclick event to redirect to the my index... Doesn't seem to work...
5
17662
by: johnsuth | last post by:
I want to produce a trivial demonstration of dynamic modification. I thought that pressing a button might change its color. I studied O'Reillys books and successfully created the button with a...
3
2460
by: I am Sam | last post by:
Please help. I'm dying here and pulling out the last few remaining elements of my hair over this. I have built a form that will identify and authenticate users. I keep getting the following...
2
5465
by: GD | last post by:
I have an ImageButton in a Repeater, and in the Repeater's OnItemDataBound event, I'd like to add some code that will let the ImageButton open a URL in a new window. This is what I have in my...
1
5397
by: Big George | last post by:
Hello, Controls on webpage: - Datagrid - TextBox Datagrid has Delete button: <asp:TemplateColumn HeaderText="Borrar"> <HeaderStyle Width="10%"></HeaderStyle>
13
38525
by: alvin.yk | last post by:
Hi, Normally, a piece of code such as <a href="http://www.yahoo.com" onclick="alert('hello');return false;">link</a> will stop the browser from actually going to href's destination....
11
2400
by: jesdynf | last post by:
I'm having trouble applying a stylesheet to content I'm generating after the fact. Here's the sample code: <html> <head> <title>CSS/DOM Problem Example</title> <style type="text/css">...
3
3370
by: swebster | last post by:
I could use some help to update these functions to only allow the clear and color update on the first onclick and not the second or third etc. Upon entering the site the field includes some...
0
7257
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
7379
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,...
1
7098
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...
0
7521
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...
0
5682
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,...
1
5084
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...
0
1591
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 ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
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...

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.