The login() method changes the URL viewed by the Web browser.

ENTERPRISE JAVA
Reusing CORBA Web Services With JavaScript

David Houlding
Listing 5. The login() method changes the URL viewed by the Web browser.


function login() {
    // Validate the input.
    var username = document.LoginForm.UsernameTextField.value;
    var password = document.LoginForm.PasswordTextField.value;
    if( ( username == "" ) || ( password == "" ) ) {
        alert( "Invalid username/password pair. Please try again." );
        return;
    }

    // Set request input arguments.
    loginRequest.setArgParamVal("userid",username);
    loginRequest.setArgParamVal("password",password);

    // Execute request.
    loginRequest.invoke();

    // Get request results.
    var secureSessionID = loginRequest.getReturnParamVal("return");

    // Show the results.
    document.cookie = "SecureSessionID=" + secureSessionID + ";path=/"
    // Proceed to the next page.
	 window.location = "http://www.trcinc.com/corbabeans";
}

Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.