We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,991 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

add new inputs but saving the other

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

2
Contributors
1
Reply
1 Day
Discussion Span
3 Months Ago
Last Updated
2
Views
titosd
Junior Poster in Training
69 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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.

LastMitch
Industrious Poster
4,146 posts since Mar 2012
Reputation Points: 132
Solved Threads: 334
Skill Endorsements: 45

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0739 seconds using 2.69MB