PDA

View Full Version : checkbox component and cgi


adamb70
07-14-2003, 12:14 PM
I have a small problem which I'd appreciate some help with.

I have a Flash mx form that I need to put a checkbox on but cannot seem to populate the database with the correct info.

The cgi is creating the field in the database but it seems as though the checkbox isnt passing any values.

I'm sure I'm missing something in Flash, some code or something to pass the value to the cgi script?

I have text boxes in the form which are working fine I have simply named the variables and that works fine.

I hope someone has the answer!

In case you need it the cgi reads as follows:

<script language="javascript">
function EmailAlert(GetValue) {
if(GetValue=="") {
alert("Please enter your email address");
} else {
alert("Please enter a valid email address");
}
}

function SubmitThisForm(GetEmail,GetFriend1,GetFriend2,GetF riend3,GetOptIn) {
document.JoinForm.Email.value = GetEmail;
document.JoinForm.FriendEmail1.value = GetFriend1;
document.JoinForm.FriendEmail2.value = GetFriend2;
document.JoinForm.FriendEmail3.value = GetFriend3;
document.JoinForm.OptIn.value = GetOptIn;
document.JoinForm.submit();
}
</script>






<form action="http://www.jointhelist.com/cgi-bin/vjoinform.cgi" method="POST" name="JoinForm" onSubmit="return ValidateForm();" target="_parent">
<INPUT type="hidden" name="ReleaseID" value="heartjustina_v">
<INPUT type="hidden" name="PageName" value="http://www.jointhelist.com/heartfm/justina/justinarep.html">
<INPUT type="hidden" name="Email" value="">
<INPUT type="hidden" name="FriendEmail1" value="">
<INPUT type="hidden" name="FriendEmail2" value="">
<INPUT type="hidden" name="FriendEmail3" value="">
<INPUT type="hidden" name="OptIn" value="">
</form>

freddycodes
07-14-2003, 01:02 PM
I guess maybe you forgot to mention a step, where is the actionscript to submit the form from flash? Does the form submit to this page first or something? You show an thml form with some javascript validation. The html form is simply a collection of hidden inputs. How do they get populated with the data from the Flash movie?

adamb70
07-14-2003, 01:22 PM
would it be possible for me to send you the flash file and html so you can have a look?

I'm really stumped but am sure its such a simple thing.

Thanks for your time

freddycodes
07-14-2003, 01:26 PM
Sure post the fla here, or send it to me through the email function of this forum.

adamb70
07-15-2003, 01:04 PM
sorry for the delay, you can view the HTML here :
http://www.jointhelist.com/heartfm/justina/justina.html
A zip file is attached containing the fla file.

Thanks again

freddycodes
07-15-2003, 01:09 PM
Yeah it appears someone made this to use a combination of flash and an html form. Your zip file is corrupt so I can't look at the fla.

adamb70
07-15-2003, 01:21 PM
how do i email it to you - having trouble uploading it