Click here to Skip to main content
15,921,841 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I just wanted to jest out a hack tool... (not completed yet).. and I what tag/script I should write that can create a way to show/appear different things, i.e. if a user clicks on "transfer resources" (through the option) a new line may appear as ... like "Enter your name". Can I do this? Please, I will be thankful if anyone solves and gives the code back :).
Here is my code:


Choose what to do:
<select>


<optgroup label="I want to:"><option>Generate Resources </option>
<option >Decrease Resources</option>
<option >Transfer Resources </option></select>


<img src= "spam.png">Change
<input value= "Write the text from image above"
type= "text" size= "30" checked>

<button > Go</button>






Posted
Updated 16-Mar-15 0:28am
v3

1 solution

You need to study javaScript and the onchange() event.

Try this JavaScript Tutorial[^]

You probably should also look into the HTML tutorial as how one give values to <options> in <select>.

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900