Flash login / register using asp / mdb

Discussion in 'Classic ASP' started by Jay, Oct 8, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Jay

    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 [email protected] OR [email protected]

    I have checked and re checke dthe code PLEASE could you have a quick look..........
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    I went to your page and it doesn't look like it's posting anything to the server.

    Please post code

    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 [email protected] OR [email protected]

    I have checked and re checke dthe code PLEASE could you have a quick look..........


    </blockquote id="quote"></font id="quote">
     
  3. Jay

    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.nodeValue;
    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.nodeValue;
    if (response == "User Inserted") {
    _root.gotoAndStop("registration success");
    } else if (response == "User Exists") {
    _root.gotoAndStop("login success")
    }
    trace("response = "+response);
    }
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    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.

    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.nodeValue;
    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.nodeValue;
    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">
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page