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

Home Posts Topics Members FAQ

Re: Class not defined

Alberto meinte:
On 29 abr, 14:54, Gregor Kofler <use...@gregorkofler.atwrote:
>Alberto meinte:
>>Hi,
I've implemented a customized autocompleter using prototypes and it
actually works like a charm in Firefox, but in IE 6/7 it just doesn't
work because that infernal thing says that 'Autocomp' (the class i
created for the autocompleter) is 'not defined'.
It's kind of weird because I tried to show an alert before of the
class definition but it is not shown even though the error is thrown
at the instantiation of the autocompleter.
Classes in JS? No such thing...

FALSE, extending the prototype in JS is usually done to simulate OO
behavior. Not real classes, but really useful ones.
Still: No classes. Douglas Crockford will tell you about the differences
between classes and prototypal inheritance.

The confusing thing here is that IE seems to ignore the whole
definition <scriptblock.
I suppose because of the errors in the code. Pasting it into JSEclipse
gives me:

"missing formal parameter" and "identifier is a reserved word"

Guess what? "class" is a reserved word - at least for IE.

Entering:

javascript:var class="42";alert(class); into the adress field of IE gives me
"Row 1 character 5 identifier expected ..."

That was easy, wasn't it?
>Seriously: What kind of help do you expect with such a problem
description? Using some library (one which is regularly scrutinized in
this NG) and posting no code whatsoever. Still, most likely the error
occurs somewhere *before* your instantiation of your autocompleter.

Well, not this kind of help of course. As I posted, I was googling,
which also implies looking for info in groups, as this one. I usually
don't need to post in groups asking about this kind of stuff, but
look! Today I had to.
With this attitude, the "problem" and your way to approach it, you sound
like a script kiddie.
Thanks anyway for posting.
You're welcome.
>--http://photo.gregorkofler.at::: Landschafts- und Reisefotografiehttp://web.gregorkofler.com ::: meine JS-Spielwiesehttp://www.image2d.com ::: Bildagentur für den alpinen Raum
....oh well, you hardly ever use usenet.

Gregor
--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Jun 27 '08 #1
6 5979
Hi again,

Unfortunately, after following your advice it still remains the same.
Pleas give a try if you don't mind from this package:

http://www.alu.ua.es/a/asb19/autocompleter.zip

Thank you in advance.
Jun 27 '08 #2
Alberto meinte:
Hi again,

Unfortunately, after following your advice it still remains the same.
Pleas give a try if you don't mind from this package:

http://www.alu.ua.es/a/asb19/autocompleter.zip
Are you sure, that you got the proper files? index.html has a typo,
therefore it can't load autocomplete*r*.js

Gregor

--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Jun 27 '08 #3
Gregor Kofler meinte:
Alberto meinte:
>Hi again,

Unfortunately, after following your advice it still remains the same.
Pleas give a try if you don't mind from this package:

http://www.alu.ua.es/a/asb19/autocompleter.zip

Are you sure, that you got the proper files? index.html has a typo,
therefore it can't load autocomplete*r*.js
After fixing the typo: What am I supposed to see? In both IE and FF I
get an input element. Finito. No errors, no AJAX, no nothing else.

Gregor
--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Jun 27 '08 #4
Sorry for the typo, but anyway, after correcting it, as you said it
does not work, but only in Firefox, try again. That's funny. I've
really seen this autocompleter working in Firefox, it never did in IE,
but now, after mentioned corrections it fails in FF ('Autocomp is not
defined') and seems to load in IE, but not working as it should.

Package at http://www.alu.ua.es/a/asb19/autocompleter.zip has been
corrected.

Any ideas?

Jun 27 '08 #5
Alberto meinte:
Sorry for the typo, but anyway, after correcting it, as you said it
does not work, but only in Firefox, try again. That's funny. I've
really seen this autocompleter working in Firefox, it never did in IE,
but now, after mentioned corrections it fails in FF ('Autocomp is not
defined') and seems to load in IE, but not working as it should.

Package at http://www.alu.ua.es/a/asb19/autocompleter.zip has been
corrected.
Trying to help you, is *no fun*.

"Autocomp is not defined" - index.html line 11. Firefox (and all others,
too)
Any ideas?
Ok. Typo fixed. FF reports a 404 on the XHR response. Seems as if you
fixed the wrong typo.
Ok. Second typo fixed, path corrected.

What now? Works ok in FF *AND* IE. What was your question?

Gregor

--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Jun 27 '08 #6
It's working now.

A thousand thanks, Gregor and everybody.
Jun 27 '08 #7

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

Similar topics

12
10003
by: Gaurav Veda | last post by:
Hi ! I am a poor mortal who has become terrified of Python. It seems to have thrown all the OO concepts out of the window. Penniless, I ask a basic question : What is the difference between a...
2
2181
by: Jerry | last post by:
My "main" class is getting a bit long...Is it possble to split a class definition into several files and then import the pieces to get the whole definition? Jerry
9
3650
by: Daniel Kay | last post by:
Hello! I have written two template classes which implement the observerpattern in C++. I hope I manage to desribe the problem I have. template<class T> class Observer { /* ... */ }; ...
5
3140
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
10
1620
by: David Hirschfield | last post by:
Here's a strange concept that I don't really know how to implement, but I suspect can be implemented via descriptors or metaclasses somehow: I want a class that, when instantiated, only defines...
2
2794
by: timpera2501 | last post by:
I am a newb to OOP programming and I'm only just starting with C#. I've done a TON of reading lately, and I'm currently in the process of modifying some of the function provided by the...
7
1939
by: Michael | last post by:
Hi, I could understand the difference between class and object. However, I could find out a good definiton of type. how to understand the relaitonship between type, class, and object? Thanks! ...
14
2609
by: lovecreatesbea... | last post by:
Could you tell me how many class members the C++ language synthesizes for a class type? Which members in a class aren't derived from parent classes? I have read the book The C++ Programming...
70
3288
by: garyusenet | last post by:
I'm using an example piece of code: - namespace Wintellect.Interop.Sound{ using System; using System.Runtime.InteropServices; using System.ComponentModel; sealed class Sound{ public static...
15
2378
by: Victor Bazarov | last post by:
Hello, Take a look at this program: ----------------------------------- class B { B(const B&); B& operator=(const B&); public: B(int);
0
7221
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
7313
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
7372
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
7481
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
5619
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
5039
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
3190
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
758
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.