I have a <select>
drop down that I'm inserting into my HTML via jQuery. I don't have control over the HTML but I do have control over the JavaScript.
I'm trying to prop a value to an <input>
element when you select an option. Basically, I have a <select>
element with <option id="1">
and <option id="2">
onChange of this <select>
element;
If you select option#1
it should prop the value dummy1 to input[name="Check_Config_PaymentGateway_CreditCards_Login1"]
and the value dummy2 to input[name="Check_Config_PaymentGateway_CreditCards_Password"]
If you select option#2
it should prop the value dummy3 to input[name="Check_Config_PaymentGateway_CreditCards_Login1"]
and the value dummy4 to input[name="Check_Config_PaymentGateway_CreditCards_Password"]
I've been working on this jsFiddle.
I'm pretty new at JavaScript in general, let alone jQuery. This is way to sophisticated for my skill... If you can help me, I'd really appreciate it.