Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make radio buttons select a different email address 1

Status
Not open for further replies.

ActionScriptNovice

Instructor
Joined
Oct 24, 2007
Messages
3
Location
GB
Hello Gurus, I'm very new to flash and probably dont know all the words needed to search for the right solution are, so my appologies if this is very obvious.

I have a working HTML form that uses the post method to send variables to an asp page on a server that I do not have access to change in any way.

<form method="POST" action=" name="form1">

It also uses some hiden fields (they told me to include them)

<input type="hidden" name="redirect" value=" <input type="hidden" name="subject" value="Contact Form from website"/>
<input type="hidden" name="recipient">
<input type="hidden" name="sort" value="Name,Company,Email,Telephone,Message" />

it uses a drop combo box to select different email addresses to send to


<select name="recipient" id="recipient">
<option value="simon@chilli-images.com">simon</option>
<option value="Matt@chilli-images.com">Matt</option>
<option value="enquiries@chilli-images.com">enquiries</option>
<option value="email@asabeaumont.co.uk">web design</option>
</select>

However I would like to make the form in flash and use 4 radio buttons to select one of the 4 email recipients.

The group of the 4 radio buttons i have called recipients and I have assigned a data value of the email addresses to each one of them.(the email address)

Do I have to include all of the hidden input types that I was advised to use for the HTML form if so where would I put all of these in the flash movie and how do I correcly assign the email form to select the correct address from a radio button?

Is it true that it will only work if uploaded to the server?

These are the text field I would like to use Name,Company,Email,Telephone,Message

This is very much appreciated if anyone could help me thankyou.
 
Hello kenneth thankyou for the quick responce. I have had a little success with a set a variable method

This is the actionscript in the main timeline:

subject = "Contact Form from Website";
recipient = "email@asabeaumont.co.uk";
sort = "Name,Company,Email,Telephone,Message";

This is the script for the submit button
on (release) {
getURL(" "", "POST");
}

However I really don't know how to change recipient dependant upon the 4 radio buttons. The data for each radio button can be an email address. I spent 6 days getting this far have I loaded variables or just set them already? You can probably tell I'm quite thick at this.
 
The way you're doing is not the best way - it's an ancient method...

But anyway, are you using RadioButton Component? If so you can get the sleeted data using: [tt]RadioButtonGroup.selection.data[/tt]

Kenneth Kawamoto
 
recipient = "radioGroup.selection.data";
recipient = radioGroup.selection.data;

recipient = RadioButtonGroup.selection.data


none of these seem to work, as I have to place it on the server to see if the asp file works with it, could you explain a little more please
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top