Connecting Tech Pros Worldwide Forums | Help | Site Map

replace a select box with a textbox

Familiar Sight
 
Join Date: Jun 2008
Posts: 164
#1: Aug 27 '08
Hi,

Was just wondering if it was possible to write a function that would replace an existing selectbox with a text box? I know you could use hide.

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Aug 27 '08

re: replace a select box with a textbox


You could use replaceChild on the parent element/node to completely replace it. Would you want to swap it back again later? If so, then you'd be better off hiding the select element and showing the text box.
Reply