Re: Class not defined



On 29 abr, 14:54, Gregor Kofler <use...@xxxxxxxxxxxxxxx> wrote:
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.

One should place the alert before the instantiation of the object. The
definition can be "anywhere".

The confusing thing here is that IE seems to ignore the whole
definition <script> block.


I was googling for more than a reasonable time but i did not found the
cause... any help? Please consider that I'm using Portotype framework
(I also tried its Class creation API but the result was the same) and
Scriptaculous (its Ajax.Autocompleter worked without problems, but we
need a more customized control in order to fit our needs).

Eeek.
Well, in this case I suggest to add a pinch of jQuery. And some mootools
for good measure.

Not asking for opinion, just for some concrete help.


Thanks in advance.

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.

Thanks anyway for posting.

Gregor

--http://photo.gregorkofler.at::: Landschafts- und Reisefotografiehttp://web.gregorkofler.com ::: meine JS-Spielwiesehttp://www.image2d.com ::: Bildagentur für den alpinen Raum

.



Relevant Pages

  • Re: Class not defined
    ... I've implemented a customized autocompleter using prototypes and it ... this NG) and posting no code whatsoever. ... don't need to post in groups asking about this kind of stuff, ...
    (comp.lang.javascript)
  • Re: Class not defined
    ... I've implemented a customized autocompleter using prototypes and it ... this NG) and posting no code whatsoever. ... don't need to post in groups asking about this kind of stuff, ...
    (comp.lang.javascript)