Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Javascript background help
Old 01-28-2011, 02:58 PM Javascript background help
Average Talker

Posts: 26
Trades: 0
Hi there all.
Am trying to add a background image in this javascript

PHP Code:
<script type="text/javascript">
/* <![CDATA[ */
TargetDate "01/29/2011 07:36 PM UTC+1100";
BackColor"transparent"
ForeColor "white";
CountActive true;
CountStepper = -1;
LeadingZero true;
DisplayFormat "<span style=\"font-size: 25pt;\">%%H%%:%%M%%:%%S%% </span>";
FinishMessage "<span style=\"font-size: 50pt;\">Noch,<br />1 Stunde</span>";
/* ]]> */
</script>
<script type="text/javascript" src="http://t-design.at/12/countdown09.js"></script> 




Thanks for your help.

Last edited by xhtmlhelp; 01-28-2011 at 03:01 PM..
xhtmlhelp is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-28-2011, 03:21 PM Re: Javascript background help
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Set whatever property value relates to the background image.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-29-2011, 04:36 AM Re: Javascript background help
Average Talker

Posts: 26
Trades: 0
Please tell me code Sir.
xhtmlhelp is offline
Reply With Quote
View Public Profile
 
Old 01-29-2011, 05:27 AM Re: Javascript background help
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
Where is the image to be displayed? Work backwards from there - find the variable that governs background image display and set it at an appropriate place with a line like object.style.backgroundImage="url(x.gif)"
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


*** New:
Please login or register to view this content. Registration is FREE
PaulW is online now
Reply With Quote
View Public Profile
 
Old 01-29-2011, 10:15 AM Re: Javascript background help
Average Talker

Posts: 26
Trades: 0
Quote:
Originally Posted by PaulW View Post
Where is the image to be displayed? Work backwards from there - find the variable that governs background image display and set it at an appropriate place with a line like object.style.backgroundImage="url(x.gif)"

The image should be like background to counter.
I want to make to look like counter in dailydeal.

that code that you post me dident work
xhtmlhelp is offline
Reply With Quote
View Public Profile
 
Old 01-31-2011, 06:39 AM Re: Javascript background help
Novice Talker

Posts: 4
Name: Jaionezensis
Trades: 0
<!-- this script got from www.javascriptfreecode.com-->
<FONT face=Tahoma color=white>
<html>
<head>

</head>
<body>
<!-- STEP ONE: Insert the onLoad event handler into your BODY tag -->

<BODY BGCOLOR="#000000" onLoad="fly()">

<!-- STEP TWO: Paste this code into the BODY of your HTML document -->

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
SmallStars = 30;
LargeStars = 10;
SmallYpos = new Array();
SmallXpos = new Array();
LargeYpos = new Array();
LargeXpos = new Array();
Smallspeed= new Array();
Largespeed= new Array();
ns=(document.layers)?1:0;
if (ns) {
for (i = 0; i < SmallStars; i++) {
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,1,1'></LAYER>");
}
for (i = 0; i < LargeStars; i++) {
document.write("<LAYER NAME='ln"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFFF' CLIP='0,0,2,2'></LAYER>");
}
}
else {
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for (i = 0; i < SmallStars; i++) {
document.write('<div id="si" style="position:absolute;top:0;left:0;width:1px;he ight:1px;background:#fffff0;font-size:1px"></div>');
}
document.write('</div>');
document.write('</div>');
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for (i = 0; i < LargeStars; i++) {
document.write('<div id="li" style="position:absolute;top:0;left:0;width:2px;he ight:2px;background:#ffffff;font-size:2px"></div>');
}
document.write('</div>');
document.write('</div>');
}
WinHeight = (document.layers)?window.innerHeight:window.docume nt.body.clientHeight;
WinWidth = (document.layers)?window.innerWidth:window.documen t.body.clientWidth;
for (i = 0; i < SmallStars; i++) {
SmallYpos[i] = Math.round(Math.random() * WinHeight);
SmallXpos[i] = Math.round(Math.random() * WinWidth);
Smallspeed[i]= Math.random() * 5 + 1;
}
for (i = 0; i < LargeStars; i++) {
LargeYpos[i] = Math.round(Math.random() * WinHeight);
LargeXpos[i] = Math.round(Math.random() * WinWidth);
Largespeed[i] = Math.random() * 10 + 5;
}
function fly() {
var WinHeight = (document.layers)?window.innerHeight:window.docume nt.body.clientHeight;
var WinWidth = (document.layers)?window.innerWidth:window.documen t.body.clientWidth;
var hscrll = (document.layers)?window.pageYOffset:document.body .scrollTop;
var wscrll = (document.layers)?window.pageXOffset:document.body .scrollLeft;
for (i = 0; i < LargeStars; i++) {
LargeXpos[i] -= Largespeed[i];
if (LargeXpos[i] < -10) {
LargeXpos[i] = WinWidth;
LargeYpos[i] = Math.round(Math.random() * WinHeight);
Largespeed[i] = Math.random() * 10 + 5;
}
if (ns) {
document.layers['ln'+i].left = LargeXpos[i];
document.layers['ln'+i].top = LargeYpos[i] + hscrll;
}
else {
li[i].style.pixelLeft = LargeXpos[i];
li[i].style.pixelTop = LargeYpos[i] + hscrll;
}
}
for (i = 0; i < SmallStars; i++) {
SmallXpos[i] -= Smallspeed[i];
if (SmallXpos[i] < -10) {
SmallXpos[i] = WinWidth;
SmallYpos[i] = Math.round(Math.random()*WinHeight);
Smallspeed[i] = Math.random() * 5 + 1;
}
if (ns) {
document.layers['sn'+i].left = SmallXpos[i];
document.layers['sn'+i].top = SmallYpos[i]+hscrll;
}
else {
si[i].style.pixelLeft = SmallXpos[i];
si[i].style.pixelTop = SmallYpos[i]+hscrll;
}
}
setTimeout('fly()', 10);
}
// End -->
</script>



<!-- Script Size: 3.79 KB -->

</body>
</html>



<font face="Tahoma"><a target="_blank" href="http://www.javascriptfreecode.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>
__________________

Please login or register to view this content. Registration is FREE
Jaionezensis is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Javascript background help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31964 seconds with 12 queries