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
Page 1 of 1
change dropdown to textbox
#2
Posted 08 January 2009 - 08:05 PM
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
there are many ways but this should work
<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>
- ← VBScript commentboard
- Web Development (HTML, Java, PHP, ASP, XML, etc.)
- check input from textbox →
Share this topic:
Page 1 of 1



Help

Back to top








