PDA

View Full Version : Radial + Submit


ven0m
08-11-2009, 08:00 PM
Hi All,

Need a little help please.

I have a flash form with three options and a submit button.

http://www.imagechicken.com/uploads/1250021251009841500.jpg (http://www.imagechicken.com)

I need help on how to get the action script to submit which radial
button is selected using the geturl post method to a php page.

I have managed to get the flash file to submit the result to the php
file as soon as the radial is selected which is not the right way.

I only need the data submitted once the submit is pressed.

Dont know what im doing wrong

V

BronL
08-12-2009, 01:13 AM
Guessing: I think you need a variable to store which radial button has been clicked (removing any getURL code from them), then use the Submit button to send that variable.

ven0m
08-12-2009, 10:44 AM
Ok....thanks.....

Can you assist please.....

Havent done that before.....

All three Radial Buttons are part of "RadioGroup"

They data parameter of each radial is radio_1, radio_2 and radio_3

Can you tell me how to do the first radial and i will do the rest

V

BronL
08-13-2009, 06:09 AM
It'd be easier if you could upload your .fla...

ven0m
08-13-2009, 11:08 AM
Hi,

here you go....

hope this helps...

V

BronL
08-14-2009, 01:49 AM
OK. I'm not sure of the syntax of what you send to your php page - something like

getURL("http://www.mydomain.co.za/test.php?radio_2", "_blank", "POST");
or
getURL("http://www.mydomain.co.za/test.php?rb=radio_2", "_blank", "POST");

but all you need to do to replace the variable sent, is add to your Submit button code

on (release) {
// this gets the data value of the selected radio button
var theSelectedRB = radioGroup.selectedData;
var thePost:String = '"http://www.mydomain.co.za/test.php?'+theSelectedRB+'", "_blank", "POST"';
// OR
var thePost:String = '"http://www.mydomain.co.za/test.php?rb='+theSelectedRB+'", "_blank", "POST"';
getURL(thePost);
}


HTH

ven0m
08-14-2009, 02:40 PM
Thanx man.....

Stupid question......

Where do i add this script.....

Do I apply it to each radial.....

And which one do I add to the submit button....

Or do I have to add to the whole movie?

Sorry to be a pain....

Trying to grasp and understand this...

V

BronL
08-16-2009, 11:54 PM
No worries - it's on the submit button only.