# Making sub selects

**URL:** <https://www.ruby-forum.com/t/making-sub-selects/61289>\
**Category:** Rails\
**Created:** [December 5, 2005, 3:34pm UTC](https://www.ruby-forum.com/t/making-sub-selects/61289 "2005-12-05T15:34:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brutyn\_nick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@brutyn\_nick](https://www.ruby-forum.com/u/brutyn_nick)\
**Post date:** [December 5, 2005, 3:34pm UTC](https://www.ruby-forum.com/t/making-sub-selects/61289/1 "2005-12-05T15:34:18Z")

</div>

hey, i have a problem making subselects, i have this code and i want to  
use it  
in rails:

Brutyn NV Odevaere (VME res.) VME Complex Foster  
 Please select one of the options above first

i also use ajax for this, this is the code  
\<%= form\_remote\_tag ( :url =\> { :action =\> :new, :id =\> @caller\_id },  
:update =\> “div\_info” ,  
:complete =\> "  
new Ajax.Updater(‘list’,’/callerids/list/,{asynchronous:true,  
valScripts:true});  
" ) %\>  
\<%= render\_partial ‘form’ %\>  
\<%= submit\_tag(“Create”, :id =\> ‘form-submit-button’) %\>  
Creating…  
\<%= end\_form\_tag %\>

Now my problem is: how can i name the remote form???  
cuz i need this in my code see ‘var selbox = document.myform.geotagid;’  
and  
others. i want to use names because in the background i have also forms  
for  
searching, so i dont want to use numbers like forms[1] or forms[2].

can anyone help me?? or have any expirence in this?  
later on i want to write the javascripts value with a loop for each  
client.

I have tried it with ajax, that works partial but, i selected the first  
list,  
the second list is created and the i submit and the change a whole  
different  
area of the page he shouldnt do.

thx in advance
