Subj : Help (again To : Glucose Grin From : Digital Man Date : Mon Nov 01 2004 04:49 pm Re: Help (again By: Glucose Grin to All on Mon Nov 01 2004 01:44 pm > Hi there. > > I've forgotten how to write a login script in js :( I know I had one that > worked (at least I think I did), but it didn't look like this.... > > load("sbbsdefs.js"); > var uname, LoggedIn; > bbs.logout(); > node_action = NODE_LOGON; > while (bbs.online && (!LoggedIn)) { > printf("\r\n\1nEnter Name, Number, '\1hNew\1n', or > '\1hGuest\1n'\r\nNN...: "); > uname=console.getstr("",25,K_LOWPRIO+K_E71DETECT+K_TAB+K_UPRLWR); > truncsp(uname); > if (uname=="") > { > printf("Blank"); > bbs.hangup; The correct way to call a JavaScript function is with () after the function name. Example: bbs.hangup(); > if (uname=="New") > { > printf("New"); > bbs.newuser; > bbs.logon; Same problem here. > } > if (bbs.login(uname,"PW: ")) > { > printf (user.name+" login complete?!?"); > if (bbs.logon) And here. > { > printf (user.name+" logon executed"); > if (user.name == "") {LoggedIn=false}; > if (!LoggedIn){printf("\r\nLog on procedure Failed fo > unknown reasons.\r\n")}; > } > } > } > > What happens is that it runs thru, the user.name remains blank after > bbs.logon is executed, even tho bbs.login and bbs.logon are both successful. You're not actually *calling* these functions, so I would expect all kinds of things to go wrong. > Any ideas as to what I'm doing wrong? Yeah, you're missing the () :-) > Also, the newer DOVE-Net areas (like this one) arn't on my system. a little > off-topic, but is there an easy way to add these? http://synchro.net/docs/dove-net.txt digital man Snapple "Real Fact" #104: There are more then 30,000 diets on public record. .