# With JS inserted input-tags are not passes as parameters to

**URL:** <https://www.ruby-forum.com/t/with-js-inserted-input-tags-are-not-passes-as-parameters-to/132800>\
**Category:** Rails\
**Created:** [March 24, 2008, 8:50pm UTC](https://www.ruby-forum.com/t/with-js-inserted-input-tags-are-not-passes-as-parameters-to/132800 "2008-03-24T20:50:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@adrie](https://www.ruby-forum.com/u/adrie)\
**Post date:** [March 24, 2008, 8:50pm UTC](https://www.ruby-forum.com/t/with-js-inserted-input-tags-are-not-passes-as-parameters-to/132800/1 "2008-03-24T20:50:12Z")

</div>

I use this:

function addBmw(){  
tel = $(‘bmws’).select(‘div[id^=bmw]’).size(); // for a unique id  
bmw = $F(‘sel\_bmw’).split(’|’); // selected bmw =\> 54|Valery  
bmw\_line = ‘

’;  
bmw\_line += ’&nbsp; ![delete](https://test.ruby-forum.com/images/delete-icon.jpg)';  
bmw\_line += ‘’;  
bmw\_line += ’&nbsp;’ +  
bmw[1] + ‘’;  
bmw\_line += ‘
’;  
Element.insert(‘bmws’, {bottom: bmw\_line});  
}  
function delBmw(bmw\_id){  
Element.remove(‘bmw’ + bmw\_id)  
}

With this client-side javascript I add input tags to a webpage, but when  
I submit the page, there are no parameters created for the input fields,  
when it is entering the controller???

Someone knows an answer? (or is it just working as designed?)

TIA, Adrie

---

<div class="post-metadata">

**Author:** ![adrie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@adrie](https://www.ruby-forum.com/u/adrie)\
**Post date:** [March 24, 2008, 8:55pm UTC](https://www.ruby-forum.com/t/with-js-inserted-input-tags-are-not-passes-as-parameters-to/132800/2 "2008-03-24T20:55:57Z")

</div>

On 24 Mar 2008, at 19:50, Adrie D. wrote:

> 

Are your inserted html tags actually inserted in between the   
tags ?

---

<div class="post-metadata">

**Author:** ![adrie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@adrie](https://www.ruby-forum.com/u/adrie)\
**Post date:** [March 24, 2008, 9:34pm UTC](https://www.ruby-forum.com/t/with-js-inserted-input-tags-are-not-passes-as-parameters-to/132800/3 "2008-03-24T21:34:19Z")

</div>

Frederick C. wrote:

> On 24 Mar 2008, at 19:50, Adrie D. wrote:
> 
> > 
> 
> Are your inserted html tags actually inserted in between the   
> tags ?

Yes, sure they are!

Thanks for the reply, I’m really stuck with this problem, I tried it  
without JS, but with a partial, but with the same result: newly added  
inputs are NOT returned to my controller!!!

Someone else has a clue?  
TIA, Adrie
