473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

IE: Object expected; Moz: runs fine

I have a html document, in which I include two standard libraries of
functions (supposed to help me with cross browser issues), and one
application-specific script file. All Javascript fcoz.

The very first attempt at invoking a function from this last script file
fails miserably in IE (6) but works as it should in Moz (1.4)

I have tried putting alert()s here and there, so I (think I) can tell
the exact spot where IE dies.

Structure is like this (all in HEAD):

<script type="text/javascript" src="../libPlatform.js"></script>
<script type="text/javascript" src="../libDOM.js"></script>
<script type="text/javascript" src="tooltip.js"></script>
<script type="text/javascript">

function register() {
initAPI();
alert('after init');
regTooltip('a1');
alert('after dreg-1');
regTooltip('a2');
}
</script>

initAPI sits in libPlatform, and executes. I get to see the first alert.
And then, boom, IE script errors on page: Object expected (points to
'regTooltip')

Am I missing something here? If my code is wrong, why is Mozilla so
forgiving about it? How can I persuade IE to get the function?

Note: if I put regTooltip() right above register(), so locally in the
document, it works.
--
Bas Cost Budde
http://www.heuveltop.nl/BasCB

Jul 20 '05 #1
3 1279
In article <bv***********@news2.solcon.nl>, ba*@heuveltop.org
enlightened us with...

Am I missing something here? If my code is wrong, why is Mozilla so
forgiving about it? How can I persuade IE to get the function?


It's really hard to guess without the rest of the code.
Do you have a URL with a functioning (or malfunctioning, if you prefer
*LOL*) test page you can show us so we can see all the code? Posting it
all here would be rather large for Usenet, I'd gather.

--
--
~kaeli~
If that phone was up your a$$, maybe you could drive a
little better!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2
kaeli wrote:
It's really hard to guess without the rest of the code.
Do you have a URL with a functioning (or malfunctioning, if you prefer
*LOL*)
<grin>

test page you can show us so we can see all the code? Posting it all here would be rather large for Usenet, I'd gather.


In the process of creating such a page I came across two function
declarations with the same function name.

Stupid. That is, on hindsight. <looks around> who said I was stupid? ;-)

Thanks for providing the different view I needed.
--
Bas Cost Budde
http://www.heuveltop.nl/BasCB

Jul 20 '05 #3
In article <c0**********@news2.solcon.nl>, ba*@heuveltop.org enlightened
us with...

In the process of creating such a page I came across two function
declarations with the same function name.

Stupid. That is, on hindsight. <looks around> who said I was stupid? ;-)

Thanks for providing the different view I needed.


You're welcome.
And that's one of the biggest reasons we advocate doing that - making
small test pages that illustrate the problem. They often catch these
kinds of errors. They can catch typos and stuff, too.
--
--
~kaeli~
Can you be a closet claustrophobic?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #4

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

Similar topics

6
by: F. Da Costa | last post by:
Hi, I've been running into something that strikes me as pretty annoying (esp since I don't know how to work around it). It concerns the extension of Object and the usage of Maps. Following a...
5
by: yawnmoth | last post by:
onmouseover and onmouseout seem only to work half the time in a script i wrote to fade between different opacities: http://www.frostjedi.com/terra/dev/test.html (works in firefox, but not in...
7
by: Bob Darlington | last post by:
I'm using Access 2002 to try to open Outlook 2002 (late binding) using: Dim objOutlook As Object Set objOutlook = CreateObject("Outlook.Application") I get the above error if Outlook is closed...
8
by: Patreek | last post by:
Hi, On the line where I'm assigning RecordCount to be the value of my output parameter, I'm getting the generic "Object reference not set to an instance of an object" error. I've isolated it...
16
by: Java script Dude | last post by:
Creating a method of object (Object.prototype.classOf ...) is not the correct way because of a (as expected) flaw in IE where DOM Elements does not inherit from Object. As a result it is best to...
12
by: Andrew Poulos | last post by:
With the following code I can't understand why this.num keeps incrementing each time I create a new instance of Foo. For each instance I'm expecting this.num to alert as 1 but keeps incrementing. ...
0
by: gentsquash | last post by:
My CSS does not validate at http://jigsaw.w3.org/css-validator/ Attempting to validate, for example, my http://www.math.ufl.edu/~squash/course.advcal.2008t.html produces (lightly edited) ...
6
by: cleary1981 | last post by:
I have adapted code from http://dunnbypaul.net/js_mouse/ I want to use a button to create new draggable divs but i keep getting error "is null or not an object" heres the code <html> <head>...
3
by: suganya | last post by:
Hi Some professionals already has developed the project using menu. In my company, they have given me task to clear the error in that. It is a script file named as "menubarAPI4.js" which is kept...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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,...
0
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...
0
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
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,...

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.