adsense


Showing posts with label VB SCRIPT IN EXTERNAL FILE. Show all posts
Showing posts with label VB SCRIPT IN EXTERNAL FILE. Show all posts

Saturday, 7 November 2015

VB SCRIPT IN EXTERNAL FILE PAGE 39

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button




VB SCRIPT IN EXTERNAL FILE




VBScript in External File 


As you begin to work more extensively with VBScript, you will 
likely find that there are cases, where you are reusing identical 
VBScript code on multiple pages of a site. You are not restricted 
to be maintaining identical code in multiple HTML files.  
The script tag provides a mechanism to allow you to store VBScript 
in an external file and then include it into your HTML files. Here 
is an example to show how you can include an external VBScript file 
in your HTML code using script tag and its src attribute: 
<html> 
<head> 
<script type="text/vbscript" src="filename.vbs" ></script> 
</head> 
<body> 
....... 
</body> 
</html> 
To use VBScript from an external file source, you need to write your 
all VBScript source code in a simple text file with extension ".vbs" 
and then include that file as shown above. For example, you can keep 
the following content in filename.vbs file and then you can use sayHello 
function in your HTML file after including filename.vbs file. 
Function sayHello()  
   Msgbox "Hello World" 
End Function