Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 14
  1. #1

    Problema con apertura calendario in firefox

    Salve a tutti, sto creando un modulo per la prenotazione. Oltre alle normali informazioni ho due campi di testo che vanno a riempirsi in automatico tramite un calendario a pop up. In internet explorer funziona benissimo, ma quando apro il modulo in firefox il calendario a pop up non mi si apre ed i campi testo dove dovrebbero andare le date sono colorati grigio (credo che questo sia dovuto al fatto che siano "readonly").
    vi posto il codice

    codice:
      <input readonly="readonly" type="text" name="DataArrivo" id="datain" size="15" />
      <a href="java-script:showCal('CalendarioIn')">
      [img]Calendario/ico.jpg[/img]</a></td>
      <td width="154">[b]
      <input readonly="readonly" type="text" name="DataPartenza" id="dataout" size="15" />
      </a><a href="java-script:showCal('CalendarioOut')">
      [img]Calendario/ico.jpg[/img]</div></td>
    Come mai secondo voi?
    Non so se il codice postato possa esservi d'aiuto in caso contrario chiedete

    Grazie Francesco

  2. #2
    Il file CodeCalendar.js è troppo lungo e mi dice che non posso inviarlo.posto solo il config sperando possa esserti utile

    config.js

    codice:
        addCalendar("CalendarioIn", "Seleziona la Data", "datain", "form");
        addCalendar("CalendarioOut", "Seleziona la data", "dataout", "form");
    comunque ripeto su ie7 funziona....

  3. #3
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    prima di tutto, sei assolutissimamente certo che firefox non blocchi le popup provenienti da quel dominio?

  4. #4
    ho anche disattivato il blocco popup ma niente.

  5. #5
    ma soprattutto sei sicuro che firefox abbia abilitato l'uso del javascript?
    perchè con ff lo puoi disabilitare

  6. #6
    Allora ho :
    blocco pop up : disattivato
    attiva javas: attivo
    attiva java: attivo...
    ...

    non credo ci siano altre opzioni che possano bloccarmi il popup

  7. #7
    <a href="java-script:showCal('CalendarioIn');" >
    anche dopo la funzione CalendarioOut

  8. #8
    codice:
    <a href="java-script:showCal('CalendarioIn');" >
    anche dopo la funzione CalendarioOut
    Rieccomi, ho apportato le modifiche che mi hai segnalato, qualcosa è cambiato adesso mi esce un alert che mi dice:
    firefox non sa come aprire questo indirizzo dato che il protocollo javascript non è associato ad alcun programma

  9. #9
    beh, è già qualcosa.
    per aiutarti ulteriormente dovrei vedere il codice delle funzioni che usi per aprire il calendario e gestirlo.
    ma poi come mai scrivi
    a href="java-script :showCal('CalendarioIn');"
    io l'ho sempre scritto unito javascript
    scusa se lo noto solo ora ma il venerdì pomeriggio siamo tutti più stanchi.

  10. #10
    Beh sinceramente anche io lo scrivo sempre unito questo è uno script che mi ha passato un mio amico e me lo ha dato così, ti ripeto di js non ci capisco molto quindi non fidarti...

    per quello che riguarda la funzione devo mandarti due post perchè mi dice che è troppo lunga, adesso la spiezzo in due hehehe.
    PS grazie mille della pazienza a dopo

    codice:
    // settaggi style
    var fontFace="verdana";
    var fontSize="12";
    
    var titleWidth=90;
    var titleMode=1;
    var dayWidth=13;
    var dayDigits=9;
    
    var titleColor="#99CCFF";
    var daysColor="#99CCFF";
    var bodyColor="#fff7E8";
    var dayColor="#ffffff";
    var currentDayColor="#99CCFF";
    var footColor="#99CCFF";
    var borderColor="#333333";
    
    var titleFontColor = "#333333";
    var daysFontColor = "#333333";
    var dayFontColor = "#333333";
    var currentDayFontColor = "#000000";
    var footFontColor = "#333333";
    
    // formato data attuale : 1040
    var calFormat = "dd/mm/yyyy";
    
    var weekDay = 0;
    // ------
    
    // codice
    var calWidth=420, calHeight=220, calOffsetX=-250, calOffsetY=16;
    var calWin=null;
    var winX=0, winY=0;
    var cal="cal";
    var cals=new Array();
    var currentCal=null;
    
    var yxMonths=new Array("Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Gugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre");
    var yxDays=new Array("Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato", "Domenica");
    var yxLinks=new Array("[chiudi]", "[cancella]");
    
    var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;
    var isOpera5=(navigator.appVersion.indexOf("MSIE 5")!=-1 && navigator.userAgent.indexOf("Opera 5")!=-1)?true:false;
    var isOpera6=(navigator.appVersion.indexOf("MSIE 5")!=-1 && navigator.userAgent.indexOf("Opera 6")!=-1)?true:false;
    var isN6=(navigator.userAgent.indexOf("Gecko")!=-1);
    var isN4=(document.layers)?true:false;
    var isMac=(navigator.userAgent.indexOf("Mac")!=-1);
    var isIE=(document.all && !isOpera && (!isMac || navigator.appVersion.indexOf("MSIE 4")==-1))?true:false;
    
    if (isN4) {
      fontSize+=2;
    }
    
    var span2="</span>";
    
    function span1(tag) {
      return "<span class='"+tag+"'>";
    }
    function spanx(tag, color) {
      return "."+tag+" { font-family:"+fontFace+"; font-size:"+fontSize+"px; color:"+color+"; }\n";
    }
    
    function a1(tag) {
      return "<a class='"+tag+"' href=";
    }
    
    function ax(tag, color) {
      return "."+tag+" { text-decoration:none; color:"+color+"; }\n";
    }
    
    function calOBJ(name, title, field, form) {
      this.name = name;
      this.title = title;
      this.field = field;
      this.formName = form;
      this.form = null
    }
    
    function setFont(font, size) {
      if (font != "") {
        fontFace=font;
      }
      if (size > 0) {
        fontSize=size;
    
        if (isN4) {
          fontSize+=2;
        }
      }
    }
    
    function setWidth(tWidth, tMode, dWidth, dDigits) {
      if (tWidth > 0) {
        titleWidth=tWidth;
      }
      if (tMode == 1 || tMode == 2) {
        titleMode=tMode;
      }
      if (dWidth > 0) {
        dayWidth=dWidth;
      }
      if (dDigits > 0) {
        dayDigits=dDigits;
      }
    }
    
    function setColor(tColor, dsColor, bColor, dColor, cdColor, fColor, bdColor) {
      if (tColor != "") {
        titleColor=tColor;
      }
      if (dsColor != "") {
        daysColor=dsColor;
      }
      if (bColor != "") {
        bodyColor=bColor;
      }
      if (dColor != "") {
        dayColor=dColor;
      }
      if (cdColor != "") {
        currentDayColor=cdColor;
      }
      if (fColor != "") {
        footColor=fColor;
      }
      if (bdColor != "") {
        borderColor=bdColor;
      }
    }
    
    function setFontColor(tColorFont, dsColorFont, dColorFont, cdColorFont, fColorFont) {
      if (tColorFont != "") {
        titleFontColor=tColorFont;
      }
      if (dsColorFont != "") {
        daysFontColor=dsColorFont;
      }
      if (dColorFont != "") {
        dayFontColor=dColorFont;
      }
      if (cdColorFont != "") {
        currentDayFontColor=cdColorFont;
      }
      if (fColorFont != "") {
        footFontColor=fColorFont;
      }
    }
    
    function setFormat(format) {
      calFormat = format;
    }
    
    function setSize(width, height, ox, oy) {
      if (width > 0) {
        calWidth=width;
      }
      if (height > 0) {
        calHeight=height;
      }
    
      calOffsetX=ox;
      calOffsetY=oy;
    }
    
    function setWeekDay(wDay) {
      if (wDay == 0 || wDay == 1) {
        weekDay = wDay;
      }
    }
    
    function setMonthNames(janName, febName, marName, aprName, mayName, junName, julName, augName, sepName, octName, novName, decName) {
      if (janName != "") {
        yxMonths[0] = janName;
      }
      if (febName != "") {
        yxMonths[1] = febName;
      }
      if (marName != "") {
        yxMonths[2] = marName;
      }
      if (aprName != "") {
        yxMonths[3] = aprName;
      }
      if (mayName != "") {
        yxMonths[4] = mayName;
      }
      if (junName != "") {
        yxMonths[5] = junName;
      }
      if (julName != "") {
        yxMonths[6] = julName;
      }
      if (augName != "") {
        yxMonths[7] = augName;
      }
      if (sepName != "") {
        yxMonths[8] = sepName;
      }
      if (octName != "") {
        yxMonths[9] = octName;
      }
      if (novName != "") {
        yxMonths[10] = novName;
      }
      if (decName != "") {
        yxMonths[11] = decName;
      }
    }
    
    function setDayNames(sunName, monName, tueName, wedName, thuName, friName, satName) {
      if (sunName != "") {
        yxDays[0] = sunName;
        yxDays[7] = sunName;
      }
      if (monName != "") {
        yxDays[1] = monName;
      }
      if (tueName != "") {
        yxDays[2] = tueName;
      }
      if (wedName != "") {
        yxDays[3] = wedName;
      }
      if (thuName != "") {
        yxDays[4] = thuName;
      }
      if (friName != "") {
        yxDays[5] = friName;
      }
      if (satName != "") {
        yxDays[6] = satName;
      }
    }
    
    function setLinkNames(closeLink, clearLink) {
      if (closeLink != "") {
        yxLinks[0] = closeLink;
      }
      if (clearLink != "") {
        yxLinks[1] = clearLink;
      }
    }
    
    function addCalendar(name, title, field, form) {
      cals[cals.length] = new calOBJ(name, title, field, form);
    }
    
    function findCalendar(name) {
      for (var i = 0; i < cals.length; i++) {
        if (cals[i].name == name) {
          if (cals[i].form == null) {
            if (cals[i].formName == "") {
              if (document.forms[0]) {
                cals[i].form = document.forms[0];
              }
            }
            else if (document.forms[cals[i].formName]) {
              cals[i].form = document.forms[cals[i].formName];
            }
          }
    
          return cals[i];
        }
      }
    
      return null;
    }
    
    function getDayName(y,m,d) {
      var wd=new Date(y,m,d);
      return yxDays[wd.getDay()].substring(0,3);
    }
    
    function getMonthFromName(m3) {
      for (var i = 0; i < yxMonths.length; i++) {
        if (yxMonths[i].toLowerCase().substring(0,3) == m3.toLowerCase()) {
          return i;
        }
      }
    
      return 0;
    }
    
    function getFormat() {
      var calF = calFormat;
    
      calF = calF.replace(/\\/g, '\\\\');
      calF = calF.replace(/\//g, '\\\/');
      calF = calF.replace(/\[/g, '\\\[');
      calF = calF.replace(/\]/g, '\\\]');
      calF = calF.replace(/\(/g, '\\\(');
      calF = calF.replace(/\)/g, '\\\)');
      calF = calF.replace(/\{/g, '\\\{');
      calF = calF.replace(/\}/g, '\\\}');
      calF = calF.replace(/\</g, '\\\<');
      calF = calF.replace(/\>/g, '\\\>');
      calF = calF.replace(/\|/g, '\\\|');
      calF = calF.replace(/\*/g, '\\\*');
      calF = calF.replace(/\?/g, '\\\?');
      calF = calF.replace(/\+/g, '\\\+');
      calF = calF.replace(/\^/g, '\\\^');
      calF = calF.replace(/\$/g, '\\\$');
    
      calF = calF.replace(/dd/i, '\\d\\d');
      calF = calF.replace(/mm/i, '\\d\\d');
      calF = calF.replace(/yyyy/i, '\\d\\d\\d\\d');
      calF = calF.replace(/day/i, '\\w\\w\\w');
      calF = calF.replace(/mon/i, '\\w\\w\\w');
    
      return new RegExp(calF);
    }
    
    function getDateNumbers(date) {
      var y, m, d;
    
      var yIdx = calFormat.search(/yyyy/i);
      var mIdx = calFormat.search(/mm/i);
      var m3Idx = calFormat.search(/mon/i);
      var dIdx = calFormat.search(/dd/i);
    
      y=date.substring(yIdx,yIdx+4)-0;
      if (mIdx != -1) {
        m=date.substring(mIdx,mIdx+2)-1;
      }
      else {
        var m = getMonthFromName(date.substring(m3Idx,m3Idx+3));
      }
      d=date.substring(dIdx,dIdx+2)-0;
    
      return new Array(y,m,d);
    }
    
    function hideCal() {
      calWin.close();
      calWin = null;
      window.status = "";
    }
    
    function getLeftIE(x,m) {
      var dx=0;
      if (x.tagName=="TD"){
        dx=x.offsetLeft;
      }
      else if (x.tagName=="TABLE") {
        dx=x.offsetLeft;
        if (m) { dx+=(x.cellPadding!=""?parseInt(x.cellPadding):2); m=false; }
      }
      return dx+(x.parentElement.tagName=="BODY"?0:getLeftIE(x.parentElement,m));
    }
    function getTopIE(x,m) {
      var dy=0;
      if (x.tagName=="TR"){
        dy=x.offsetTop;
      }
      else if (x.tagName=="TABLE") {
        dy=x.offsetTop;
        if (m) { dy+=(x.cellPadding!=""?parseInt(x.cellPadding):2); m=false; }
      }
      return dy+(x.parentElement.tagName=="BODY"?0:getTopIE(x.parentElement,m));
    }
    
    function getLeftN4(l) { return l.pageX; }
    function getTopN4(l) { return l.pageY; }
    
    function getLeftN6(l) { return l.offsetLeft; }
    function getTopN6(l) { return l.offsetTop; }
    
    function lastDay(d) {
      var yy=d.getFullYear(), mm=d.getMonth();
      for (var i=31; i>=28; i--) {
        var nd=new Date(yy,mm,i);
        if (mm == nd.getMonth()) {
          return i;
        }
      }
    }
    
    function firstDay(d) {
      var yy=d.getFullYear(), mm=d.getMonth();
      var fd=new Date(yy,mm,1);
      return fd.getDay();
    }
    
    function dayDisplay(i) {
      if (dayDigits == 0) {
        return yxDays[i];
      }
      else {
        return yxDays[i].substring(0,dayDigits);
      }
    }

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.