peps03
asked on
Fill form-field in 1 form with the value of a form-field in another form.
Hi,
I'm trying to fill a form-field in 1 form with the value of a form-field in another form.
This is not working for form-fields that are not in the same form, i think.
$("#mainmenu").change( function() {
$("#mainvalue").val($(this ).val());
});
mainmenu = i n form 1 / mainvalue = in form 2
How can i get it working?
I'm trying to fill a form-field in 1 form with the value of a form-field in another form.
This is not working for form-fields that are not in the same form, i think.
$("#mainmenu").change( function() {
$("#mainvalue").val($(this
});
mainmenu = i n form 1 / mainvalue = in form 2
How can i get it working?
ASKER
Oke, thanks
but it doesn't work here..
Does it matter that #mainmenu is a select input
and #mainvalue is a hidden input? i guess not..
i can't figure out why it wouldn't work.
Does it matter that there is also an ajax call done in the same change function?
Creating another change function also didn't help
BTW, moving the hidden field to the other form also didn't help the problem.. so that's not it.
but it doesn't work here..
Does it matter that #mainmenu is a select input
and #mainvalue is a hidden input? i guess not..
i can't figure out why it wouldn't work.
Does it matter that there is also an ajax call done in the same change function?
Creating another change function also didn't help
BTW, moving the hidden field to the other form also didn't help the problem.. so that's not it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ok two things
1. Did you try the posted code - did that work or not?
2. Can you post more of your code or give a link to a page because there is obviously something on your side that has not been described here which is making your solution fail.
The code I posted works - so if you are using the same logic we need to see more of the code to see why it is not working for you.
I assume javascript is enabled on the browser ??
1. Did you try the posted code - did that work or not?
2. Can you post more of your code or give a link to a page because there is obviously something on your side that has not been described here which is making your solution fail.
The code I posted works - so if you are using the same logic we need to see more of the code to see why it is not working for you.
I assume javascript is enabled on the browser ??
ASKER
Thanks for the help!
This now works. Maybe i had a typo.
Thanks a million!
This now works. Maybe i had a typo.
Thanks a million!
Open in new window