[Borges-users] Javascript

Eric Hodel drbrain at segment7.net
Mon Apr 26 15:08:37 EDT 2004


wilkes joiner (wilkesjoiner at gmail.com) wrote:

> Great work on Borges! ?I'm glad to see it in Ruby. ?Seaside has really
> impressed me, but a Ruby version is more compelling to me.
> 
> Is there an example of how to use Javascript in a component? ?I wasn't
> able to turn up anything by browsing the code.

There's #script on Borges::Component which works just like #style.

In your component, define a script method that returns the JS as
a String, and it will be attached as a <link> to your pages.

You can attach onclick and similar behaviors to elements with
r.attributes[:onclick] = "js_here();"

> By the way, is there a wiki for Borges? ?It could be a good place to
> store this kind of info. ?Maybe use the one on RubyGarden?

No, but one could be created on the RubyForge site, as I see some of the
other projects have Wikis setup.

-- 
Eric Hodel - drbrain at segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/borges-users/attachments/20040426/7825486d/attachment.bin


More information about the Borges-users mailing list