# Creating variable.....?

**URL:** <https://www.ruby-forum.com/t/creating-variable/130085>\
**Category:** Rails\
**Created:** [February 25, 2008, 10:10am UTC](https://www.ruby-forum.com/t/creating-variable/130085 "2008-02-25T10:10:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/47e85d/32.png) [@casid](https://www.ruby-forum.com/u/casid)\
**Post date:** [February 25, 2008, 10:10am UTC](https://www.ruby-forum.com/t/creating-variable/130085/1 "2008-02-25T10:10:16Z")

</div>

Hi RoR developers,

I have selection which is not in form object. do you have any idea how  
to assign the value of selection to variable.  
I want to write something  
var select= document.selectionid.value;

is it possible to write ?

and  
I have another question which is about params[:id] too.

is it possible call the params[:id] of selection which is not in form  
object, from controller,  
can we assign it to variable? like

@name=params[:id]

thanks for any commends
