Set values in fields created dynamically
up vote
0
down vote
favorite
have a simple registration form which can replicate the same N times for N inscriver people at once.
I have to set the values of the VALUE
field depending on selected SELECT
option Participant independently for each registration form dynamically created option.
I tried several things but I can not make the event ( on change) fired from a given SELECT
change only the value of that piece of form created in javascript field.
I would like to create fields where SELECT
fired an event that only alter its respective VALUE field according to the selected users in the SELECT
option and that the trigger its SELECT
, the VALUE
field of the registration form to receive the value of the select value changed. I want this to happen independently created for all sections on the form .
I'm having the following problem, it seems that other SELECTS created dynamically follow the original select . Are not independent.
How can I fix this? The link below is the source code and the same
link: http://jsbin.com/lupeweha/5
javascript jquery html5 javascript-events
add a comment |
up vote
0
down vote
favorite
have a simple registration form which can replicate the same N times for N inscriver people at once.
I have to set the values of the VALUE
field depending on selected SELECT
option Participant independently for each registration form dynamically created option.
I tried several things but I can not make the event ( on change) fired from a given SELECT
change only the value of that piece of form created in javascript field.
I would like to create fields where SELECT
fired an event that only alter its respective VALUE field according to the selected users in the SELECT
option and that the trigger its SELECT
, the VALUE
field of the registration form to receive the value of the select value changed. I want this to happen independently created for all sections on the form .
I'm having the following problem, it seems that other SELECTS created dynamically follow the original select . Are not independent.
How can I fix this? The link below is the source code and the same
link: http://jsbin.com/lupeweha/5
javascript jquery html5 javascript-events
2
You have not pasted link. Moreover add your code here at StackOverflow.
– Satpal
May 17 '14 at 20:58
Sorry, the code is huge, I'll put.
– Elton da Costa
May 17 '14 at 21:11
2
Add only relevant code
– Satpal
May 17 '14 at 21:15
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
have a simple registration form which can replicate the same N times for N inscriver people at once.
I have to set the values of the VALUE
field depending on selected SELECT
option Participant independently for each registration form dynamically created option.
I tried several things but I can not make the event ( on change) fired from a given SELECT
change only the value of that piece of form created in javascript field.
I would like to create fields where SELECT
fired an event that only alter its respective VALUE field according to the selected users in the SELECT
option and that the trigger its SELECT
, the VALUE
field of the registration form to receive the value of the select value changed. I want this to happen independently created for all sections on the form .
I'm having the following problem, it seems that other SELECTS created dynamically follow the original select . Are not independent.
How can I fix this? The link below is the source code and the same
link: http://jsbin.com/lupeweha/5
javascript jquery html5 javascript-events
have a simple registration form which can replicate the same N times for N inscriver people at once.
I have to set the values of the VALUE
field depending on selected SELECT
option Participant independently for each registration form dynamically created option.
I tried several things but I can not make the event ( on change) fired from a given SELECT
change only the value of that piece of form created in javascript field.
I would like to create fields where SELECT
fired an event that only alter its respective VALUE field according to the selected users in the SELECT
option and that the trigger its SELECT
, the VALUE
field of the registration form to receive the value of the select value changed. I want this to happen independently created for all sections on the form .
I'm having the following problem, it seems that other SELECTS created dynamically follow the original select . Are not independent.
How can I fix this? The link below is the source code and the same
link: http://jsbin.com/lupeweha/5
javascript jquery html5 javascript-events
javascript jquery html5 javascript-events
edited Nov 11 at 6:54
Cœur
17.1k9102140
17.1k9102140
asked May 17 '14 at 20:51
Elton da Costa
8401022
8401022
2
You have not pasted link. Moreover add your code here at StackOverflow.
– Satpal
May 17 '14 at 20:58
Sorry, the code is huge, I'll put.
– Elton da Costa
May 17 '14 at 21:11
2
Add only relevant code
– Satpal
May 17 '14 at 21:15
add a comment |
2
You have not pasted link. Moreover add your code here at StackOverflow.
– Satpal
May 17 '14 at 20:58
Sorry, the code is huge, I'll put.
– Elton da Costa
May 17 '14 at 21:11
2
Add only relevant code
– Satpal
May 17 '14 at 21:15
2
2
You have not pasted link. Moreover add your code here at StackOverflow.
– Satpal
May 17 '14 at 20:58
You have not pasted link. Moreover add your code here at StackOverflow.
– Satpal
May 17 '14 at 20:58
Sorry, the code is huge, I'll put.
– Elton da Costa
May 17 '14 at 21:11
Sorry, the code is huge, I'll put.
– Elton da Costa
May 17 '14 at 21:11
2
2
Add only relevant code
– Satpal
May 17 '14 at 21:15
Add only relevant code
– Satpal
May 17 '14 at 21:15
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I see you actually fire the event on the select by calling the "select" element, which then fires the same event on ALL the selects! Create ids, and then call your functions independently.
function bindSelect(){
$('select').on('change', function() {
....
// hey, here all the selects get this function, on change.
$('#main-select').on('change', function() {
...
$('#other-select1').on('change', function() {
...
$('#other-select2').on('change', function() {
Hope it helps.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I see you actually fire the event on the select by calling the "select" element, which then fires the same event on ALL the selects! Create ids, and then call your functions independently.
function bindSelect(){
$('select').on('change', function() {
....
// hey, here all the selects get this function, on change.
$('#main-select').on('change', function() {
...
$('#other-select1').on('change', function() {
...
$('#other-select2').on('change', function() {
Hope it helps.
add a comment |
up vote
0
down vote
I see you actually fire the event on the select by calling the "select" element, which then fires the same event on ALL the selects! Create ids, and then call your functions independently.
function bindSelect(){
$('select').on('change', function() {
....
// hey, here all the selects get this function, on change.
$('#main-select').on('change', function() {
...
$('#other-select1').on('change', function() {
...
$('#other-select2').on('change', function() {
Hope it helps.
add a comment |
up vote
0
down vote
up vote
0
down vote
I see you actually fire the event on the select by calling the "select" element, which then fires the same event on ALL the selects! Create ids, and then call your functions independently.
function bindSelect(){
$('select').on('change', function() {
....
// hey, here all the selects get this function, on change.
$('#main-select').on('change', function() {
...
$('#other-select1').on('change', function() {
...
$('#other-select2').on('change', function() {
Hope it helps.
I see you actually fire the event on the select by calling the "select" element, which then fires the same event on ALL the selects! Create ids, and then call your functions independently.
function bindSelect(){
$('select').on('change', function() {
....
// hey, here all the selects get this function, on change.
$('#main-select').on('change', function() {
...
$('#other-select1').on('change', function() {
...
$('#other-select2').on('change', function() {
Hope it helps.
answered May 18 '14 at 0:15
Giancarlo PSK
1867
1867
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f23715965%2fset-values-in-fields-created-dynamically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
You have not pasted link. Moreover add your code here at StackOverflow.
– Satpal
May 17 '14 at 20:58
Sorry, the code is huge, I'll put.
– Elton da Costa
May 17 '14 at 21:11
2
Add only relevant code
– Satpal
May 17 '14 at 21:15