Hi everybody!
I have a question regarding IE. I have a client using a script (which I can not change as it is an affiliate program's script that I can not control) that creates a variable called "event" and assigns a number to it. This is the line:
Later on, there is another script that should use window.event, but... it does not work, because window.event gets rewritten by the previous script and it stays filled by the number!!!
In your opinion, is there a way to empty the "event" variable, and restore it to its original state, including srcElement?
I have tried setting: - event = null;
-
event = window.event
-
This resulted in having window.event value back to null, and its type as object (as it should be). But srcElement will not work :-(
Any suggestions? Thanks in advance!
Simone
5 1812
null always returns 'object' from typeof, because it is not 'undefined'.
IE doesn't give you access to a constructor or prototype for event.
I never thought of trying to assign event to something,
but I gave it a whirl in IE7: window.event=33
and got a 'member not found' error- but event was untouched.
I don't have any old IE's around, so I don't know what they may do.
I can't imagine the purpose of the 'affiliate' script, unless it is to discourage event handling in IE.
unfortunately not... it is just a variable they arbitrarily called "event" without thinking about it :-(
I'll make some tests... thanks anyway!
cheers
s
acoder 16,027
Recognized Expert Moderator MVP
Interesting. I don't know why it's not made read-only. This affects IE7 too.
Is there no possibility of changing the script?
Interesting. I don't know why it's not made read-only. This affects IE7 too.
Is there no possibility of changing the script?
unfortunately, that script is not under my control... and although it looks silly calling a variable "event", IE is absolutely more silly by allowing that to rewrite window.event!
Anyway, for the moment, changing the script looks like the only viable solution...
thanks everybody for your help! This just looks like another IE "feature" we will have to remember :)
acoder 16,027
Recognized Expert Moderator MVP
unfortunately, that script is not under my control... and although it looks silly calling a variable "event", IE is absolutely more silly by allowing that to rewrite window.event!
Anyway, for the moment, changing the script looks like the only viable solution...
thanks everybody for your help! This just looks like another IE "feature" we will have to remember :)
True, I'll have to add it to the list of bugs. Thanks for bringing this up.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Barry |
last post by:
Retoring Caret Position after text field correction
--------------------------------------------------------------------------------
Hi, my code has the following form -
function ConvertOld(myfield)
{
if (myfield.inchange)
return;
|
by: Tom Szabo |
last post by:
Is there an event when that triggers when the window is closing.... I am
talking about when the user clicks on the cross on the right top corner of
the window!!!
|
by: Earl Teigrob |
last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at
http://weblogs.asp.net/asmith/archive/2003/09/15/27684.aspx
but it was far more complex then I needed. (I got lost trying to figure it all out). Therefore, here goes my simple "web dialog box with parent event handler fireing" solution.
...
|
by: Tom |
last post by:
I have a large application; lots of forms, multiple dynamic DLLs, etc. I
also have, in the appliation, a general 'Preferences' class object (which is
in itself a separate DLL, and I just include a reference to it so I can
instantiate it at the beginning) which stores all my user preferences. I
serialize the data to and from an XML file, thereby saving and restoring the
user preferences with ease. I also have a Preferences form that the user...
|
by: Együd Csaba |
last post by:
Hi,
the restoration of a dump stops at the line above. The dump was created with
pgsql 7.3.2 and I need to pump it into a 7.4.3 one. Should anybody tell me
what the problem can be and how I can solve it.
(There are double apostophes many times in the string - is it normal???
Besides of the field separator of course...)
Many thanks,
Csaba Együd
| |
by: David McDivitt |
last post by:
Rather than have several different pages, an app was designed to have
different sections, all on one page. To get to the different sections the
browser is scrolled down. It may take several submits before everything gets
filled out correctly. The user complained because the page would not scroll
to the previous position, code was installed to save and restore the page
position, but it doesn't always go to the same place. Sometimes it does....
|
by: Robbert van Geldrop |
last post by:
Hello,
I have a problem restoring Exchange 2000 files. Our software has an
interface to ESEBCLI2.dll for online backup and restore features. Everything
works fine with Exchange 2003 and also when backing up Exchange 2000, yet
restoring Exchange 2000 gives some problems:
A Store is restored:
* the restore is started.
|
by: Troels Arvin |
last post by:
Hello,
Every so often, I'm asked to help people recover data from tables that
were either dropped or where to much data was DELETEed.
The complications related to restoring data are a problem. The SAS users
are laughing because they can (to a certain extend) easily go back to an
earlier SAS table by simply starting dsm. Of course, a flat file table is
different than a relational table; but still, the trouble related to
restoring DB2...
|
by: rjha94 |
last post by:
$db2evmon -db DEV1926 -evm DB2DETAILDEADLOCK was showing data from all
the runs whereas i want the data just for a single run. To capture
fresh events, I deleted the old events file. caveat was, I deleted
this event file while DB2DETAILDEADLOCK was still active (state 1).
now when i Try to run the db2evmon command I get an error like
Cannot open Event Monitor file "/home/db2inst1/db2inst1/NODE0000/...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
| |
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...
|
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,...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |