Results 1 to 2 of 2

Thread: Insert into <head>....

  1. #1
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default Insert into <head>....

    1) Script Title: Simple Controls Gallery, Smooth Navigational Menu (v1.01), Animated Collapse Div.

    More though...

    2) Script URL (on DD):
    http://dynamicdrive.com/dynamicindex4/simplegallery.htm
    http://dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm
    http://dynamicdrive.com/dynamicindex17/animatedcollapse.htm


    3) Describe problem:
    Some scripts, including the ones listed above say:
    Step 1: Insert the following code into the <head> section of your page:
    Which I recently noticed wouldn't be valid. If you had a page such as:
    Code:
    <html>
    <head>
    <title>My Profile!</title>
    
    </head>
    <body>
    <p>Content... Content.... Content...</p>
    </body>
    </html>
    Some beginner might go along and do something like this(using Smooth Navigational Menu):
    Code:
    <html>
    <head>
    <title>My Profile!</title>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    
    <link rel="stylesheet" type="text/css" href="ddsmoothmenu.css" />
    
    <!--[if lte IE 7]>
    <style type="text/css">
    html .ddsmoothmenu{height: 1%;} /*Holly Hack for IE7 and below*/
    </style>
    <![endif]-->
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
    <script type="text/javascript" src="ddsmoothmenu.js">
    
    /***********************************************
    * Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    </head>
    <body>
    <p>Content... Content.... Content...</p>
    <div id="smoothmenu1" class="ddsmoothmenu">
    <ul>
    <li><a href="http://www.dynamicdrive.com">Item 1</a></li>
    <li><a href="#">Folder 0</a>
      <ul>
      <li><a href="#">Sub Item 1.1</a></li>
      <li><a href="#">Sub Item 1.2</a></li>
      <li><a href="#">Sub Item 1.3</a></li>
      <li><a href="#">Sub Item 1.4</a></li>
      <li><a href="#">Sub Item 1.2</a></li>
      <li><a href="#">Sub Item 1.3</a></li>
      <li><a href="#">Sub Item 1.4</a></li>
      </ul>
    </li>
    <li><a href="#">Folder 1</a>
      <ul>
      <li><a href="#">Sub Item 1.1</a></li>
      <li><a href="#">Sub Item 1.2</a></li>
      <li><a href="#">Sub Item 1.3</a></li>
      <li><a href="#">Sub Item 1.4</a></li>
      <li><a href="#">Sub Item 1.2</a></li>
      <li><a href="#">Sub Item 1.3</a></li>
      <li><a href="#">Sub Item 1.4</a></li>
      </ul>
    </li>
    <li><a href="#">Item 3</a></li>
    <li><a href="#">Folder 2</a>
      <ul>
      <li><a href="#">Sub Item 2.1</a></li>
      <li><a href="#">Folder 2.1</a>
        <ul>
        <li><a href="#">Sub Item 2.1.1</a></li>
        <li><a href="#">Sub Item 2.1.2</a></li>
        <li><a href="#">Folder 3.1.1</a>
    		<ul>
        		<li><a href="#">Sub Item 3.1.1.1</a></li>
        		<li><a href="#">Sub Item 3.1.1.2</a></li>
        		<li><a href="#">Sub Item 3.1.1.3</a></li>
        		<li><a href="#">Sub Item 3.1.1.4</a></li>
        		<li><a href="#">Sub Item 3.1.1.5</a></li>
    		</ul>
        </li>
        <li><a href="#">Sub Item 2.1.4</a></li>
        </ul>
      </li>
      </ul>
    </li>
    <li><a href="http://www.dynamicdrive.com/style/">Item 4</a></li>
    </ul>
    <br style="clear: left" />
    </div>
    </body>
    </html>
    I guess it's not that big of an issue... Just reporting it just in case.
    Jeremy | jfein.net

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I've also thought about that, I suppose the doctype is there because some scripts only work with certain doctypes. A better approach would be to have a separate text box containing only the doctype and a specification that the user must use that doctype in order to get the script working. Since there is no specification that the user must use a certain doctype, they might just take the script and paste in on their page and it might not work because the have a different doctype. (I gotta stop saying "doctype")
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

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
  •