View Full Version : Flash login / register using asp / mdb
I have a problem with a register and login app I'm building. I can get the the login to work but the register side doesn't submit the xml to the asp page and throws an error. I can't fiqure out what the problem is.
The files are located on www.2this.com if you would like to see the original please email me jasonbreward@atlasinteractive..com OR breward@hotmail.com
I have checked and re checke dthe code PLEASE could you have a quick look..........
bruce
10-08-2003, 10:28 AM
I went to your page and it doesn't look like it's posting anything to the server.
Please post code
[b]quote:Originally posted by Jay
I have a problem with a register and login app I'm building. I can get the the login to work but the register side doesn't submit the xml to the asp page and throws an error. I can't fiqure out what the problem is.
The files are located on www.2this.com if you would like to see the original please email me jasonbreward@atlasinteractive..com OR breward@hotmail.com
I have checked and re checke dthe code PLEASE could you have a quick look..........
</blockquote id="quote"></font id="quote">
Here is my login code (that does work)
loginURL = "http://2this.com/UserLogin.asp";
function loginSubmit() {
xmlToSend = "<Login><UserName>"+userName.text+"</UserName><Password>"+Password.text+"</Password></Login>";
objToSend = new XML(xmlToSend);
objToReceive = new XML();
objToReceive.onLoad = loginResponse;
objToSend.sendAndLoad(loginURL, objToReceive);
_root.gotoAndStop("waiting");
}
function loginResponse() {
var response = objToReceive.firstChild.firstChild.firstChild.node Value;
if (response == "Login Correct") {
_root.gotoAndStop("login success");
} else if (response == "Login Incorrect") {
_root.gotoAndStop("login failed")
}
trace("response = "+response);
}
And here is the register code (that doen't work)
registrationURL = "http://2this.com/AddUser.asp";
function registrationSubmit() {
xmlToSend="<Register><UserName>"+userName.text+"</UserName><Email>"+email.text+"</Email><Password>"+Password.text+"</Password></Register>";
objToSend = new XML(xmlToSend);
objToReceive = new XML();
objToReceive.onLoad();
objToReceive.sendAndLoad(registrationURL, objToReceive);
_root.gotoAndStop("waiting");
}
function registrationResponse() {
var response = objToReceive.firstChild.firstChild.firstChild.node Value;
if (response == "User Inserted") {
_root.gotoAndStop("registration success");
} else if (response == "User Exists") {
_root.gotoAndStop("login success")
}
trace("response = "+response);
}
bruce
10-09-2003, 01:16 AM
The code you posted looks fine. Is this a canned application generated by some tool?
However, when i goto your page, it seems like you are using some sort of flash componnet. How does the asp page get call? IS it from the flash? I think the flash is not communicating properly with the asp page.
Sorry can't be much help, i have not used flash to connect to DB before.
You may also want to post this on Macromedia's forum.
[b]quote:Originally posted by Jay
Here is my login code (that does work)
loginURL = "http://2this.com/UserLogin.asp";
function loginSubmit() {
xmlToSend = "<Login><UserName>"+userName.text+"</UserName><Password>"+Password.text+"</Password></Login>";
objToSend = new XML(xmlToSend);
objToReceive = new XML();
objToReceive.onLoad = loginResponse;
objToSend.sendAndLoad(loginURL, objToReceive);
_root.gotoAndStop("waiting");
}
function loginResponse() {
var response = objToReceive.firstChild.firstChild.firstChild.node Value;
if (response == "Login Correct") {
_root.gotoAndStop("login success");
} else if (response == "Login Incorrect") {
_root.gotoAndStop("login failed")
}
trace("response = "+response);
}
And here is the register code (that doen't work)
registrationURL = "http://2this.com/AddUser.asp";
function registrationSubmit() {
xmlToSend="<Register><UserName>"+userName.text+"</UserName><Email>"+email.text+"</Email><Password>"+Password.text+"</Password></Register>";
objToSend = new XML(xmlToSend);
objToReceive = new XML();
objToReceive.onLoad();
objToReceive.sendAndLoad(registrationURL, objToReceive);
_root.gotoAndStop("waiting");
}
function registrationResponse() {
var response = objToReceive.firstChild.firstChild.firstChild.node Value;
if (response == "User Inserted") {
_root.gotoAndStop("registration success");
} else if (response == "User Exists") {
_root.gotoAndStop("login success")
}
trace("response = "+response);
}
</blockquote id="quote"></font id="quote">
vBulletin® ©Jelsoft Enterprises Ltd.