Trigger Observe box operation

1 view
Skip to first unread message

muthu

unread,
Jun 30, 2008, 1:11:52 PM6/30/08
to Boston Ruby Group
Hi,

I have a search screen where i have to list boxes and the second
depends on the selection of the first.

Code:

<select id="mastid" multiple="miltiple">
<option value="1">One</option>
<option value="2">Two</option>
</select>

<div id="child_container">
<select multiple="multiple">
<option value="0">Choose a master</option>
</select>
</div>
<%= observe_field("mastid",
:update => "child_container",
:url => { :action => :selectlist_for_master },
:with => "'id='+value",
:on => "changed")
%>

It works well. But i wanted to show the results with the values
selected the same way it was here. For example, if i had selected
"One" at the master and it populated "11, 12, 13" and i selected only
12 on the second list box, i wanted to select those 2 choices on the
results page too.

I don't know know how to select entries and trigger the same event to
re-populate the second list box in ruby. Please suggest a way to do
it.

Thanks in advance

Muthu

Louise Rains

unread,
Jun 30, 2008, 2:40:49 PM6/30/08
to boston-r...@googlegroups.com
Has anyone used OpenGL with Ruby and/or Rails?

Thanks,
Louise

Aaron D. Ball

unread,
Jul 1, 2008, 6:02:46 AM7/1/08
to boston-r...@googlegroups.com
I'm not sure how you would use OpenGL with Rails, but yes, I've used
it with Ruby. It's here now: http://ruby-opengl.rubyforge.org/

When I used it (the versions from http://www2.giganet.net/~yoshi/),
the complete lack of English documentation was a little bit of a
nuisance, but if you're already familiar with OpenGL in C, the main
difference is just that instead of lots of typed subfunctions like
glRotate3f, glRotate4i, etc., you would just call GL.rotate with
however many integers or floats. Any syntax quirks you had to read
the source to figure out, but it was easy because Ruby is pithy. :)

Jason Morrison

unread,
Jul 1, 2008, 10:20:08 AM7/1/08
to boston-r...@googlegroups.com
If I'm remembering correctly, I've had good luck using the OpenGL portions of Ruby/SDL in the past (http://www.kmc.gr.jp/~ohai/rubysdl.en.html).
--
Jason Morrison
jason.p....@gmail.com
http://jayunit.net
(585) 216-5657

muthu

unread,
Jul 4, 2008, 6:22:23 AM7/4/08
to Boston Ruby Group
Hi,

Topic is somehow changed. Can you please answer my question if
possible?

Thanks,

Muthu
Reply all
Reply to author
Forward
0 new messages