473,854 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onClick="window s.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.ht ml page has instructions
for turning on Javascript.

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

A Windows/ME PC using IE 6 now consistently goes to the
NoJavaScript.ht ml 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 13587
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.ht ml page has instructions
for turning on Javascript.

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

A Windows/ME PC using IE 6 now consistently goes to the
NoJavaScript.ht ml 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="documen t.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="documen t.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.ht ml page has
instructions for turning on Javascript.

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

A Windows/ME PC using IE 6 now consistently goes to the
NoJavaScript.ht ml 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
9946
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 links in my fireworks-generated dhtml popup menus. Does anyone here know where I would add this javascript fucntion in the code so that it would be recognized? And do I do it in the html, or in the JS file? The javascript function I need to add is...
10
67783
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 in FireFox only, just in IE. Here's the code: <div id="headerimg"><div style="width: 100%; height: 100%; cursor: hand; cursor: pointer;" onclick="top.location.href('http://www.monamouchtim.com/');">&nbsp;</div></div>
5
17723
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 fancy style, but the onclick fails to do anything no matter what permutation of parameters I try. <input type=button style=background-color:yellow;color:blue;font-family:Arial;font-style:italic;font-weight:bold name="xyz" value="CHANGE COLOUR"...
3
2479
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 error with the Form: Compiler Error Message: CS0122: 'Sonar3.Controls.LoginControl.Button_Click(object, System.EventArgs)' is inaccessible due to its protection level
2
5478
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 Repeater's OnItemDataBound event: ImageButton oImageButton = ((ImageButton)e.Item.FindControl("ibtnNewWindow")); string sUrl = "http://www.cnn.com"; // Just as an example string sWindow = string.Concat(@"javascript:window.open(',", sUrl, "',
1
5415
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
38618
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. However, this is not the case with the IE7 I am using. What has changed?
11
2468
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"> ..historylinks {
3
3391
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 suggested text. When the onclick is issued the field updates and resets the color and text. What isn't required is if the field is clicked again no to repeat the color and text. Suggestions? function clearText(thefield) { if...
0
9899
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
11023
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
10672
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
10740
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,...
1
7909
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7076
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
5936
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4550
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
2
4147
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.