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

Thread: Watermark Background Image Script Not Working

  1. #1
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Watermark Background Image Script Not Working

    I've used this script before and its always worked fine, but not this time. Has it changed?
    http://www.noahsvideo.com/PELUSOhistory.htm
    Thanks

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

    Default

    What script?
    Jeremy | jfein.net

  3. #3
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    The DD script for the Watermark Background Image

    <script language="JavaScript1.2">

    /*
    Watermark Backgound Image Script- © Dynamic Drive (www.dynamicdrive.com)
    For full source code, 100's more DHTML scripts, and TOS,
    visit dynamicdrive.com
    */

    if (document.all||document.getElementById)
    document.body.style.background="url('notebook.jpg') white center no-repeat fixed"

    </script>

  4. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Hi egghead2000,

    It's working

    Apparently, you just have to note that you set your td background to #F7EA92

    ...It covers the image. You might wish to remove your bgcolor attribute in your last <td>

    ...Also place your JS in the head section, not in the body

    ...Also, have you consider the point that when the user disabled their Javascript?..then your image in the center will not be shown.

    ...This script from DD, also has a CSS counterpart:
    Code:
    <style type="text/css">
    body{background:url('pm.gif') white center no-repeat fixed;}
    </style>
    See if it helps
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  5. #5
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I tried the above and can see the image for a split second as the page loads. Then it is covered again. I've got to get to work and will try again this evening.
    Thanks again

  6. #6
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Thanks, but I'm still having problems
    Quote Originally Posted by rangana View Post
    Hi egghead2000,

    It's working

    Apparently, you just have to note that you set your td background to #F7EA92

    ...It covers the image. You might wish to remove your bgcolor attribute in your last <td>

    ...Also place your JS in the head section, not in the body

    ...Also, have you consider the point that when the user disabled their Javascript?..then your image in the center will not be shown.

    ...This script from DD, also has a CSS counterpart:
    Code:
    <style type="text/css">
    body{background:url('pm.gif') white center no-repeat fixed;}
    </style>
    See if it helps

  7. #7
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    I guess this watermark script doesn't work with any bgcolor. As soon as I use a page color or table color it covers the watermark. Is there a way to put the watermark on top of the bgcolor so it shows?

  8. #8
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Change the color from,
    Code:
    background:url('pm.gif') white center no-repeat fixed;
    to #F7EA92.

    ....and remove the bgcolor declaration in your td's.
    See if it helps
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  9. #9
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Thank you again, its working!!!!!!
    Quote Originally Posted by rangana View Post
    Change the color from,
    Code:
    background:url('pm.gif') white center no-repeat fixed;
    to #F7EA92.

    ....and remove the bgcolor declaration in your td's.
    See if it helps

  10. #10
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Well, I thought I had it. The color I put with the watermark script turns the entire page that color. Is it possible to have the page background one color and the table background another color and have the water mark show through. Please see the following example.

    www.noahsvideo.com/pt.htm

    I'm trying t0 do this page with a water mark.

    www.noahsvideo.com/pelusohistory.htm

    Thanks

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
  •