Results 1 to 10 of 10

Thread: web page fade

  1. #1
    Join Date
    Nov 2007
    Posts
    24
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default web page fade

    hi,

    is it possible to build those kind of fade in dhtml?(the fade when the page loads):
    http://www.saturday-london.com/ (flash site)

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

    Default

    Yes, but I wouldn't recommend it.

    It would need to be done entirely with AJAX, or use of frames, however this would prevent a user from ever being able to bookmark anything other than the initial home page.

  3. #3
    Join Date
    Nov 2007
    Posts
    24
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default ajax?

    there's is no need of ajax nor frames this can be simply done with document.bgColor and onload event

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    onload = function() {
      var s = document.body.style;
      if(parseInt((s.backgroundColor = "#" + (parseInt((s.backgroundColor || "#000000").substr(1)).toString(16) + 0x111111).toString(16)).substr(1), 16) < 0x777777)
        setTimeout(onload, 50);
    };
    boogyman, I think tetrix was just talking about the initial fade effect, not having all the pages crushed into one file like on that site.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default How can it be done in Mozilla & IE?

    I have been searching and searching. I am looking for some simple copy / paste code that will cause the pages to fade in transition across browsers. It can be done in IE with this:

    <meta http-equiv="Page-Enter" content="blendtrans(duration=1.0)">
    <meta http-equiv="Page-Exit" content="blendtrans(duration=1.0)">

    Is there a code which will create the same effect in Mozilla, as well? If so, where should it be placed in the document?

  6. #6
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iFrame Fader

    hi twey

    smart post! i really appreciate coders who find the simplest, cross-browser solution, without getting too fancy. good job!

    how about the following:

    i want to put similar code on a page containing an iFrame. i want each new page inside the iFrame to fade in, and the previous page to fade out. i have no control over the iFrame pages, only the parent page. i want to do this as simply as possible.

    looking forward to your smart answer!

    -johny

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    If the pages inside the iframes are on different domains, you're out of luck: it's impossible to manipulate pages over different domains for security reasons.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Jan 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iFrame Events & Opacity

    • Doesn't the iFrame raise events accessible to the parent page, such as onload?
    • Doesn't the parent page have control over external iFrame properties, such as opacity?
    • My browser is rendering the contents of the iFrame-- therefor, won't my browser have some control over how it renders it?

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes (although that's the only example), no (effectively), and no.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    Code:
    onload = function() {
      var s = document.body.style;
      if(parseInt((s.backgroundColor = "#" + (parseInt((s.backgroundColor || "#000000").substr(1)).toString(16) + 0x111111).toString(16)).substr(1), 16) < 0x777777)
        setTimeout(onload, 50);
    };
    I don't get it, and/or it doesn't work.

    Warning: Expected color but found '#01118481'. Error in parsing value for property 'background-color'. Declaration dropped.
    Source File: [some file with that code on it]
    Line: 0
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •