Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
56
rated 0 times [  61] [ 5]  / answers: 1 / hits: 41397  / 13 Years ago, sat, november 19, 2011, 12:00:00

First of all here is my code so that you can test it to see what's wrong: JSFiddle



I want to create a new hidden field every time the user selects from the left <select> element and remove / destroy the hidden field when the user clicks the right <select> element.



I used the jQuery command $(<input type='hidden' value=selectedAddFootballPlayerId>); but when I checked of Firebug I can't see any hidden field being created. For removal of the hidden field I really don't know.


More From » jquery

 Answers
56

I think you are confused when defining the selector or where you want to display your new item. Try with this (I use text inputs):



http://jsfiddle.net/Lzw4e/6/


[#89015] Friday, November 18, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dayanaracolleeng

Total Points: 7
Total Questions: 96
Total Answers: 104

Location: Mayotte
Member since Mon, Sep 12, 2022
2 Years ago
;