Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Facebox doctype issue

  1. #1
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    912
    Thanks
    117
    Thanked 2 Times in 2 Posts

    Default Facebox doctype issue

    1) Script Title: Facebox Image and Content Viewer

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ebox/index.htm

    3) Describe problem: In the instructions, I need to place the following in the <head> section;
    Code:
    <!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">
    But my site has the following doctype, without using the Facebox:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    So I am confused where to put the different doctypes. Can I do this ?
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    
    <head>
    
    <!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">
    <script src="facefiles/jquery-1.2.2.pack.js" type="text/javascript"></script>
    <link href="facefiles/facebox.css" media="screen" rel="stylesheet" type="text/css" />
    <script src="facefiles/facebox.js" type="text/javascript"></script>
    <script type="text/javascript">
        jQuery(document).ready(function($) {
          $('a[rel*=facebox]').facebox() 
        })
    </script>
    
    </head

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

    Default

    No, I actually thing the page is wrong. I don't know what to do about it though, try it without there document type.
    Jeremy | jfein.net

  3. #3
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    the doctype needs to come before the <head>.

    I believe if a second doctype is declared, the browser is put into quirks mode, but regardless, you should only have 1 doctype. deciding which doctype to use is the next step. If your page was written for XHTML than I would suggest using the XHTML doctype, however if it was written for HTML, then use the 4.01, which appears what you were using previous to this script.

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by Nile View Post
    No, I actually thing the page is wrong. I don't know what to do about it though, try it without there document type.
    deleting the doctype all together is not the solution, its finding which one to use and where to put it.

  5. #5
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    912
    Thanks
    117
    Thanked 2 Times in 2 Posts

    Default

    Thanks for your replies, but so the script doesn't work ?
    I tried all possibilities with both, none and each doctype, and none works. Too bad, because it looks like a nice script !

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

    Default

    Can we please see a link to your page. Its very confusing without it.
    Jeremy | jfein.net

  7. #7
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    912
    Thanks
    117
    Thanked 2 Times in 2 Posts

    Default

    I placed it here: http://www.cecicasariego.com/decometvideo.html
    You will see that in the bottom bar the yellow symbol comes up, saying there's an error on the page (probably because of the doctype). Then the pop-up shows, but without the video in it, and that's what this page is all about.

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

    Default

    I do not see anything wrong with this script, it works in IE and FF.
    Jeremy | jfein.net

  9. #9
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    912
    Thanks
    117
    Thanked 2 Times in 2 Posts

    Default

    Yes, the pop-up comes up, but
    1/ th error symbol comes up in the statusbar, so something is wrong
    2/ the video doesn't come up

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

    Default

    The video comes up for me, witch browser are you using?
    Jeremy | jfein.net

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
  •