Countdown Code Help - I need help setting an image as the background.

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

Countdown Code Help - I need help setting an image as the background.

Albus Dumbledore
Ok, now for scripts like this i am not to well of working with..and i am in need of a bit of help, i would like to set a background image as the background not a color...

CODE
<script language="JavaScript1.2">

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

function setcountdown(theyear,themonth,theday){
yr=theyear;mo=themonth;da=theday
}

//////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////

//STEP 1: Configure the countdown-to date, in the format year, month, day:
setcountdown(2006,03,07)

//STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively
var occasion="Release Of the GoF DVD"
var message_on_occasion="The Gof DVD Is Out! Go And Get It!"

//STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
var countdownwidth='338px'
var countdownheight='105px'
var countdownbgcolor='lightblue'
var opentags='<font face="Verdana"><small>'
var closetags='</small></font>'

//////////DO NOT EDIT PASS THIS LINE//////////////////

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var crosscount=''

function start_countdown(){
if (document.layers)
document.countdownnsmain.visibility="show"
else if (document.all||document.getElementById)
crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie
countdown()
}

if (document.all||document.getElementById)
[b]document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'"></span>')[/b]

window.onload=start_countdown


function countdown(){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
futurestring=montharray[mo-1]+" "+da+", "+yr
dd=Date.parse(futurestring)-Date.parse(todaystring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
//if on day of occasion
if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+message_on_occasion+closetags
return
}
//if passed day of occasion
else if (dday<=-1){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+"Occasion already passed! "+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+"Occasion already passed! "+closetags
return
}
//else, if not yet
else{
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags
}
setTimeout("countdown()",1000)
}
</script>

<ilayer id="countdownnsmain" width=&{countdownwidth}; height=&{countdownheight}; bgColor=&{countdownbgcolor}; visibility=hide><layer id="countdownnssub" width=&{countdownwidth}; height=&{countdownheight}; left=0 top=0></layer></ilayer>


ne ways, i was told by a friend to change the aspects in bold to this

CODE
document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-image: url(\"path_to_image\")"></span>')


and i did, but i could not get it to work...maybe there is somthing in missing?

if you are willing to help me with this lol help is much appreciated..im doing it for a site im at...

http://img.photobucket.com/albums/v610/123...90/325bec51.jpg thats the URL if your willing to help!

 

 

 


Reply

beeseven
Did you make sure to use the entire image path (including the http)? The only other thing I can think of would be to try changing the \" to \', but I doubt it would actually matter. It would help if you provided us with a link to the page.

Reply

Saint_Michael
thats easy do it like this

Step 1 Create a Table set up or if you use css do the same thing

Step 2: set the image as a background
CODE

<td background="yourimagehere.jpg">place javascript here</td>


Step 3: Put your javascript into that table and it should work.

Reply

Albus Dumbledore
well that didn't work out for me >_< so for now all i did was use iframes, a lame way of doing it but i did it and made the iframe the same size as the image and it worked...so i would concider this topic closed..resolved..complete..lol, it may be closed!!`

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. button count down code - 31.51 hr back. (1)
  2. small countdown code - 228.43 hr back. (1)
  3. span countdown code - 258.66 hr back. (1)
  4. document.getelementbyid("14") travian - 447.44 hr back. (3)
Similar Topics

Keywords : countdown, code, setting, image, background

  1. Testing Of The Auto Image Resizer
    This might be useful for other members also! (0)
  2. Video Play Like Youtube
    php, javascript source code need like player youtube (4)
    i need help for source code php or javascript... i want display video with a player like in
    youtube... please for help?....
  3. Finding The Rgb Color Of An Image
    Using any programming language (3)
    hello friends i am doing a project , in that i am inneed to fine the mean RGB value of a particular
    image , is there any program in any language which can do this ? the input to the program will be
    any image ( can be linked in the program) and the putput must be the mean RGB value of that
    particular image , is this Possible ? If so please post the Coding , no matter in what ever language
    it may be written.Thanks in Advance....
  4. An Uncrackable Code!
    (2)
    You gotta check this out. This code is completely uncrackable. http://www.waingo.com/impossible
    I tried a hex to bin converter, then a reverse matrix algorithm, and I got nothing.....
  5. Create Dynamic Html/php Pages Using Simple Vb.net Code
    Taking your application data, and creating a webpage for others to vie (1)
    This example will show you how use a string in VB to create PHP code. In order to do this, you need
    a string to store your PHP page and a function that I will list at the bottom of the page for you to
    put in a module. This code is written in VB.NET Public Sub CreatePage(ByVal HTMLTitle As
    String, ByVal HTMLText As String, ByVal HTMLFileName As String) Dim strFile As String '
    ---------------------- ' -- Prepare String -- ' ---------------------- strFile = "" '
    -------------------- ' -- Write Starter -- ' -------------------- strFile = " " ....
  6. Ad Text
    Setting up ads (2)
    Please, could anyone explain to me how to put up ad text, similar to the absence format by the sides
    of my blog.....
  7. Davinci Code
    (5)
    Ok, Ok, I know I am way behind on the times, the movie is allready out and gone and I just now got
    around to reading the book. First off, so you know, I'm a cheap skate, and just happened to see
    the book at the swap meet for a quarter, so I decided I wanted to see what all the fuss was about.
    I remember a lot of controversy when the movie came out from the religous sector. And boy do I know
    why now, after reading the book! Talk about a serious stab at organaized
    religion!!! At any rate, it was a good story and I did enjoy reading it. Sure kep....
  8. Need Advice On Setting Up Mysql Database.
    I have a huge amount of daily data updates to be inserted. (4)
    First of all, to get the idea of what I am trying to achieve here, please have a look at my
    idea thread, entitled Idea For Using A Cron Job To Grab Daily Travian Map.sql Updates . This gives
    a prelude to the project, what it is for, what it is supposed to do, etc. Now, what I need is
    specific advice on setting up the mySQL database(s) to implement this idea. There is a useful FAQ
    file for how to make use of the map.sql data located on the help.travian.com website, which also
    gives an example of the CREATE TABLE instruction that matches the data in the map.sql fi....
  9. How To Make Image Buttons Act As Submit Button
    (8)
    Hi guys I m making a personal website .... I asked in the forum how to create and use images as
    buttons...thanks for your help.. I can make them work as links....give some hovering effects
    etc...they work very well..untill I use them in forms and use them as SUBMIT or RESET button...when
    I do this nothing happens on clicking the image button... the code I use is like but there
    is problem in making them act as SUBMIT or RESET button. I have tried very hard to make it work, but
    didn't succeed .... I know html and CSS quite well but , don't know....Javascr....
  10. How To Create Cool Image Buttons
    (7)
    Hi guys ... I m making a personal site thats for me a nd my friend group. What I need is a tool
    which can make cool image buttons to use in my HTML pages. Is there any site which offers such
    software or the buttons itself for free. I would like to make them on my own, I just need to know
    the tool.I can't go for an expensive tool like photoshop or corel. So please suggest me a free
    tool. Thanks.......
  11. Render Request Please..
    need this image renderd please. (0)
    Hi, im realy new to photoshop and i realy suck at rendering /sad.gif" style="vertical-align:middle"
    emoid=":(" border="0" alt="sad.gif" /> so i was wondering if anybody could render this image for me
    please Thank you so much for whoever does it. /smile.gif" style="vertical-align:middle"
    emoid=":)" border="0" alt="smile.gif" />....
  12. Problem Aligning In Firefox
    Problem aligning an image in Firefox. (9)
    Hello everyone! I am new here. /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
    alt="smile.gif" /> I am looking for some advice...I've been fiddling around with my site for
    the last few hours and have had no luck! www.thelatency.com/test/tour_dates.php as you can the
    image header above all the text is aligned perfectly in IE and not in Firefox. Any ideas? Thanks
    so much in advance. /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif"
    />....
  13. Syntax Highlighting For Code
    (4)
    Hey all, I'm not sure if its been brought up but I couldn't find any topics on this. Has
    anyone brought up the idea of updating the blocks to allow syntax highlighting? This would be a
    nice feature to have but I don't know if its something that can be easily added on. I don't
    know about you guys but when I see long blocks of code in the same color from users I just don't
    want to read them. Especially when they are put in a small box container about 100px high and I have
    to scroll through it. Making code easier to read would help a lot. Peace Sone.....
  14. Add Flashing Inbox To Invisionfree Forum
    Html code for invsiionfree!! (2)
    Do you find it annoying when you are on your invisionfree forum, and you get a new message, and it
    ends up taking you 5 minutes to notice? This code makes the inbox link flash bold red saying how
    many messages you have. In version 1 the word inbox stays the same, and doesnt change at all (for
    Example this is flashing: Inbox (2) In version 2 (the second code) the word inbox changes to
    messages (constantly, so that if you have none, it says messages (0) instead of inbox (0). It still
    flashes Red Put the following In the Header and Body Section (Admin Cp>>>Skinning ....
  15. Do You Use Imagefilez.com?
    ImageFilez.com : Free Image and Video Hosting (36)
    Do you use ImageFilez.com? If so, for what and how long? If not, why? /huh.gif"
    style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /> Please vote and reply to
    this thread with your responses. I don't personally, because I have an account on Photobucket
    and ImageShack, and I sometimes use the Free Hosting that comes embedded into my forum and at the
    site I moderate.....
  16. Runescape 2 Private Server: Code/guide 1
    Creating a wilderness training zone. (11)
    Purpose: To make a cool training area in the wild. Difficulty: 1-3 Classes Modified:
    Client.java, shop.cfg, autospawn.cfg, npchandler, item2.java, shop.cfg Assumed Knowledge:
    Copy/paste, basic knowledge of cases, and how to search. Credits: 10% fedexer(global object tut),
    10% to my friend for teaching me how to make monsters drop random things, 80% me for the idea, and
    comming up with it. REQUIREMENTS: Make sure that your server can use herblore, mining,
    woodcutting, theiving, and prayer. You must also have fedexer's global objects code. Other
    Thi....
  17. Need To Shrink The File Size Of Web Image? - Photoshop Tricks
    (3)
    QUOTE NEED TO SHRINK THE FILE SIZE? USE TRANSPARENCY Want a killer tip for squeezing even
    more size out of your GIF Web images? Make something transparent. That's right, if you can pick
    an area of your image to make transparent, your file size will drop like a rock. For example, if
    you're putting a logo over a white background and you can make the white area around the logo
    transparent, your file size will be significantly smaller. The transparent areas are virtually
    ignored when determining file size, because, after all, there's nothing there. ....
  18. Your First Autoit
    Learning To Code.. (4)
    Autoit is a simple, yet powerful programming language, it allowed the creation of the pangea
    desktops, and the Remote Pc Control with a cell.. You can learn it too. Here is the first of several
    lessons i will post inside of this topic. It is a 32 bit program, it doesnt work on windows 98, 95,
    and i dont think (THINK) Windows ME Step 1: Download and install the latest version of autoit from
    http://www.autoitscript.com i prefer that you use beta. Step 2: Right click somewhere on your
    desktop or my documents, and mouseover new and click Autoit V3 Script Step 3 (optiona....
  19. Wmp (windows Media Photo) - The New Image File Format From Microsoft
    windows media photo WMP - could replace JPGs and GIFs? (33)
    Microsoft have decided to come up with a new image format to add to the common JPGs, GIFs and PNGs
    of today. It is to be called Windows Media Photo format or WMP for short. It is said to
    "Surpass the limitations of existing file formats" and here is what it'll offer: Numerous
    colour formats for printing and displaying High-quality lossy or even lossless compression
    Really efficient decoding for numerous resolutions For more features, visit
    http://www.microsoft.com/whdc/xps/wmphoto.mspx Presumeably, the JPEG2000 format or JP2 was
    ....
  20. How To Create Embed Image Mail In Gmail
    (56)
    Hi to all ! Anybody can help me to create an email with embedded image so that mail reader
    automatically see that image. Moreover I wont attached that image as it appears small in size in on
    gmail. Thanks in Advance. ....
  21. Watermark Your Image With Simple Php Script
    found it on the net (35)
    This script was found on the net http://tips-scripts.com/?tip=watermark#tip B&T's Tips &
    Scripts site. Just in case the site may not show, I will include the code here: List of things
    needed: 1. your image in any format 2. watermark image--in gif format with transparent background 3.
    script below with name (i.e. watermark.php) CODE <?php // this script creates a watermarked
    image from an image file - can be a .jpg .gif or .png file // where watermark.gif is a mostly
    transparent gif image with the watermark - goes in the same directory as this script // ....
  22. How To Put Music In The Background Of A Powerpoint Presentation
    without having the viewer download the music file (11)
    Well, i made this power poit presentation in memory of my grandfather as many of you kno, passed
    away exactly a week ago....and i am trying to get this song to play as background music..and i did,
    but there is one humongus problem... in order for the people who are viewing it to hear the
    background music they have to download the music file as well ad the powerpoint presentation, which
    on my DSL conntection taked almost 2 minutes, and i could just imagine what it will be for a dial-up
    user (my grandma who wants to see it)... Some people may say, its impossible, but i kn....
  23. Simple C File Handling In Action
    Small code snipet which covers most of basic file handling and navigat (4)
    Yesterday I suddenly got a lot of work. The same work we try to push off, yes you are right all
    formalities to get the code review incorporated and update all source code files with code review
    headers. Imagine if you need to open 300 files one by one and append code review headers at the
    end. Since most files are reviewed in groups of 20 to 30 files. We require one header to be placed
    in say 20 to 30 files. To simplify I went back to my class assignment days and wrote this small c
    utility to open all files passed on command line and open attach code review headers an....
  24. Setting Processor Type
    in the BIOS (4)
    I have a coputer about a year and half old, anyway last night I had to reset the BIOS due to some
    unplesnentness, which I'm not willing to discuss. Anyway that went well however now the
    computer thinks the process is AMD athalon XP 2500+ when it actualy is a 3200+, I know this for a
    fact it is printed on the processor (I checked). Anyway when I was in the BIOS a wile ago I thought
    I saw I clock setting option, anyway now I can't find it. Can anyone tell me where in the BIOS
    these options should be. Some Specs: Board: nVidia-nForce2 Soltek BIOS: Phoenix Techno....
  25. 60 Seconds Countdown That Shutdown The Pc
    Problem in computer that automatically restart COMPUTER (15)
    I encountered this bugs or what 6 months ago, untill now still gives me a headache. I don't
    know if it is a virus, problem in windows services or what but honestly I cant fix it. What it does
    is, it's gives you an error message saying blahh blahh...with a timer of 60 seconds, when the
    timer reached 0 it will automatically restart your computer.....
  26. Da Vinci Code
    What's it about?? (16)
    Well I heard in the news abut the Da Vinchi Code and stuff, whats it really about, Like I've
    seen previews and yeah, codes that da vichi used or something, like the How Da Vichin Painted the
    First Supper and if you trace along all the people it says Da Vichi. So I like to Know What The Book
    is about???? Maybe I'll buy it and read it myself....
  27. Image Preloader With Progress Bar Status
    Pure Client-Side JavaScript tested in 4 Browsers! (23)
    Tutorial: Image Preloader with Progress Bar, by Rob J. Secord, B.Sc. (SystemWisdom)
    Description : A Tutorial for a Client-Side Image Preloader with Dynamic Real-Time Progress Bar
    Indicator written in JavaScript! Tested to work with 4 Major Internet Browsers: Firefox, MSIE,
    Netscape, Opera (Complete sample solution provided at end of tutorial, just put it on your
    web-server, add your images and go!) Intended Audience : Beginner to Intermediate Web
    Developers. Although this tutorial will cover some advanced aspects of JavaScript, I will try to
    explain....
  28. Whats The Best Code?
    www.bpsite.tk (32)
    Whats you fav code?....
  29. Mysql Database Setup : Setting Up Mysql Database
    Guide to use MySQL database in your site (6)
    A SMALL INTRODUCTION TO DATABASE ============================= I have seen that many members have
    problems with Database. Here is a small INFO which should give you the IDEA. mySQL is a DATABASE
    server. You can access it using the link in Cpanel. Cpanel can be accessed by
    "www.YOUR-SITE.com/Cpanel" There you have 4 Main Options :- 1> CREATE A DATABASE 2> CREATE A USER
    3> ADD USER TO DATABASE 4> PHPMYADMIN CREATE : IT ALLOWS YOU TO CREATE A DATABASE CREATE USER
    : IT ALLOWS YOU TO CREATE A USER. USING THIS, YOU CAN ACCESS THE DATABASE. A DATABASE CANNOT BE....
  30. How do you test your php code
    (80)
    We know that php is a server side scripting language. So we will need a server with the php parser
    to parse/test our code. How are you doing that. Do you upload it to a server for testing or did you
    instal php and the server (apache) on your computer (localhost)....

    1. Looking for countdown, code, setting, image, background

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for countdown, code, setting, image, background

*MORE FROM TRAP17.COM*
Similar
Testing Of The Auto Image Resizer - This might be useful for other members also!
Video Play Like Youtube - php, javascript source code need like player youtube
Finding The Rgb Color Of An Image - Using any programming language
An Uncrackable Code!
Create Dynamic Html/php Pages Using Simple Vb.net Code - Taking your application data, and creating a webpage for others to vie
Ad Text - Setting up ads
Davinci Code
Need Advice On Setting Up Mysql Database. - I have a huge amount of daily data updates to be inserted.
How To Make Image Buttons Act As Submit Button
How To Create Cool Image Buttons
Render Request Please.. - need this image renderd please.
Problem Aligning In Firefox - Problem aligning an image in Firefox.
Syntax Highlighting For Code
Add Flashing Inbox To Invisionfree Forum - Html code for invsiionfree!!
Do You Use Imagefilez.com? - ImageFilez.com : Free Image and Video Hosting
Runescape 2 Private Server: Code/guide 1 - Creating a wilderness training zone.
Need To Shrink The File Size Of Web Image? - Photoshop Tricks
Your First Autoit - Learning To Code..
Wmp (windows Media Photo) - The New Image File Format From Microsoft - windows media photo WMP - could replace JPGs and GIFs?
How To Create Embed Image Mail In Gmail
Watermark Your Image With Simple Php Script - found it on the net
How To Put Music In The Background Of A Powerpoint Presentation - without having the viewer download the music file
Simple C File Handling In Action - Small code snipet which covers most of basic file handling and navigat
Setting Processor Type - in the BIOS
60 Seconds Countdown That Shutdown The Pc - Problem in computer that automatically restart COMPUTER
Da Vinci Code - What's it about??
Image Preloader With Progress Bar Status - Pure Client-Side JavaScript tested in 4 Browsers!
Whats The Best Code? - www.bpsite.tk
Mysql Database Setup : Setting Up Mysql Database - Guide to use MySQL database in your site
How do you test your php code
advertisement



Countdown Code Help - I need help setting an image as the background.



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE