Gazza wrote in message ...
>In article <aiZQb.27541$zj7.1654@newsread1.news.pas.earthlink.net>,
>telina02@ziplip.com says...
>
>> DW generated the code - nuff said. I've created this thing three times
>> now - in Fireworks, Imagestyler, and DW. The DW version is the only one
>> that came close to working.
>
>IIRC, you can edit the templates that DW uses for bits and pieces like
>that - like <a style='text-decoration: underline;' href="http://www.alistapart.com/articles/dreamweaver/" target="_blank">http://www.alistapart.com/articles/dreamweaver/</a> does for
>producing XHTML rather than HTML. Might be worth playing to see if you
>can tweak it so it produces working JS/HTML...
I've got to get this thing working by tomorrow.
Tried your suggestion but it's still broken. It appears that for some
reason the browser isn't loading the mouseover image.
There's another script on the page right now, standing in for a custom
calendar that will be linked to a db. I'm thinking maybe these two scripts
are fighting each other somehow? Just in case that appears obvious, the
code is pasted below.
TL
-------------
text of linked calendar script:
function buildCal(m, y, cM, cH, cDW, cD, brdr){
var
mn=['January','February','March','April','May','June','July','August','Septe
mber','October','November','December'];
var dim=[31,0,31,30,31,30,31,31,30,31,30,31];
var oD = new Date(y, m-1, 1); //DD replaced line to fix date bug when
current day is 31st
oD.od=oD.getDay()+1; //DD replaced line to fix date bug when current day is
31st
var todaydate=new Date() //DD added
var scanfortoday=(y==todaydate.getFullYear() && m==todaydate.getMonth()+1)?
todaydate.getDate() : 0 //DD added
dim[1]=(((oD.getFullYear()%100!=0)&&(oD.getFullYear()%4==0))||(oD.getFullYea
r()%400==0))?29:28;
var t='<div class="'+cM+'"><table class="'+cM+'" cols="7" cellpadding="0"
border="'+brdr+'" cellspacing="0"><tr align="center">';
t+='<td colspan="7" align="center" class="'+cH+'">'+mn[m-1]+' -
'+y+'</td></tr><tr align="center">';
for(s=0;s<7;s++)t+='<td class="'+cDW+'">'+"SMTWTFS".substr(s,1)+'</td>';
t+='</tr><tr align="center">';
for(i=1;i<=42;i++){
var x=((i-oD.od>=0)&&(i-oD.od<dim[m-1]))? i-oD.od+1 : ' ';
if (x==scanfortoday) //DD added
x='<span id="today">'+x+'</span>' //DD added
t+='<td class="'+cD+'">'+x+'</td>';
if(((i)%7==0)&&(i<36))t+='</tr><tr align="center">';
}
return t+='</tr></table></div>';
}
--------------------------
what's actually on the page can be seen below
--------------------------
<script type="text/javascript" src="basiccalendar.js">
/***********************************************
* Basic Calendar-By Brian Gosselin at <a style='text-decoration: underline;' href="http://scriptasylum.com/bgaudiodr/" target="_blank">http://scriptasylum.com/bgaudiodr/</a>
* Script featured on Dynamic Drive (http://www.dynamicdrive.com)
* This notice must stay intact for use
* Visit <a style='text-decoration: underline;' href="http://www.dynamicdrive.com/" target="_blank">http://www.dynamicdrive.com/</a> for full source code
***********************************************/
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length;
i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<!--calendar script entry-->
<script type="text/javascript">
var todaydate=new Date()
var curmonth=todaydate.getMonth()+1 //get current month (1-12)
var curyear=todaydate.getFullYear() //get current year
document.write(buildCal(curmonth ,curyear, "main", "month", "daysofweek",
"days", 1));
</script><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Javascript problem