[Javascript] Javascript to change include filename

tedd tedd at sperling.com
Sat Jan 24 11:52:19 CST 2009


At 10:42 AM -0600 1/24/09, Del Wegener wrote:
>>Del:
>>
>>I brought this discussion back to this list so that others may benefit.
>>
>>All your questions will be answered IF you fully follow my write-up here:
>>
>>http://sperling.com/examples/include-demo/
>>
>>Welcome to the wonderful world of includes -- your world is about to change.
>>
>>Cheers,
>>
>>tedd
>>
>I have had a chance to read your (and other) discussion.  I have 
>used shtml includes in the past but PHP includes seem much better, 
>cleaner, and more secure.  So I am switching over to PHP includes 
>for the site I am working on.  Furthermore I intend to make my 
>header and footer files more inclusive (as you suggest) than in the 
>past.  With at least two embedded include statements in the header 
>include.
>
>Thanks a heap.
>
>Del

Del:

The number of "includes" you have in any one file really doesn't mean anything.

You should always use "includes" to consolidate redundant code into a 
single file. For example, if your site has a navigation menu that is 
common to all pages, then make it a single file and include it once 
in each page. That way when you make a change to your menu, it's 
reflected on every page that uses that include.

This is just a technique that provides for easier organization, 
maintenance, and distribution of code.

Good luck,

tedd

-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the Javascript mailing list