I’ve searched the forums for about 7-10 pages but nothing turned up, so here’s my problem.
I’m not sure if this is the right forum for this, it could also be placed in server side, but i’m not sure. OK, here it goes.
I have to make a brand new site for some people. Their old site was in regular HTML and the new site has to be in Flash. On the old site they had a mailform and they want to use the same one with the new site. I just can’t get it to work. Here’s what I did so far.
This code works. The ASP file it points to is somewhere on the server. This mail form is provided by their provider.
In Flash I made the same textfields and gave them variable names exactly like the HTML ones. I also placed a button and gave it the AS code:
[AS]
on(press){
loadVariablesNum(“asp/FormMail/FormMail.asp”,0,“post”);
}
[/AS]
But al of this doesn’t seem to work. Can anybody help me out here? I’m really kind of desperate. I’ve even tried PHP but I don’t think their provider supports PHP.
Is your button on the same timeline as the fields?
If not, the vars may not get sent, coz Flash will send out ALL variables from the timeline the loadVariables is called, but none others…
try putting all the form and the button in a separate mailer clip (makes it reusable too)…
When you say “it doesn’t seem to work”, that means what?
Cool! A Frenchman that knows a little Dutch…well close enough anyway…it’s smakelijk.
Anyway, back to Flash.
When I trace it, it shows:
<TEXTFORMAT LEADING=“2”><P ALIGN=“LEFT”><FONT FACE=“Times New Roman” SIZE=“16” COLOR="#000000">dfsdfsdf</FONT></P></TEXTFORMAT>
Where dfsdfsdf is the inputted text.
This is not what I had in mind. I want the trace to show just: dsfdsdf
*edit:
I forgot to disable the ‘render text as HTML’ option.
Nicht Frenchman, Deutscher, that’s why
Thanks for the spelling
Back to Flash:
huh? do you mean checking/validating the input before sending off the data?
If so, fisrt step is, you can already use “restrict” to disable txt/n° input on specific fields, and then you’ll check each input separately based on certain criteria…is this what you wanna do?
Let me know, we’ll speak…
Yes, that’s what I want. Specific fields can only contain textual input and others can only contain numerical input.
Then I only want to check the email input if it is a valid email address but I don’t know how to do it.
And if all the required fields have been filled in correctly ( some fields are optional ) and the email address is valid, THEN I want to post the data.
I can restrict the input in some fields to numerical or textual input by using : textField.restrict(“0-9”);
I still don’t know how to check if the (optional) email address is valid.
I figured out that I need two functions.
1 - Check if all required field have been filled
2 - Check if email is entered, and if so, check if it’s a valid one.
If no email is entered, this function returns true also.
If both functions return true, then the variables may be send to the ASP page.
that’s the most basic check you can perform, I usually test out the contact forms on websites with something like "[email protected]", and most of the time it works, sometimes even “@.” works…
not very precise…
I have this, but not tested:
[AS]/#####################################/
/* Email - Check | Flash MX | 2002 /
/ Sebastian Wichmann /
/ Michael Holl (Holly) /
/http://www.flashhilfe.de/
/#####################################*/
// Email darf nur die folgenden Zeichen enthalten
email_instanz.restrict = “a-zA-Z0-9@._-”;
Yeah, what does he mean? It works like a charm!!! Only thing I did was change the names so they would make more sense to me, and that was it. Works just fine.
Thnx for all the help…
Creating engaging and entertaining content for designers and developers since 1998.