ragazzi ho un calendario pop up
e dovrei mettere la variante in modo che quando vado sul giorno prestailito mi esca un'altro pop up con le news
chi mi puo aiutare
ragazzi ho un calendario pop up
e dovrei mettere la variante in modo che quando vado sul giorno prestailito mi esca un'altro pop up con le news
chi mi puo aiutare
qualuno mi aiuta dovrei mettere una popup quando clicco sul giorno
<HTML>
<HEAD>
<script>
//Per leggere i parametri passati in querystring
function objQueryString(){
dic = new Array()
arr = new Array()
qs = location.search
qs = qs.replace(/\?/,'')
aQs = qs.split('&')
txt = ''
for(i=0;i<aQs.length;i++){
pv = aQs[i]
aPV = pv.split('=')
dic[aPV[0]]=aPV[1]
}
return dic
}
var qs = objQueryString()
dove = qs['dove']
OnClick = qs['onclick']
var isNav, isIE
if (parseInt(navigator.appVersion)>=4){
if(navigator.appName == "Netscape"){
isNav = true
}
else{
isIE = true
}
}
var aGiorno = new Array('Lunedì','Martedì','Mercoledì','Giovedì','Ve nerdì','Sabato','Domenica');
var aMese = new Array('Gennaio','Febbraio','Marzo','Aprile','Maggi o','Giugno','Luglio','Agosto','Settembre','Ottobre ','Novembre','Dicembre');
//---------------- FUNZIONE PER GESTIONE <DIV>
function scrivi(idDiv,testo){
if(document.getElementById)
document.getElementById(idDiv).innerHTML = testo
if(document.layers){
document.layers[idDiv].document.write(testo);
document.layers[idDiv].document.close();
}
}
function setDiv(id){
if(document.all)
return(document.all[id]);
else if(document.layers)
return(document.layers[id]);
else if(document.getElementById)
return(document.getElementById(id));
}
function visibilityDiv(id,vh){
var dd = setDiv(id);
if(vh)
txtvh='visible'
else
txtvh='hidden'
if(isNav)
dd.visibility = txtvh;
else if(isIE)
dd.style.visibility = txtvh;
}
//-----------------------------------------------------------------------------------
//---------------- FUNZIONI GESTIONE DATE
function DateAdd(data,gg){
data.setDate(data.getDate() + gg);
return data
}
function y2k(number) {
return (number < 1000) ? number + 1900 : number;
}
//------------------------------------------------------------------------------------------
function SetCalendarioLayout(bgColor,fontColorMese,coloreGr iglia,cellaWidth,cellaHeiht,cellaBg,cellaBgD,cella BgOver,cellaBgVuoto,fontSize,fontFace,fontColor,fo ntColorD,fonColorFestivo,tipoGiorni,antecedente){
this.CellaW = cellaWidth
this.CellaH = cellaHeiht
this.CellaBg = cellaBg
this.CellaBgD = cellaBgD
this.CellaBgOver = cellaBgOver
this.CellaBgVuoto = cellaBgVuoto
this.FontSize = fontSize
this.FontFace = fontFace
this.FontColor = fontColor
this.FontColorD = fontColorD
this.FontColorFestivo = fonColorFestivo
this.ColoreGriglia = coloreGriglia
this.BgColor = bgColor
this.FontColorMese = fontColorMese
this.TipoGiorni = tipoGiorni //0=completo; 1,2,3,4=numero di caratteri es 3 = LUN MAR MER
this.Antecedente = antecedente //se è false sono clickabili solo i giorni da oggi in avanti
}
//QUI PER CAMBIARE IL LAYOUT (VEDERE QUI SOPRA PER CORRISPONDENZA)
var Layout = new SetCalendarioLayout('#660000','#FFFFFF','red',30,2 0,'#F4F2B3','#898469','#FFFFFF','#C1BB9A',2,'verda na','#000000','#FFFFFF','#DD0000',1,false)
function WebCalendario(ggV,mmV,aaaaV){
var txt = ''
var txtMeseAnno = ''
txtMeseAnno = aMese[(mmV-1)]+' '+aaaaV
oggi = new Date()
//Se si dispone di un linguaggio lato server sarebbe meglio impostare la data odierna del server
//ad esempio in ASP
//oggi = new Date(<%=Year(Now)%>,<%=(Month(Now)-1)%>,<%=Day(Now)%>)
laData = new Date(y2k(oggi.getYear()),oggi.getMonth(),oggi.getD ate())
txt = txt+'<table border="0" bordercolor="'+Layout.ColoreGriglia+'" cellspacing="1" cellpadding="0" bgcolor="'+Layout.BgColor+'">\n'
txt = txt+' <tr>\n'
for(i=0;i<=6;i++){
gs = aGiorno[i]
if(Layout.TipoGiorni==0){
}
else{
gs = gs.substr(0,Layout.TipoGiorni)
}
txt = txt+' <td width="'+Layout.CellaW+'" height="'+Layout.CellaH+'" bgcolor="'+Layout.CellaBgD+'" align="center" valign="middle"><font face="'+Layout.FontFace+'" size="'+Layout.FontSize+'" color="'+Layout.FontColorD+'">'+gs+'</font></td>\n'
}
txt = txt+' </tr>\n'
var taca = false
var cont = 0
var WeekDay = 0
var txtGiorno = ''
var bolEffetto = false
var bolDataCorrente = false
xData = new Date(aaaaV,mmV-1,1)
WeekDay = xData.getDay()
if(WeekDay==0){
WeekDay=6
}
else{
WeekDay = WeekDay-1
}
xData = DateAdd(xData,-(WeekDay))
for(r=1;r<=6;r++){
txt = txt+' <tr>\n'
for(i=0;i<=6;i++){
WeekDay = xData.getDay()
if(WeekDay==0){
WeekDay=6
}
else{
WeekDay = WeekDay-1
}
if(xData.getMonth()==(mmV-1)){
taca=true
}
else{
taca=false
}
txtGiorno=xData.getDate()
txt = txt+' <td width="'+Layout.CellaW+'" height="'+Layout.CellaH+'"'
var FontColorX = ''
var FontColorFestiviX = ''
if(taca){
strData = ''
strData = xData.getDate() + '/'+(xData.getMonth()+1)+'/'+y2k(xData.getYear())
txt = txt+' bgcolor="'+Layout.CellaBg+'"'
if(Layout.Antecedente)
txt = txt+' onmouseover="this.bgColor=\''+Layout.CellaBgOver+' \'" onmouseout="this.bgColor=\''+Layout.CellaBg+'\'"'
else
if(xData>=laData)
txt = txt+' onmouseover="this.bgColor=\''+Layout.CellaBgOver+' \'" onmouseout="this.bgColor=\''+Layout.CellaBg+'\'"'
txt = txt+' align="center" valign="center"><font face="'+Layout.FontFace+'" size="'+Layout.FontSize+'"'
if(i==6){
txt = txt+' color="'+Layout.FontColorFestivo+'"'
linkColor=Layout.FontColorFestivo
}
else{
txt = txt+' color="'+Layout.FontColor+'"'
linkColor=Layout.FontColor
}
if(Layout.Antecedente)
txt = txt+' style="cursor: default">'+txtGiorno+'</font></td>\n'
else
if(xData>=laData)
txt = txt+' style="cursor: default">'+txtGiorno+'</font></td>\n'
else
txt = txt+' style="cursor: default">'+txtGiorno+'</font></td>\n'
}
else{
txt = txt+' bgcolor="'+Layout.CellaBgVuoto+'"'
txt = txt+' align="center" valign="center"><font face="'+Layout.FontFace+'" size="'+Layout.FontSize+'"'
txt = txt+'></font></td>\n'
}
xData = DateAdd(xData,1)
}
txt = txt+' </tr>\n'
}
txt = txt+'</table>\n'
var txtC = ''
txtC = txtC+'<table border="0" cellspacing="0" cellpadding="1">\n'
txtC = txtC+' <tr>\n'
txtPrec = ''
if(mmV==1)
txtPrec = '12,'+(aaaaV-1)
else
txtPrec = (mmV-1)+','+aaaaV
if(mmV==12)
txtSucc = '1,'+(aaaaV+1)
else
txtSucc = (mmV+1)+','+aaaaV
txtC = txtC+' <td bgcolor="'+Layout.BgColor+'" align="left"><font face="'+Layout.FontFace+'" size="'+Layout.FontSize+'" color="'+Layout.FontColorMese+'"><<</font></td>\n'
txtC = txtC+' <td bgcolor="'+Layout.BgColor+'" align="center"><font face="'+Layout.FontFace+'" size="'+Layout.FontSize+'" color="'+Layout.FontColorMese+'">'+txtMeseAnno+'</font></td>\n'
txtC = txtC+' <td bgcolor="'+Layout.BgColor+'" align="right"><font face="'+Layout.FontFace+'" size="'+Layout.FontSize+'" color="'+Layout.FontColorMese+'">>></font></td>\n'
txtC = txtC+' </tr>\n <tr>\n'
txtC = txtC+' <td colspan="3" bgcolor="'+Layout.BgColor+'">'+txt+'</td>\n'
txtC = txtC+' </tr>\n</table>'
// return txtC
scrivi('erCalendario',txtC)
}
function init(){
oggi = new Date()
WebCalendario(oggi.getDate(),(oggi.getMonth()+1),o ggi.getFullYear())
}
</script>
</HEAD>
<BODY onLoad="init()">
<div id="erCalendario" name="erCalendario" style="position:absolute;"></div>
</BODY>
</HTML>