Basic HTML version of Foils prepared 4 May 97

Foil 20 VBScript accesses document elements

From Introduction to ActiveX, with VBScript CPS616 -- Information Track of CPS -- Spring Semester 97. by Nancy J. McCracken


Object-oriented view, shown in an example script to add the values that the user has typed into two textfields and display it in a third: Sub Button1_OnClick FirstData = CDbl(Document.Form1.Text1.Value) SecondData = CDbl(Document.Form1.Text2.Value) Document.Form1.Text3.Value = FirstData + SecondData End Sub
Note the Basic (and Fortran-like) syntax that statements are distinguished by being on separate lines.
Cdbl converts text input string to a double.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998