| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Neuer User Registriert seit: Jan 2004
Beiträge: 67
| URLVariables Problem
Hallo zusammen. Ich hab ein Problem mit einem Kontaktformular, das eine ASPX-Seite aufruft. Wenn ich auf "senden" klicke erhalte ich folgende Fehlermeldung (im Browser, localhost un online): Code: Error: Error #2101: Der an URLVariables.decode() übergebene String muss ein URL-kodierter Abfrage-String mit Name/Wert-Paaren sein. at Error$/throwError() at flash.net::URLVariables/decode() at flash.net::URLVariables() at flash.net::URLLoader/onComplete() Komischerweise kommen die gesendeten Daten ohne Probleme bei der Ziel-Adresse in meinem Outlook an. Hat jemand ne Idee woran das liegen koennte? Gracias KaroAS |
| | |
| | #2 (permalink) |
| lebt in stereo Registriert seit: Mar 2008 Ort: karlsruhe
Beiträge: 1.093
|
zeig mal ein bißchen code
__________________ * Flash-Junkie ≠ Musiker & Grafiker # Marvin Blase # Speaker, Author, Silly Billy. # @beautifycode |
| | |
| | #3 (permalink) |
| Neuer User Registriert seit: Jan 2004
Beiträge: 67
|
Hallo. Hier der Code der Funktion: Code: private function enviarDatos(e:MouseEvent):void {
formulario_mc.nombreError_txt.text = "";
formulario_mc.telefonoError_txt.text = "";
formulario_mc.direccionError_txt.text = "";
if (formulario_mc.nombre_txt.text != "nombre" && formulario_mc.telefono_txt.text != "teléfono" && formulario_mc.direccion_txt.text != "dirección") {
var reqForm:URLRequest = new URLRequest("default2.aspx");
var variables:URLVariables = new URLVariables();
variables.senderName = formulario_mc.nombre_txt.text;
variables.senderTel = formulario_mc.telefono_txt.text;
variables.senderDir = formulario_mc.direccion_txt.text;
variables.senderMsg = formulario_mc.comentarios_txt.text;
reqForm.method = URLRequestMethod.POST;
reqForm.data = variables;
var loaderForm:URLLoader = new URLLoader();
loaderForm.dataFormat = URLLoaderDataFormat.VARIABLES;
estado_mc.x = stage.stageWidth/2;
estado_mc.y = stage.stageHeight/2;
estado_mc.gotoAndStop(1);
loaderForm.load(reqForm);
loaderForm.addEventListener(Event.COMPLETE, confirmacion);
} else {
if (formulario_mc.nombre_txt.text == "nombre") {
formulario_mc.nombreError_txt.text = "*";
}
if (formulario_mc.telefono_txt.text == "teléfono") {
formulario_mc.telefonoError_txt.text = "*";
}
if (formulario_mc.direccion_txt.text == "dirección") {
formulario_mc.direccionError_txt.text = "*";
}
}
} Code: private function confirmacion(e:Event):void {
if (RetVal) {
estado_mc.gotoAndStop(2);
} else {
estado_mc.gotoAndStop(3);
}
} Code: public partial class _Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string senderTel = Request.Params["senderTel"];
string senderDir = Request.Params["senderDir"];
string senderName = Request.Params["senderName"];
string senderMsg = Request.Params["senderMsg"];
if ((senderTel != null) && (senderDir != null) && (senderName != null) && (senderMsg != null))
{
StringBuilder mailBody = new StringBuilder();
mailBody.Append(dinamiq.Correo.SALTO_LINEA).Append(dinamiq.Correo.SALTO_LINEA);
mailBody.Append("Nombre : " + senderName).Append(dinamiq.Correo.SALTO_LINEA).Append(dinamiq.Correo.SALTO_LINEA);
mailBody.Append("Telefono : " + senderTel).Append(dinamiq.Correo.SALTO_LINEA).Append(dinamiq.Correo.SALTO_LINEA);
mailBody.Append("Direccion : " + senderDir).Append(dinamiq.Correo.SALTO_LINEA).Append(dinamiq.Correo.SALTO_LINEA);
mailBody.Append("Comentarios : " + senderMsg).Append(dinamiq.Correo.SALTO_LINEA).Append(dinamiq.Correo.SALTO_LINEA);
mailBody.Append(dinamiq.Correo.SALTO_LINEA).Append(dinamiq.Correo.SALTO_LINEA);
string mailFrom = System.Configuration.ConfigurationManager.AppSettings.Get("mail.from");
string mailTo = System.Configuration.ConfigurationManager.AppSettings.Get("mail.to");
string mailBcc = System.Configuration.ConfigurationManager.AppSettings.Get("mail.bcc");
string mailSubject = System.Configuration.ConfigurationManager.AppSettings.Get("mail.subject");
bool resultado = dinamiq.Correo.enviarCorreo(mailFrom, mailTo, mailBcc, mailSubject, mailBody.ToString(), null);
Request.Params.Add("RetVal", resultado.ToString());
}
}
} |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| URLVariables in JSP auslesen | fedarius | Coldfusion und J2EE | 2 | 20-06-2010 08:31 |
| Probleme mit URLRequest und URLVariables | Arne Drews | ActionScript 3 | 9 | 23-12-2009 11:59 |
| URLRequest und URLVariables | thembones410 | ActionScript 3 | 1 | 27-11-2009 11:06 |
| [Flash CS4] urlvariables an swf per Loader | janpedder | Flash Einsteiger | 0 | 07-05-2009 10:27 |
| URLVariables subclassen | Rudi Ratlos | ActionScript 3 | 0 | 29-08-2007 15:39 |