a custom js script becomes a print out of source code ! (3 posts)

  1. nick_nielsen
    Posted 5 years ago #

    I'm trying to load my jQuery script through using wp_enqueue_script.
    I've checked the syntax etc.
    What happens is this :
    When I inspect the source code of my page I find that there is indeed a link to my script.
    However the script contains the html source code of the page ! including parts of the loop that aren't being used.
    The link is correctly expressed in the source but it contains no javascript.
    I have only had this problem since 3.11 - it is a script that works on my theme at the moment - the live site has not been updated to 3.11 because on my local installation I have been having problems.
    What am I to do ? Any hints or solutions welcome.

  2. nick_nielsen
    Posted 5 years ago #

    rather than outputting my javascript code, it appears to be populating it with a 404 page - this is an extract from a firebug inspection of the head section of my page :

    <script src="http://localhost/wordpress/wp-content/themes/doric2011/javascript/sitescript.js?ver=1" type="text/javascript">
    <!DOCTYPE html>
    <html dir="ltr" lang="fr">
    <meta charset="UTF-8" />
    <title>Page not found | Nick Kai Nielsen</title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="stylesheet" type="text/css" media="all" href="http://localhost/wordpress/wp-content/themes/doric2011/style.css" />
    <link rel="pingback" href="http://localhost/wordpress/xmlrpc.php" />
    <link rel='stylesheet' id='NextGEN-css' href='http://localhost/wordpress/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0' type='text/css' media='screen' />
    <link rel='stylesheet' id='wp_dlmp_styles-css' href='http://localhost/wordpress/wp-content/plugins/download-monitor/page-addon/styles.css?ver=3.1.1' type='text/css' media='all' />
    <script type='text/javascript' src='http://localhost/wordpress
  3. nick_nielsen
    Posted 5 years ago #

    I thought it could be something to do with my script - but it does it with highslide.js and highslide.config.js as well - and they're professionally written !

Topic Closed

This topic has been closed to new replies.

About this Topic