1

I'm creating a Dashcode project that allows me to mount remote drives. I have a Scroll Area named "statusArea" defined to contain status text of the mounting progress, kind of a command output area.

The first time through testing I'll force the "ERROR: Must enter " text to be written. Then I'll go to the back to provide a username and password and try again, but the box is never cleared for new text.

// get configuration fields from back panel
var usernameField = document.getElementById("username");
var username = usernameField.value;
var passwordField = document.getElementById("password");
var password = passwordField.value;

// clear status 
var statusArea = document.getElementById("statusArea");
var status = document.getElementById("content");
status.innerText = "";
statusArea.object.refresh();

if ( !username || !password) {
    status.innerText = "ERROR: Must enter username and password on back panel!";
    alert("Must enter username and password on back panel!");
}

if (username && password) {
    status.innerText = "Connecting as "+username;

Am I going about this the wrong way?

Thanks, Bill

0 Answers0