I can''t get the inplace editor to do anything for me. The output
appears as
regular formated, unclickable text. Maybe I am missing something simple.
1. I just downloaded script.aculo.us <http://script.aculo.us> 1.5_rc3 and
copied it to my javascript folder.
2. To set up a simple test, I created a new test page containing only the
copied from demo1 from the script.aculo.us <http://script.aculo.us> wiki:
http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor
<p id="editme">Click me, click me!</p>
<script language="JavaScript">
new Ajax.InPlaceEditor(''editme'',
''/demoajaxreturn.html'');
</script>
3. The page loads okay, but no Ajax magic.
4. My javascript console displays the following errors:
Error: Element.getStyle is not a function
Source File: http://127.0.0.1:3000/javascripts/controls.js
Line: 474
Line 474 from control.js is this:
this.originalBackground = Element.getStyle(this.element,
''background-color'');
if (!this.originalBackground) {
this.originalBackground = "transparent";
}
I tried it in both Firefox 1.0.6 and IE6. I am using rails .13.1.
Am I missing something simple?
Thanks,
Steve
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Steve, It may be silly, but have you included all the necessary js files? The "Element" stuff is in prototype, not scriptaculous, so make sure to import that first. Could be wrong, but worth a guess. -Mark On 10/25/05, Steve Odom <steve.odom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I can''t get the inplace editor to do anything for me. The output appears > as regular formated, unclickable text. Maybe I am missing something simple. > > 1. I just downloaded script.aculo.us <http://script.aculo.us> 1.5_rc3 and > copied it to my javascript folder. > > 2. To set up a simple test, I created a new test page containing only the > copied from demo1 from the script.aculo.us <http://script.aculo.us> wiki: > http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor > > <p id="editme">Click me, click me!</p> > <script language="JavaScript"> > new Ajax.InPlaceEditor(''editme'', ''/demoajaxreturn.html''); > </script> > > 3. The page loads okay, but no Ajax magic. > > 4. My javascript console displays the following errors: > Error: Element.getStyle is not a function > Source File: http://127.0.0.1:3000/javascripts/controls.js > Line: 474 > > Line 474 from control.js is this: > this.originalBackground = Element.getStyle(this.element, > ''background-color''); > if (!this.originalBackground) { > this.originalBackground = "transparent"; > } > > I tried it in both Firefox 1.0.6 and IE6. I am using rails .13.1. > > Am I missing something simple? > Thanks, > > Steve > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Thanks Mark. Your suggestion spurred me to go down the path of changing my rails javascript from javascript_include_tag :default to ...prototype.js and scriptaculous.js. Which enabled it to start throwing an javascript error message that my prototype.js file is not 1.4. I forgot to update prototype.js. On 10/25/05, Mark Chadwick <mark.chadwick-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Steve, > > It may be silly, but have you included all the necessary js files? The > "Element" stuff is in prototype, not scriptaculous, so make sure to import > that first. Could be wrong, but worth a guess. > > -Mark > > On 10/25/05, Steve Odom <steve.odom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I can''t get the inplace editor to do anything for me. The output appears > > as regular formated, unclickable text. Maybe I am missing something simple. > > > > 1. I just downloaded script.aculo.us <http://script.aculo.us> 1.5_rc3and copied it to my javascript folder. > > > > 2. To set up a simple test, I created a new test page containing only > > the copied from demo1 from the script.aculo.us <http://script.aculo.us>wiki: > > http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor > > > > <p id="editme">Click me, click me!</p> > > <script language="JavaScript"> > > new Ajax.InPlaceEditor(''editme'', ''/demoajaxreturn.html''); > > </script> > > > > 3. The page loads okay, but no Ajax magic. > > > > 4. My javascript console displays the following errors: > > Error: Element.getStyle is not a function > > Source File: http://127.0.0.1:3000/javascripts/controls.js > > Line: 474 > > > > Line 474 from control.js is this: > > this.originalBackground = Element.getStyle(this.element, > > ''background-color''); > > if (!this.originalBackground) { > > this.originalBackground = "transparent"; > > } > > > > I tried it in both Firefox 1.0.6 and IE6. I am using rails .13.1. > > > > Am I missing something simple? > > Thanks, > > > > Steve > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs