Jump to content

How to make drop down selection to effect other types of fields


MockY

Recommended Posts

I have made a Mail form where the user chooses who he/she is from a drop down list, and depending on their choice, their email signature should appear in the <textarea>. How is that possible with PHP? Is it even possible, or do I have to use Java?

This is what I mean:

 

<select name="from">

  <option value="none">Who Are You?</option>

    <option value="Mary <[email protected]>">Mary</option>

  <option value="Ryan <[email protected]">Ryan</option>

  <option value="Sam <[email protected]">Sam</option>

  </select>

 

Now, let say Ryan enters the site and he wants to mail a specific person. So he selects his name. When that selection is made, his signature should automatically appear in the <textarea>.

 

And I wonder if this is possible somehow in PHP. If now, could you point me in the right direction (Ajax or something similar)

I have been looking around, and can't say that Java is my strength. I found some what an example that might work here http://www.java2s.com/Code/JavaScriptReference/Event-Handlers-Reference/onChangeExample.htm

but I don't understand where to put the three different events that will happen once it is selected. Could yu help or point me in the right direction on some site?

 

All help is appreciated, thank you.

I have been looking around, and can't say that Java is my strength. I found some what an example that might work here http://www.java2s.com/Code/JavaScriptReference/Event-Handlers-Reference/onChangeExample.htm

but I don't understand where to put the three different events that will happen once it is selected. Could yu help or point me in the right direction on some site?

 

All help is appreciated, thank you.

 

You have to stop saying Java. Java and Javascript are two completely different languages! Just a heads up ;)

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.