Results 1 to 4 of 4
  1. #1
    ABW Ambassador
    Join Date
    January 18th, 2005
    Reno, NV

    Have a quick tech question for some of the guru's here. I have some older .html pages that can't be easily changed to a .shtm extension due to having numerous links (like hundreds) pointing to it.

    But, instead of hard coding some information directly into the page, for some things I would like to use javascript to insert the content of the file into the page. Thus, what I would like to do is to have merchant sales/specials listed on my .html pages but which are not "hard coded" into the page. Using an external javascript file - with the appropriate commands imbedded into the .html page itself - seems like the way to do it.

    Problem is, how do I do it???

    Any suggestions at all would be greatly appreciated.

  2. #2
    ABW Ambassador Nature Boy's Avatar
    Join Date
    January 18th, 2005
    Can't help you with the javascript, but I can help with converting the htm files to shtml files.

    Add this line to your .htaccess file

    AddType text/html .htm
    AddHandler server-parsed .htm

    You don't have to change file names, and the .htm files then work with SSI

    Besides, I think search engines wouldn't see the content inserted from the javascript, they would only see the javascript code (don't quote me on this though.)
    If you can't dazzle them with brilliance, then baffle them with bulls#!t
    Don't tell me that you'll do it... SHOW ME.
    Just because everyone else is drinking it is no reason for me to drink the KOOL-AID.

  3. #3
    Join Date
    January 17th, 2005
    This page explains how to do it:

    I update HTML sidebars throughout my site this way. Makes life much easier.

  4. #4
    ABW Ambassador darkstar7's Avatar
    Join Date
    January 17th, 2005
    This is how:

    <SCRIPT TYPE="text/javascript" SRC="menu.js"></SCRIPT>
    <NOSCRIPT>Your browser does not support script</NOSCRIPT>

    Replace menu.js with your file name.
    Have you promoted your brand name today?

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Php Page / Form Processing / Mysql Insert / No Page Refresh
    By Uncle Rico in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: January 4th, 2009, 10:55 AM
  2. Display a file like Google with Javascript
    By apex-auctions in forum Programming / Datafeeds / Tools
    Replies: 13
    Last Post: April 23rd, 2006, 02:32 PM
  3. How do I insert a PHP script into a .htm file
    By dak142 in forum Programming / Datafeeds / Tools
    Replies: 8
    Last Post: April 2nd, 2004, 05:24 AM
  4. Javascript image off page
    By Trust in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: January 7th, 2003, 01:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts