Random background image problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mars1985
    Private

    • Aug 2005
    • 2

    Random background image problem

    Hello! I just started using BlueVoda and I love it! I have been working on a personal web site for a couple of nights now and I was think how neat it would be to have a random image background every time someone came to my site. anyways I can't seem to get this script to work! I am not sure how it would anyway since the only way you can edit the background is in page proprieties.. its late and I have been working for hours so - tell me if you have any tips to help me figure this out...


    <script>
    /*Random Background Image-
    By JavaScript Kit (www.javascriptkit.com)
    More free JavaScripts here!
    */
    var backgr1="../images/bg1.jpg"
    var backgr2="../images/bg2.jpg"
    var backgr3="../images/bg3.jpg"
    var cur=Math.round(6*Math.random())
    if (cur<=1)
    backgr=bg1
    else if (cur<=4)
    backgr=bg2
    else
    backgr=bg3
    document.write('<body background="'+backgr+'"')
    </script>
  • Pablo
    Moderator

    • May 2005
    • 507

    #2
    This script can not work together with BlueVoda, it duplicates the BODY tag (already generated by BlueVoda) and so will generate incorrect HTML.
    Forum Moderator
    BlueVoda Spe******t

    Comment

    • mars1985
      Private

      • Aug 2005
      • 2

      #3
      Originally posted by Pablo
      This script can not work together with BlueVoda, it duplicates the BODY tag (already generated by BlueVoda) and so will generate incorrect HTML.
      I see - I guess I could edit the html before uploading...

      Comment

      Working...
      X