How to create and remove an html hidden field using jquery?
Posted
by
ChickenBoy
on Stack Overflow
See other posts from Stack Overflow
or by ChickenBoy
Published on 2011-11-19T17:33:47Z
Indexed on
2011/11/19
17:51 UTC
Read the original article
Hit count: 217
I am new to javascript and jquery so please bear with me.
First of all here is my code so that you can test it to see whats wrong: http://jsfiddle.net/Lzw4e/1/
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.
Please help me. Thanks in advance.
© Stack Overflow or respective owner