Results 1 to 5 of 5

Thread: Can anyone work this background image script so it doesn't disappear on refresh.

  1. #1
    Join Date
    Aug 2007
    Location
    Salisbury
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Can anyone work this background image script so it doesn't disappear on refresh.

    Here is the Dynamic Drive script but when you refresh the page is goes white.

    When you navagate the buttons the background stays but I can't work it out.



    <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('http://images40.fotki.com/v1336/fileFFqQ/bd18f/9/945583/6882229/Sunflower.gif') white center no-repeat fixed"

    </script> </html>
    Last edited by poshrat; 11-05-2008 at 12:35 AM.

  2. #2
    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

    There is no:

    Code:
    http://images40.fotki.com/v1336/fileFFqQ/bd18f/9/945583/6882229/Sunflower.gif
    There could also be other problems.
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    poshrat (11-03-2008)

  4. #3
    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

    I really don't know anything about "insert code in a box". But that doesn't change the fact that there is no file:

    Code:
    http://images40.fotki.com/v1336/fileFFqQ/bd18f/9/945583/6882229/Sunflower.gif
    You must use a valid image file for this script to have any chance of working. If it would be easier, you could skip the script (it's really unnecessary anyway) and just use style:

    Code:
    body {
    background:url('notebook.jpg') white center no-repeat fixed;
    }
    Change the notebook.jpg to a valid image file and place the above rule in an active stylesheet. Make sure it comes after any other background style for body.
    - John
    ________________________

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

  5. #4
    Join Date
    Aug 2007
    Location
    Salisbury
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thankyou John, That did it thankyou.

    I really don't know anything about "insert code in a box
    was how users put their code in a box like you have to give examples.

    Thankyou again.

  6. #5
    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

    Glad it's working. I actually do know about putting code in a box, I just didn't understand what you were asking about. Just put:

    [CODE]
    code goes here
    [/C
    ODE]

    tags around your code so that it looks like so:

    Code:
    code goes here
    - 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
  •