Jump to content

Help with on player select an option a text area or dialog box apears to write


jvcgamer

Recommended Posts

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

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>

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..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.