Hi, The problem must be in code you haven't quoted. Use your editor to do a case-sensitive search for "class" (in all lower case), it's a reserved (but currently unused) word in JavaScript. Note that your quoted code uses "Class" (with an initial capital letter), which is fine.
HTH, -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Feb 20, 8:39 am, Alexey Stepanov <sager...@gmail.com> wrote: > This my script, when event is on exit from onClick i got message > "class is a reserved identifier class=" > > CheckBoxSlider = Class.create({ > initialize: function (checkbox, block) { > this.checkbox= $(checkbox); > this.block=$(block); > this.checkbox.observe("click", this.onClick.bind(this)); > }, > onClick: function (event) { > if (this.checkbox.checked) { > this.block.show(); > }else { > this.block.hide(); > } > } > > }); > > window.onload= function() { > tmp = new CheckBoxSlider("register-new-user","regiser-new-user- > fields"); > }; -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.