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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Utilizing The Script Src Attribute In Effective HTML Programming

Status
Not open for further replies.

caseyc

Programmer
Apr 1, 1999
51
US
The Script Src attribute is a valuable tool in HTML programming. By designing a "template" first and then building it into a .js file, one can save a lot of time. Take this page for example, I first designed a template, and then split it into two seperate .js files, "wdacc1.js," and "wdacc2.js." In between these two sections goes the body of the document, the text that the veiwer will see. One must be carefull, however, to always include the appropriate HTML tags in the document for people who may have their Java Script disabled.
 
You could (assuming you have control of the server/ability to run CGI scripts) design a quick Perl/QB4.5/QB/C/C++/Fortran/etc. CGI that will do the same thing for you.....read the template files; then merge them with the body file & send the resulting page as output (in pure HTML....no JS needed) to the user's browser.....this could save a LOT of time/headaches.<br>
<br>
<br>
-Robherc<br>
robherc@netzero.net
 
Yes, this works well, and is the preffered manner of doing these kinds of things, but for people how do not have access to a cgi directory, the JavaScript method is easy, and effective.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top