include files

liunx

Guest
i want to know if i am using include files<br />
can the include file say : can use variables that in my vbscript code and do cacluatons for me and return an answer?<br />
if yes then how?where can i read/see examples?<br />
thanks in advance<br />
peleg<!--content-->Originally posted by pelegk1 <br />
i want to know if i am using include files<br />
can the include file say : can use variables that .... <br />
<br />
Javascript include files are javascript source code just as it was embedded in the page within the <script> tags.<br />
They can have variables,function dynamic HTML and you name it..<br />
A simplest example is here..this is how you will include a jas file<br />
<script type="text/javascript" src=http://www.webdeveloper.com/forum/archive/index.php/"sample.js"></script><br />
<br />
This is the code that sample.js consists of.<br />
var testVariable="javascript is the coolest";<br />
<br />
function testFunction(){<br />
alert(testVariable);<br />
}<br />
<br />
Now in the above snippet, you see that a variable contains a simple statement,and then the function just displays the variable value in an alert box.<br />
in the html page you always follow the logical flow of the code,<br />
1. first import or include statement as above <br />
2. and then you can call any variable in the file or use the functions,Assuming, now you have include statement in the page's head section,all the code in the js file is in scope so we can use it.<br />
<script type="text/javascript"><br />
//display variable<br />
alert(testVariable);<br />
<br />
//or call the function<br />
testFunction();<br />
</script><br />
<br />
I hope this helps<!--content-->Hi Peleg...<br />
<br />
you asked about vbscript... so you are obviously looking to use ASP Includes.<br />
<!-- #include file="yourVBScript.inc" --><br />
<br />
Go to google.com<br />
Type : "asp includes"<br />
<br />
you will get plenty of resources on this, which should give you a good overview.<br />
<br />
reply back if you have any specific questions relating to this.<br />
<br />
;) k<!--content-->
 
Back
Top