Results 1 to 2 of 2

Thread: js including

  1. #1
    Join Date
    Mar 2010
    Posts
    8

    js including

    hi

    i downloaded a script and im trying to understand the code, while trying to edit it as i want it. The script inside the php file is included in the body section.

    like this:

    HTML Code:
    <body>
    
    <script type="text/javascript">
    //<![CDATA[
    
    some functions
    
    //]]>
    </script>
    when i try to take this code into a separate file and adding it into the head section, the whole thing ONLY works on firefox :S none other browser which is very odd.

    what could it be?
    and what is that //<![CDATA[ //]]> thingy?

    this is the script:
    http://www.webmotionuk.co.uk/php-jqu...-and-crop-v11/

    i want the js to be in a separated file but then it wont work on any other browser except for firefox :S

  2. #2
    Join Date
    Mar 2010
    Location
    England
    Posts
    1,144
    CDATA is a sequence of characters from the document character set and may include character entities. User agents should interpret attribute values as follows:
    • Replace character entities with characters,
    • Ignore line feeds,
    • Replace each carriage return or tab with a single space
    ( Taken from: http://www.w3.org/TR/html4/types.html )

    And you have about 25 sets of javascript, which one doesn't work?, I can go round and check them all.

Similar Threads

  1. migrating an asp.net site to a live host? (including the aspnet db)
    By Slippy in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 03 Oct 2009, 07:46 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
  •