473,671 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with JScript in Internet Explorer

Hi:

I'm having an issue with a website design that I'm working on a web
page...and I'm coming up
with an Error after opening the web site Internet Explorer browser that
says:

Error

A Runtime Error has occurred. Do you wish to Debug?

Line: 413
Error: 'MSFPhover' is undefined

When I run the debugger it points to this line of code:

if(MSFPhover) { MSFPnav2n=MSFPp reload("_derive d/dock pick up.gif");
MSFPnav2h=MSFPp reload("_derive d/dock pick up_a.gif"); }

I'm not really sure how MSFPhover would be defined. Would really
appreciate any feedback on how this can go about being
done.

Thanks in advanced for any response.

Jul 23 '05 #1
7 2060
netsurfer wrote:
Hi:

I'm having an issue with a website design that I'm working on a web
page...and I'm coming up
with an Error after opening the web site Internet Explorer browser that
says:

Error

A Runtime Error has occurred. Do you wish to Debug?

Line: 413
Error: 'MSFPhover' is undefined
Look for the following abomination:

MSFPhover =
(((navigator.ap pName == "Netscape") &&
(parseInt(navig ator.appVersion ) >= 3 )) ||
((navigator.app Name == "Microsoft Internet Explorer") &&
(parseInt(navig ator.appVersion ) >= 4 )));

Change it to, or add:

MSFPhover = document.images ?true:false;

Mick



When I run the debugger it points to this line of code:

if(MSFPhover) { MSFPnav2n=MSFPp reload("_derive d/dock pick up.gif");
MSFPnav2h=MSFPp reload("_derive d/dock pick up_a.gif"); }

I'm not really sure how MSFPhover would be defined. Would really
appreciate any feedback on how this can go about being
done.

Thanks in advanced for any response.

Jul 23 '05 #2
Mick White wrote on 23 apr 2005 in comp.lang.javas cript:
Look for the following abomination:

MSFPhover =
(((navigator.ap pName == "Netscape") &&
(parseInt(navig ator.appVersion ) >= 3 )) ||
((navigator.app Name == "Microsoft Internet Explorer") &&
(parseInt(navig ator.appVersion ) >= 4 )));

Change it to, or add:

MSFPhover = document.images ?true:false;


And change that to:

MSFPhover = !!document.imag es

;-}

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #3
Evertjan. wrote:
Mick White wrote
MSFPhover = document.images ?true:false;

And change that to:

MSFPhover = !!document.imag es

;-}

Yes, but I didn't want to give out cryptic advice...
Mick

Jul 23 '05 #4
Mick White wrote:
Evertjan. wrote:
Mick White wrote
MSFPhover = document.images ?true:false;

> And change that to:

MSFPhover = !!document.imag es

Yes, but I didn't want to give out cryptic advice...


Cryptic to who? Shouldn't javascript programmers be expected to
understand the language's operators, and the implied type-conversions in
the above statement?

But if you want to write that statement in a way that is theoretically
unambiguous:-

MSFPhover = Boolean(documen t.images);

- should be sufficiently self-documenting. Though the reader is still
expected to understand the actions of the Boolean constructor when
called as a function.

Though, given the reported error, the OP's problem looks more related to
a failure to declare the variable in the global namespace. But the
information provided is inadequate for a meaningful analyses.

Richard.
Jul 23 '05 #5
Richard Cornford wrote:
Mick White wrote

MSFPhover = document.images ?true:false;
> And change that to:

MSFPhover = !!document.imag es


Yes, but I didn't want to give out cryptic advice...

[...]
But if you want to write that statement in a way that is theoretically
unambiguous:-

MSFPhover = Boolean(documen t.images);

- should be sufficiently self-documenting. Though the reader is still
expected to understand the actions of the Boolean constructor when
called as a function.


I doubt,in this case, that the OP would recognize "MSFPhover =
!!document.imag es" as being implied type casting (to Boolean), I simply
offered a more "readable" solution. I do like the Boolean constructor,
though; it's certainly less cryptic.
Mick
Jul 23 '05 #6
Mick White wrote on 24 apr 2005 in comp.lang.javas cript:
Evertjan. wrote:
Mick White wrote
MSFPhover = document.images ?true:false;

> And change that to:

MSFPhover = !!document.imag es

;-}

Yes, but I didn't want to give out cryptic advice...
Mick


true ..... false .... ;-)

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #7
Evertjan. wrote:
Mick White wrote on 24 apr 2005 in comp.lang.javas cript:

Evertjan. wrote:

Mick White wrote

MSFPhover = document.images ?true:false;
> And change that to:

MSFPhover = !!document.imag es

;-}

Yes, but I didn't want to give out cryptic advice...
Mick

true ..... false .... ;-)


!false
Mick


Jul 23 '05 #8

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

Similar topics

4
5549
by: Mark D. Anderson | last post by:
About a month ago Richard Cornford did an interesting analysis of a memory leak in jscript (internet explorer) when there are "circular" references between DOM objects and (real) jscript objects: http://groups.google.com/groups?selm=bcq6fn%24g53%241%248300dec7%40news.demon.co.uk This message summarizes some testing I've done and their results. These results somewhat contradict Cornford's conclusions; I haven't
4
1520
by: Drew | last post by:
I need to do some client-side scripting for my Intranet and was wondering if Jscript or Javascript would be better? Everyone here uses IE 5.0 +, so I need to make a decision... Thanks, Drew
0
1883
by: Niyazi | last post by:
Hi all, This my aspx page first line of code. <%@ Page CodeBehind="index.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="TB.index" %> Than inside head tag I have following script(s) --------------------------------------------------------------------------------------------------------------------- <script language="JavaScript"> //Disable Mouse Right Click Button
5
2075
by: Bob N | last post by:
I have an ASP.NET web page -- several auto-post back DropDownLists that perform a query against a relatively large database (3 to 4 seconds delay) that repopulate a couple of datagrids, comboboxes and a chart (using dotnetCharting control) on the same page. This works just fine on its own. However, when I integrated the page into the rest of the site, it is then placed inside a frameset. Again, the page seems to work fine EXCEPT under the...
102
7041
by: Xah Lee | last post by:
i had the pleasure to read the PHP's manual today. http://www.php.net/manual/en/ although Pretty Home Page is another criminal hack of the unix lineage, but if we are here to judge the quality of its documentation, it is a impeccability. it has or possesses properties of:
14
1894
by: Xah Lee | last post by:
sometimes in the last few months, apparently Microsoft made changes to their JavaScript documentation website: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/1e9b3876-3d38-4fd8-8596-1bbfe2330aa9.asp so that, one has to goddamn press the "expand" button to view the documentation, for every goddamn page. What the fuck is going on?
22
2311
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. Using this line of code works great. It displays a little message box with the alert message in it. Me.btnGetArchivedTrips.Attributes.Add("onMouseOver", "alert('mouse over')")
0
1577
by: Andy | last post by:
Hi, I have a MS Word binary data file that is sent from my .NET webservice in response to an XMLHTTP request from an Internet Explorer client. This data has to be base64 encoded to tunnel through a firewall. I've used the .NET Convert.ToBase64String() method to encode the data. I understand that the Convert.FromBase64String only runs on the server. How can I decode the data using jscript that's running on the browser?
15
3711
by: zz12 | last post by:
Hello, would anyone be able to confirm that 'jscript.dll' is a necessary file for an .asp page on IIS 5.0 to use the <script language="JavaScipt" runat="SERVER"code? It looks like the code in this section is not working and being recognized since it keeps giving me: "Microsoft JScript runtime (0x800A01B0) File name or class name not found during Automation operation" and am suspecting that this jscript.dll file is a necessary file...
0
8483
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
8402
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,...
0
8927
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...
1
8605
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
6237
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
5703
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
4227
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1816
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.