Passwordbox

PASSWORDBOX
A **Passwordbox** is a textbox that can be filled by the program as it is created. It can also be typed into by the user. It is different from a textbox because a textbox displays the actual text, while a password box displays asterisk characters in place of the actual text characters.

Syntax: PASSWORDBOX #handle, expr //- Add a password box to the web page with #handle and filled with the result of expr (string or numeric)//


 * PASSWORDBOX methods**
 * 1) handle CONTENTS$ //- Return the contents of the passwordbox as a string//
 * 2) handle VALUE //- Return the contents of the passwordbox as a number//
 * 3) handle ISNULL //- Returns zero (or false)//
 * 4) handle DEBUG$ //- Returns the string "Passwordbox"//

This demo shows the **Debug$** and **IsNull** methods.

code format="vbnet"" print "Before creation, IsNull returns:" print #p isnull passwordbox #p, "mypassword" print print "Object is a ";#p debug$ print "After creation, IsNull returns:" print #p isnull wait code

This demo creates a **Passwordbox**, invites the user to type into it, then retrieves the contents.

code format="vbnet" print "Type a password here, then click the 'Reveal password' link." 'create a password box containing default text passwordbox #pw, "default text" print "" print "" print "Password will appear here:" 'create an empty textbox: textbox #tb, "" print "" print "" link #action, "Reveal password.", [reveal] wait

[reveal] 'fill the textbox with the contents of the passwordbox 'this could also be done on two lines, as follows: 'place passwordbox contents into variable pass$ 'pass$ = #pw contents$ 'fill textbox with contents of pass$ variable '#tb text(pass$) wait code
 * 1) tb text(#pw contents$)