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?

Link to comment
Share on other sites

This is what I mean:

 

<select name="from">

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

    <option value="Mary <mary@mail.com>">Mary</option>

  <option value="Ryan <ryan@mail.com">Ryan</option>

  <option value="Sam <sam@mail.com">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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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