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

Member Avatar for LastMitch

@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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.