Help - Search - Members - Calendar
Full Version: change dropdown to textbox
MSFN Forums > Coding, Scripting and Servers > Web Development (HTML, Java, PHP, ASP, XML, etc.)

   


Google Internet Forums Unattended CD/DVD Guide
kabucek
hi @LL,

i have dropdown box which selects event from our sql database using arrays and php.
here is the code for the dropdown:




$selectedProductCodeTag="

<select name='selectedProd'>

<option value='eventcode'> Today, event at my place

</select>


How to change it into textbox, so users will be able to type in something like:


01-02-2009

which will be date of the event,
and eventcode will be changed to 10-02-2009



thanks
ryuko
i must not have read it good enough but im not sure what langauge but here i will explain it in vbscript.
there are many ways but this should work
CODE
<script type="text/VBScript" langauge="VBScript">
sub this()
if eventcode.selected = (true) then
document.all("div1").innerhtml="<textarea ID='1'>" & "your date here" & "</textarea>"
end if
end sub
</script>

<div ID="div1">
<select name='selectedProd'>
<option value='' selected> </option>
<option value='eventcode' id="eventcode" name="Eventcode"> Today, event at my place</option>

</select>
<button onclick="this()">ok</button>
</div>




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.