Results 1 to 3 of 3

Thread: How to Get IFrame Scroller to Validate

  1. #1
    Join Date
    Oct 2004
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to Get IFrame Scroller to Validate

    IFrame Scroller

    http://www.dynamicdrive.com/dynamici...e-scroller.htm

    I used this script on one of my client's sites, seen here:

    http://chefpierrot.com/

    and here:

    http://chefpierrot.com/menus/

    The original script includes a javascript call which is apparently unneccessary.

    Here is the original code:

    Code:
    //specify path to your external page:
    var iframesrc="external.htm"
    
    //You may change most attributes of iframe tag below, such as width and height:
    document.write('<iframe id="datamain" src="'+iframesrc+'" width="150px" height="150px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no"></iframe>')
    The above code will not validate as HTML 4.01 Transitional at the W3C.

    Their standards, in this case, proved to be both helpful and easier to implement:

    The revised code looks like this (with no javascript call):

    Code:
    <iframe 
    src ="external2.htm" frameborder="0" width="150" height="200" scrolling="no"> </iframe>
    This code has been tested in current versions of IE, NS, Opera & Firefox; also works in Safari and IE for Mac and it will validate as HTML 4.01 Transitional.

    I did remove the legal notice within the code because I'd put a credit for the script on the bottom of every page of the site, even though the script is only used on two of its 31 pages.

    I hope this is OK with you guys, but I wanted to check with you and make sure. If you need me to change it, just let me know--I don't want you guys steamed at me, your stuff is too good.

    Edit: I should mention that the credit in the code does remain in the external file.

    Thanks for the scripts, you guys are making me look good.
    Last edited by sel_nyc; 02-16-2005 at 07:03 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hi:
    Thanks for the info on validating this script. Regarding the alternate arrangement for giving credits for this script, that's fine as well.

    Good luck,

  3. #3
    Join Date
    Oct 2004
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks

    Thanks! You guys are the best!

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
  •