not everything is a  class and needs initiating with "new" ... you should 
check what does need "new" and what doesn't .. some effects need to be 
initiated as objects as they are classes and some dont

----- Original Message ----- 
From: "fero" <[EMAIL PROTECTED]>
To: "Prototype &" <>
Sent: Wednesday, December 03, 2008 1:54 PM
Subject: [Proto-Scripty] Is the "new" statement ever needed ?

> As I read the Prototypejs documentation, I noticed that every example
> in using your "classes" begin with the "new" statement.
> So I have written all my code like "new Ajax.Request" , "new
> Effect.SlideDown" etc.
> This works very well for FF.
> Now I am porting my code to IE :( and as I got some (other) errors I
> discovered the wonderful
> <a href="">JSLint</a> which tells me that
> 'new' should not be used as a statement
> Since I don't really know too much of internals of Javascript: I was
> wondering if it is the same
> to do
> "new Ajax.Request" and "Ajax.Request"
> just to make JSLint not to bother me :)
> If it is the same, I think you should write a couple of lines in
> prototypejs documentation about this.
> Thank you very much
> fero
> >

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at

Reply via email to