Getting data from JS to RB
Dec 17, 2007 20:19:47 GMT -5
Post by billw on Dec 17, 2007 20:19:47 GMT -5
This had been puzzling me before my code vacation, but I think I'll look at it with fresh eyes.
There are a number of circumstances in which it may be ideal to get a value from Javascript into Run BASIC. For instance, using a framework like OpenRico or script.aculo.us, it would be possible to do some pretty neat effects and other stuff. I know there are other use cases, but I just can't think of any right now... my brain is fried ATM...
Anyway, my first approach was to set up a hidden textbox that is used to pass values back to the script. The only drawback to this (beta 5) was that a textbox's contents$() method doesn't seem to catch values entered using the element's "value" DOM property. I haven't tried it outside RB, but the stuff I was putting in using JS did show up on-screen when I un-hid the textbox.
Perhaps, and this is just a muse, the script needs to throw the "blur" DOM event.
If anybody has any input, it'd be much appreciated!
thanks,
- Bill
There are a number of circumstances in which it may be ideal to get a value from Javascript into Run BASIC. For instance, using a framework like OpenRico or script.aculo.us, it would be possible to do some pretty neat effects and other stuff. I know there are other use cases, but I just can't think of any right now... my brain is fried ATM...
Anyway, my first approach was to set up a hidden textbox that is used to pass values back to the script. The only drawback to this (beta 5) was that a textbox's contents$() method doesn't seem to catch values entered using the element's "value" DOM property. I haven't tried it outside RB, but the stuff I was putting in using JS did show up on-screen when I un-hid the textbox.
Perhaps, and this is just a muse, the script needs to throw the "blur" DOM event.
If anybody has any input, it'd be much appreciated!
thanks,
- Bill