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";
}

Upcoming Training Events

0 AM
Visual Studio Live! San Diego
September 8-12, 2025
Live! 360 Orlando
November 16-21, 2025
Cloud & Containers Live! Orlando
November 16-21, 2025
Data Platform Live! Orlando
November 16-21, 2025
Visual Studio Live! Orlando
November 16-21, 2025