Results 1 to 3 of 3

Thread: Javascript load in head only on listing_detail_slideshow.html

  1. #1
    greg@securitgroup.com Guest

    Question Javascript load in head only on listing_detail_slideshow.html

    Hi there,

    I'm just trying to optimize my site - with a little help courtesy of Googles new page-speed tool.

    I would like to load up some Google Javascript code in the <HEAD> portion, but only when using the listing_detail_slideshow.html page or listing_detail_default.html page, not on every page

    Is there any way to script this into the main.html so that it is only loaded when viewing listings, not searches etc?

    Many thanks
    Greg

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    48
    Posts
    9,796

    Default Re: Javascript load in head only on listing_detail_slideshow.html

    If you server allows php in html files this should work in the main.html file:

    <?PHP
    if ($_GET['action'] == 'listingview') {
    echo '<script ..............>';
    }
    ?>

  3. #3
    greg@securitgroup.com Guest

    Default Re: Javascript load in head only on listing_detail_slideshow.html

    Why thankyou! That worked a treat

Similar Threads

  1. Replies: 2
    Last Post: 08-01-2007, 09:54 AM
  2. how to place code between the <head> </head>
    By brownlow in forum General Help (CLOSED)
    Replies: 3
    Last Post: 04-18-2007, 02:24 PM
  3. Inserting Javascript into main.html file
    By halifax in forum Templates - Help/Ideas/Discussion (CLOSED)
    Replies: 4
    Last Post: 03-09-2006, 04:02 PM
  4. Descriptions in listing_detail_slideshow.html
    By alsmith in forum General Help (CLOSED)
    Replies: 0
    Last Post: 02-11-2006, 09:18 AM
  5. Javascript in html template
    By MaxPower in forum HELP (CLOSED)
    Replies: 2
    Last Post: 07-27-2005, 02:49 AM

Bookmarks

Posting Permissions

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