CIS 375—Web App Dev II VBScript. 2 Introduction to VBScript VBScript is a light version of MS’s ____________. Example: document.write("Hello from VBScript!")

Slides:



Advertisements
Similar presentations
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Advertisements

AE6382 VBA - Excel l VBA is Visual Basic for Applications l The goal is to demonstrate how VBA can be used to leverage the power of Excel u VBA syntax.
IS437: Fall 2004 Instructor: Dr. Boris Jukic Program Flow Control: Decisions and Conditions (Branching) Controlled Repetition (Looping)
Iteration (Looping Constructs in VB) Iteration: Groups of statements which are repeatedly executed until a certain test is satisfied Carrying out Iteration.
Arrays-Part 1. Objectives Declare and initialize a one-dimensional array Store data in a one-dimensional array Display the contents of a one-dimensional.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 8 Arrays.
Introduction to Computing Dr. Nadeem A Khan. Lecture 24.
Introduction to Active Server Pages
Arrays.
PSU CS 106 Computing Fundamentals II VB Statements HM 5/19/2008.
VBA Programming Session #2. Things to Review  Variables  Procedures: Subs & Functions  If…Then  For…Next.
Chapter 41 Sub Procedures, Part II (Continue). Chapter 42 Local Variable A variable declared inside a Sub procedure with a Dim statement Space reserved.
CS 299 – Web Programming and Design Overview of JavaScript and DOM Instructor: Dr. Fang (Daisy) Tang.
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 32 - VBScript Outline 32.1 Introduction 32.2 Operators 32.3 Data Types and Control Structures.
IE 212: Computational Methods for Industrial Engineering
Microsoft Visual Basic 2008 CHAPTER NINE Using Arrays and File Handling.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
CIS 375—Web App Dev II JavaScript II.
Topic: An Introduction to JavaScript - from Beginning JavaScript by Wilton (WROX)
ENGR 112 Decision Structures.
Arrays and 2D Arrays.  A Variable Array stores a set of variables that each have the same name and are all of the same type.  Member/Element – variable.
© 2012 EMC Publishing, LLC Slide 1 Chapter 8 Arrays  Can store many of the same type of data together.  Allows a collection of related values to be stored.
Visual Basic CODE. Basics of Code Declaration Declaration Set aside a named place to put things Set aside a named place to put things Assignment Assignment.
© 1999, by Que Education and Training, Chapter 8, pages of Introduction to Computer Programming with Visual Basic 6: A Problem-Solving Approach.
MS Visual Basic Applications Walter Milner. Event-driven programming Standard approach for GUIs Contrast with old character interfaces – program determines.
Statements That Repeat. For...Next Loop Structure For counter = start To end Step increment statements Next counter Where Counter is tested to see if.
Variables,Constants and Data types Variables temporarily stores values during the execution of an application Variables have a name and data type Declare.
VBScript. Introduction Visual Basic scripting language is client side scripting language. It is developed by Microsoft VBScript is subset of VB language.
‘Tirgul’ # 3 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #3.
JavaScript Syntax and Semantics. Slide 2 Lecture Overview Core JavaScript Syntax (I will not review every nuance of the language)
EIW - ASP Introduction1 Active Server Pages VBScript.
CS285 Visual Basic 2 Department of Computing UniS 1 Statements in Visual Basic A statement is the fundamental syntactical element of a program smallest.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
Lab 4 Range Review, Control Logic and Loops ► Range Review ► Control Logic and Loops ► Exercise.
ASP-5-1 ASP Control Structures Colorado Technical University IT420 Tim Peterson.
Overview of VBA Programming & Syntax. Programming With Objects u Objects –Properties: attributes or characteristics of an object (e.g., font size, color,
JavaScript, Fourth Edition
ME 142 Engineering Computation I Using Subroutines Effectively.
Lab 6 (2) Arrays ► Lab 5 (1) Exercise Review ► Array Concept ► Why Arrays? ► Array Declaration ► An Example of Array ► Exercise.
Copyright © 2001 by Wiley. All rights reserved. Chapter 6: Using Arrays Control Arrays List Arrays Finding Items in Arrays Multiple Forms 2-Dimensional.
6-1 Chapter 6 Working with Arrays in VB.NET. 6-2 Learning Objectives Understand the use of list and table arrays in VB.NET projects and the difference.
Visual Basic Programming I 56:150 Information System Design.
CompMathBSc, English 5 October 2006 Programming basics — continued  Arrays  Cycle Statements: Loops  Control Structures vs Conditions  Subs: Procedures.
ME 142 Engineering Computation I Using Subroutines Effectively.
VBScript Conditional Statements. Conditional Statements Very often when you write code, you want to perform different actions for different decisions.
CIS 375—Web App Dev II JavaScript I. 2 Introduction to DTD JavaScript is a scripting language developed by ________. A scripting language is a lightweight.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 4 JavaScript.
Visual Basic CDA College Limassol Campus COM123 Visual Programming 1 Semester B Lecture:Pelekanou Olga Week 5: Useful Functions and Procedures.
Visual Basic Objects / Properties / Methods PropertyAdjective ObjectNoun Part of the application Attribute MethodVerb Action to do something.
Chapter 2 Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc.Slide 1.
Expressions and Control Flow. Expressions An expression is a combination of values, variables, operators, and functions that results in a value y = 3(abs(2x)
1 Microsoft® Visual Basic®.NET Language # 2. 2 Flow-Control Statements If … End If Select Case … End Select For… Next Do … Loop Exit.
Lab 6 (1) Range Review, Control Logic and Loops ► Control Logic and Loops ► Exercise.
Understanding Visual Basic Fundamentals CHAPTER 13 Understanding Visual Basic Fundamentals.
JavaScript, Sixth Edition
CSET 3250 Client-Side Scripting VBScript : Operators, Control Structures, Procedures and Functions.
Dani Vainstein1 VBScript Session 5. Dani Vainstein2 What we learn last session? Branching Branching using If … Then … Else statement. Branching using.
BASIC OF VB SCRIPT Explained By: Sarbjit Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
VB Script V B S.
Visual Basic 6 (VB6) Data Types, And Operators
Unit-1 Introduction to Java
Problem Solving and Control Statements: Part 2
Control Structures: Part 2
JavaScript Syntax and Semantics
Development of Internet Application 1501CT - Sara Almudauh
Excel VBA Day 3 of 3 Tom Vorves.
Control Structures: Part 1
حلقات التكرار.
Case & Repetitive Statements
ASP control structure BRANCHING STATEMENTS
Presentation transcript:

CIS 375—Web App Dev II VBScript

2 Introduction to VBScript VBScript is a light version of MS’s ____________. Example: document.write("Hello from VBScript!") Handling older browsers: <!– some statements -->

3 VBScript…Where To VBScript ___________ are usually located in the head section of a web page. VBScript code can also be located in the body section. some statements some statements

4 Variables Use “option explicit” to force yourself to declare variables before using them: option explicit dim name name=“Richard Johnson” A VBScript “procedure” is like a JavaScript “_________.” Procedure variables have _____ scope. An array with _______ elements: dim names (2) Assigning a value: names(0)=“John Doe” A two-dimensional array with 5 rows and 7 columns: dim table (5, 7)

5 Procedures The Sub procedure can perform actions, but does not _______ a value. sub mySub() msgbox("This is a sub procedure") end sub Calling a Sub procedure: call mySub() The Function procedure can return a value. function myFunction() myFunction = "BLUE" end function Calling a Function: document.write(“The sky is “ & myFunction())

6 If…Then…Elseif if payment="Cash" then msgbox "You are going to pay cash!" elseif payment="Visa" then msgbox "You are going to pay with Visa." elseif payment="AmEx" then msgbox "You are going to pay with American Express." else msgbox "Unknown method of payment." end If

7 Select Case select case payment case "Cash" msgbox "You are going to pay cash" case "Visa" msgbox "You are going to pay with visa" case "AmEx" msgbox "You are going to pay with American Express" case Else msgbox "Unknown method of payment" end select

8 For…Next for i = 0 to 6 Step 2 document.write("The number is " & i & " ") next For Each…Next dim names(2) names(0)="Tove" names(1)="Jani" names(2)="Hege" For Each x in names document.write(x & " ") Next

9 Do…While i=0 do while i < 10 document.write(i & " ") i=i+1 loop Do Until i=10 i=i-1 If i<10 Then Exit Do Loop Exit a Do…Loop

10 Examples Look at many other VBScript examplesexamples