[Rails] Re: select another value in a combo box with a button click

2008-10-10 Thread Erol Fornoles
On Oct 10, 6:04 pm, Jay Pangmi <[EMAIL PROTECTED]> wrote: > Thanks a tonn man... it works sweet. So, :camp, :id in the partial > becomes 'camp_id' and represents the combo box??? > -- > Posted viahttp://www.ruby-forum.com/. Yeah, select :camp, :id generates a select tag with an id of "camp_id" an

[Rails] Re: select another value in a combo box with a button click

2008-10-10 Thread Jay Pangmi
Erol Fornoles wrote: > On Oct 10, 1:54�pm, Jay Pangmi <[EMAIL PROTECTED]> > wrote: >> Thanks Erol Fornoles for the answer.. but I just couldn't make any use >> of it coz it doen't work and I'm using <%=javascript_include_tag >> "prototype.js"%>. To make clear what I'm doing here is my code: > > T

[Rails] Re: select another value in a combo box with a button click

2008-10-10 Thread Erol Fornoles
On Oct 10, 1:54 pm, Jay Pangmi <[EMAIL PROTECTED]> wrote: > Thanks Erol Fornoles for the answer.. but I just couldn't make any use > of it coz it doen't work and I'm using <%=javascript_include_tag > "prototype.js"%>. To make clear what I'm doing here is my code: Try this instead: <%= submit_tag

[Rails] Re: select another value in a combo box with a button click

2008-10-10 Thread Jay Pangmi
Erol Fornoles wrote: > On Oct 10, 1:54�pm, Jay Pangmi <[EMAIL PROTECTED]> > wrote: >> >> � Campgrounds >> � <%=select "camp", "id", @resultset %> >> > > Where is the partial rendered? And when should it be rendered? I don't > see it in your main view. The file below is the partial which gets r

[Rails] Re: select another value in a combo box with a button click

2008-10-09 Thread Erol Fornoles
On Oct 10, 1:54 pm, Jay Pangmi <[EMAIL PROTECTED]> wrote: > >   Campgrounds >   <%=select "camp", "id", @resultset %> > Where is the partial rendered? And when should it be rendered? I don't see it in your main view. --~--~-~--~~~---~--~~ You received this messag

[Rails] Re: select another value in a combo box with a button click

2008-10-09 Thread Jay Pangmi
Erol Fornoles wrote: > <%= submit_tag "Next", > :onclick => "if($('camp').length - 1 > $('camp').selectedIndex) $ > ('camp').selectedIndex++; return false;" %> Thanks Erol Fornoles for the answer.. but I just couldn't make any use of it coz it doen't work and I'm using <%=javascript_include_tag "

[Rails] Re: select another value in a combo box with a button click

2008-10-09 Thread Erol Fornoles
On Oct 10, 12:16 pm, Jay Pangmi <[EMAIL PROTECTED]> wrote: > Hi, guys thanks for all the help. Here's how I have created the combo > box: > > <%=select :camp, :id, @campsites_list%> > > So, how would I reference it and its a partial and its under > _campsites.rhtml (partial file). > Thanks. > > --

[Rails] Re: select another value in a combo box with a button click

2008-10-09 Thread Jay Pangmi
Hi, guys thanks for all the help. Here's how I have created the combo box: <%=select :camp, :id, @campsites_list%> So, how would I reference it and its a partial and its under _campsites.rhtml (partial file). Thanks. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~

[Rails] Re: select another value in a combo box with a button click

2008-10-09 Thread Erol Fornoles
Jay Pangmi wrote: > Hi, I was wondering if anyone can help me with this as I just don't seem > to figure out how I can refer to a combo box and change its selected > value to another with a button click. > Suppose a cambo box has values '1', '2', and '3' and I have a button > "Next" and that curre

[Rails] Re: select another value in a combo box with a button click

2008-10-09 Thread Bill Walton
Hi Jay, Jay Pangmi wrote: > > Hi, I was wondering if anyone can help me with this as I just don't seem > to figure out how I can refer to a combo box and change its selected > value to another with a button click. > Suppose a cambo box has values '1', '2', and '3' and I have a button > "Next" and