[Rails-spinoffs] Some handy methods - perhaps cool enough to be committed some time

2005-12-15 Thread Michael Krog
Hi. Some time ago I posted some prototype-"extensions", which could come in handy. I've been updating them a bit and added a few more and I think its time to share it again. Feel free to use it. The code should be rather self explaining, but heres a quickguide. - new Geometry.Size(width,heig

Re: [Rails-spinoffs] Context-question

2005-11-15 Thread Michael Krog
Sorry. Im acting like its a crappy monday. I forgot '.bind(this)' is usable for this matter. -Michael Michael Krog wrote: As script.aculo.us does not seem to be available these days, Im asking my question instead of looking it up. :-) Im making an Ajax.Request, but wou

[Rails-spinoffs] Context-question

2005-11-15 Thread Michael Krog
uest started"); } } var test=new MyClass(); test.myRequest(); --- SNAP --- Its just a dummy function - but it fails because onComplete does no have the right context and therefore can not use this.showMsg(). Any of you guys know how to maintain conte

[Rails-spinoffs] In the purpose of sharing efforts

2005-11-10 Thread Michael Krog
.Size(200,300); System.setWindowSize(size); System.getWindowPosition(); //Usage: var pos=System.getWindowPosition();alert("Pos. is: "+pos.x+"x"+pos.y); System.setWindowPosition(pos);//Usage: var pos=new Geometry.Positio

Re: [Rails-spinoffs] Save output of Ajax.InPlaceEditor to a variable?

2005-10-27 Thread Michael Krog
Hi Bill. There should be a getText-value on the editor. var field=new Ajax.InPlaceEditor('editme', '', {onComplete:readValue}); function readValue(){ alert(field.getText()); } Bill Lynch wrote: All, The Ajax.InPlaceEditor control is nice but I'd like the ability to read the changed