Hello. I am new to posting here & wanted some help on a javascript code I have. I can not get it to go to my site when clicked on. It has an error that says something like:
Line: 139
Char:1
Error:Object expected
Code:0
URL:www.ambercakes.com/CalenderClocksVal.html
And the Line that is 139 is where the code starts below.
I will be using it with countdown clocks. I see it works for someone else on their webpage but not mine. What am I doing wrong? Please help.
The coding:
<table border="0" width="300" background="
http://ambercakes.com/CountdownClock...hearts4CDC.png" height="225" style="border-collapse: collapse">
<tr>
<td onClick="FP_goToURL(/*href*/'http:www.ambercakes.com')">
<p align="center" class="style32"><font size="6">
<script language="JavaScript">
<!--
var today = new Date;
var Future0 = new Date;
ThisYear = 2009;
var FutureMonth = 01;
var FutureDate = 13;
var faraevent = "Valentines";
Future0.setMonth(FutureMonth, FutureDate);
Future0.setFullYear(ThisYear);
today1 = Date.parse(today);
future1 = Date.parse(Future0);
secleft = future1 - today1;
miliday = 24 * 60 * 60 * 1000;
daysleft = secleft/miliday;
daysleftint = Math.round(daysleft);
if (daysleftint > 1)
document.write( 1 + daysleftint, " days until ", faraevent , "! ");
else if (daysleftint == 1)
document.write(faraevent, " is tomorrow! ");
else if (today1 == future1)
document.write(faraevent, " is today! ");
//-->
</script>
</font></td>
</tr>
</table>
It works at this site:
http://www.noelladesigns.com/Countdo...ownBanners.htm
But not my site:
http://ambercakes.com/CountdownClocksVal.html
Thanks in Advance!
Josie