jvcgamer Posted November 1, 2009 Share Posted November 1, 2009 Hello, im here to ask for help. I need to know how to do when a player picks an option from a Option selecting menu a dialog box or text area apears for him to write text. Example <p>Packs: <select name="packs" size="1"> <option value=" Basic ">Basic</option> <option value=" Profecional ">Profecional</option> <option value=" Gold ">Gold</option> <option value=" Pay Per Slot ">Pay Per Slot</option> </select> If the person chooses Pay Per Slot , a text area or box apears and there the person enters the digits of slots etc.. , but only for that option. Not for the other ones. If any one could help i would apreciate it. btw, sorry for my bad english. Im spanish speaking Quote Link to comment Share on other sites More sharing options...
Amtran Posted November 1, 2009 Share Posted November 1, 2009 Probar esta, (try this ) <script type="text/javascript"> function selectFunction(select_value) { if (select_value == 'Pay Per Slot') { document.getElementById('makenewtextbox').innerHTML = '<input type="text" name="textbox">'; } } </script> <select onselect="selectFunction(this.value)"> <option value="Basic">Basic</option> <option value="Profecional">Profecional</option> <option value="Gold">Gold</option> <option value="Pay Per Slot">Pay Per Slot</option> </select> <span id="makenewtextbox"></span> Quote Link to comment Share on other sites More sharing options...
jvcgamer Posted November 1, 2009 Author Share Posted November 1, 2009 Thanks for the reply but its not working. Quote Link to comment Share on other sites More sharing options...
Amtran Posted November 1, 2009 Share Posted November 1, 2009 Hmm, are you sure you copied everything exactly? I just tested it and it worked for me. Quote Link to comment Share on other sites More sharing options...
jvcgamer Posted November 1, 2009 Author Share Posted November 1, 2009 Hmm, are you sure you copied everything exactly? I just tested it and it worked for me. Yes i did, I even copied and created a hole new php file, can i give link? or is it consider spam Quote Link to comment Share on other sites More sharing options...
Amtran Posted November 1, 2009 Share Posted November 1, 2009 As far as I know, it's okay to post links in this forum. Quote Link to comment Share on other sites More sharing options...
jvcgamer Posted November 1, 2009 Author Share Posted November 1, 2009 Well i tested it out here: www.onegamerz.com/ordenar/test.php Quote Link to comment Share on other sites More sharing options...
Amtran Posted November 1, 2009 Share Posted November 1, 2009 Ohhhhhhhhhh! How dumb of me Change: <select onselect="selectFunction(this.value)"> To: <select onChange="selectFunction(this.value)"> Quote Link to comment Share on other sites More sharing options...
jvcgamer Posted November 1, 2009 Author Share Posted November 1, 2009 It worked for a simple .php file but once i added to my page it dint work. It shows a small box next to each selection but no able to insert text the page is: http://www.onegamerz.com/ordenar/ where it sais Basico etc.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.