kabucek Posted January 9, 2009 Share Posted January 9, 2009 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-2009which will be date of the event,and eventcode will be changed to 10-02-2009thanks Link to comment Share on other sites More sharing options...
ryuko Posted January 9, 2009 Share Posted January 9, 2009 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<script type="text/VBScript" langauge="VBScript">sub this()if eventcode.selected = (true) thendocument.all("div1").innerhtml="<textarea ID='1'>" & "your date here" & "</textarea>"end ifend 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> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now