473,667 Members | 2,548 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...@gregork ofler.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";aler t(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.gregorkof ler.at::: Landschafts- und Reisefotografie http://web.gregorkofle r.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 5991
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,

Unfortunatel y, 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
10025
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 class and a function in Python ??? Consider the following code fragments : # Fragment 1 begins a = 1
2
2200
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
3669
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 { /* ... */ }; template<class T> classSubject {
5
3153
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 CommonPageBase - Contains myPage which inherits PageBase Each of these classes overrides OnInit and ties an event handler
10
1636
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 certain methods if a global indicates it is okay to have those methods. So I want something like: global allow allow =
2
2799
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 "TimeTracker Start-up Kit" for my needs. ****** BEGINING OF TIME TRACKER SUMMARY ***** First, in the "TimeTracker Start-Up Kit" they appear to have tried to set it up so that it can be expanded to any number of different datasource types (SQL, Access,...
7
1950
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! Michael
14
2627
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 Language, but there isn't a detail and complete description on all the class members, aren't they important to class composing? Could you explain the special class behavior in detail? Thank you very much.
70
3353
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 void MessageBeep(BeepTypes type){ if(!MessageBeep((UInt32) type)){ Int32 err = Marshal.GetLastWin32Error();
15
2393
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
8883
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
8787
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...
0
8645
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 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...
0
7389
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, 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...
0
4200
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
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
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
2013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1778
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.