1,105,546 Community Members

add new inputs but saving the other

Member Avatar
titosd
Junior Poster in Training
69 posts since Jan 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hello,

I"m try to add hidden input by ajax, and i succeed but not 100%

I want to add the inputs when a user select a value from select.

but the selects not constant, maybe in the page one select or two or three. it's related to another thing.

I want to add number of hidden inputs when the user select value from the first select, and if he select another value i want to add another inputs, and to save the inputs that added it in the first select.
like this

<select id"s1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>

if he select "2", i want to add 2 hidden inputs

<select id"s2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>

if he select 3 i want to add 3 hidden input but saving the two hidden input that he selected from the "s1"

I hope that you understand my English

Thanks alot

LastMitch
Deleted Member
 
0
 

@titosd

but the selects not constant, maybe in the page one select or two or three. it's related to another thing.

You know it would be easier if you show your ajax code instead of the buttons because there's no way for anyone to understand what you are trying to say.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article