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

Regards
Alex
----- Original Message ----- 
From: "fero" <[EMAIL PROTECTED]>
To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
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="www.jslint.com">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 & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to