aqui va...en el primer fotograma tengo:
[code]
submit_mc._alpha = 40;
formCheck = new Object();
formCheck.onKeyUp = function() {
if (name_txt.text != '' &&
email_txt.text != '' &&
company_txt.text != '' &&
comment_txt.text != '') {
//clear any alert messages
alert_txt.text = '';
//enable the submit button
submit_mc._alpha = 100;
} else {
//remain disabled until all fields have content
submit_mc._alpha = 40;
}
}
//add this new listener
Key.addListener(formCheck);
/*-- FORMAT TEXT FIELDS
The next block of code deals with formatting the input
text fields. Styles are defined for the normal state and
the focus state. Next a for-in loop loops through the fields
passed to it and apply the normal formatting.*/
/*#######SET STYLES FOR TEXT FIELDS#######*/
//define styles for both normal and focussed
//set hex values here that work with your site's colors
normal_border = 0x7A7777;
focus_border = 0xFFCC00;
normal_background = 0xECECE6;
focus_background = 0xF9DF8A;
normal_color = 0x776D6C;
focus_color = 0x000000;
//create an array containing the fields we wish to have styles applied to
inputs=[name_txt, email_txt, company_txt, comment_txt];
/*
a "for in" loop now iterates through each element in the "inputs" array
and applies our "normal" formatting to each input text field
*/
for( var elem in inputs) {
inputs[elem].border = true;
inputs[elem].borderColor = normal_border;
inputs[elem].background = true;
inputs[elem].backgroundColor = normal_background;
inputs[elem].textColor = normal_color;
}
/*Now we address the highlighting that occurs when a text field
gains focus. We will use prototypes for this since it isn't
built into Flash:
-- SET AND KILL FOCUS METHODS --*/
TextField.prototype.onSetFocus = function() {
this.borderColor = focus_border;
this.backgroundColor = focus_background;
this.textColor = focus_color;
}
TextField.prototype.onKillFocus = function() {
this.borderColor = normal_border;
this.backgroundColor = normal_background;
this.textColor = normal_color;
}
//Be nice to your user by focussing the first field when the movie loads
Selection.setFocus(name_txt);
submit_mc.onRelease = function() {
if (name_txt.text != '' &&
email_txt.text != '' &&
company_txt.text != '' &&
comment_txt.text != '') {
alert_txt.text='';//clear any previous error messages or warnings
//advance playhead to frame 2 - the "processing" message
_root.play();
//assign properties to LoadVars object created previously
}
Si. Como se puede observar es copiado de uno de tantos sitios que he visitado...
Luego en el boton send..tengo:
}
[/code][code]
on (release) {
if (!Nname.length) {
EmailStatus = "Please Enter your name.";
}
else if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
EmailStatus = "Please enter a valid E-mail";
}
else if (!ToComments.length) {
EmailStatus = "Please enter your message";
}
else {
loadVariablesNum ("form.asp", "0", "Post");
EmailStatus = "Sending message";
gotoAndPlay(10);
}
}
[/code]
y para terminar este es mi archivo asp
[code]
<%
Name = Request.form("Nname")
Company = Request.form("company")
Email = Request.form("Email")
Comments = Request.form("ToComments")
strSubject = "Message from your website"
strBody = " Form Contents "
strBody = strBody & vbCrLf
strBody = strBody & " Nname " & Nname & vbCrLf
strBody = strBody & " company " & company & vbCrLf
strBody = strBody & " Email " & Email & vbCrLf
strBody = strBody & " ToComments " & ToComments & vbCrLf
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = "from website"
objCDOMail.To = "[email protected]"
objCDOMail.Subject = strSubject
objCDOMail.Body = strBody
objCDOMail.MailFormat = 0
objCDOMail.Send
Set objCDOMail = Nothing
%>
[/code]
despues de tantas combinaciones que he hecho....ya no se ni que intentar...les aseguro que quien me ayude a hacer funcionar esto...va a hacer su buena accion del d..no. del año y hasta de la vida por librar a una pobre mujer de tanto sufrimiento!
PD: A los que esten diciendo "otra vez? pero si esto lo hemos hablado mil veces". si yo se,pero de esas mil veces nada de lo que dicen me ha funcionado....Muchas gracias!!
