Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie vbscript question

Status
Not open for further replies.

dmh4ab

Programmer
Oct 2, 2002
53
US
I'm very new to vbscript, but I'm guessing this is easy once I know how to do it.

I know I can write vbscript into html (for example, putting all the vbscript modules in the header of an html document).
Is it possible to write all the vbscript to it's own file and then just include the file in the html document??

Thanks,
dmh4ab
 
yes you can.

just place your code(vbscript) in notepad, and do a file save as: <filename>.vbs

in your HTML page you would reference your file like so:

<SCRIPT LANGUAGE=&quot;vbScript&quot; SRC=&quot;<FileNAme>.vbs&quot;></SCRIPT>

Place above code between your body tags. &quot;did you just say Minkey?, yes that's what I said.&quot;

MrGreed
 
I usually use the following: Put all VBScript into the .asp file and then include this file into the page I am working on - <!--#include file=&quot;general.asp&quot;-->
In this case the only place where you have to write <%@ Language=VBScript %> is your main file. In my case general.asp. It is also easier to work in the InterDev instead of Notepad. At the same time the previos way is probably more universal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top