1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team-Mitglieder
    4. Trophäen
    5. Mitgliedersuche
  4. Tutorial Bereich
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Seiten
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. Informatik Forum
  2. Software und Anwendungen
  3. Tools und Produktivität

mit Dreamweaver

  • Shade
  • 9. November 2002 um 19:31
  • Shade
    9
    Shade
    Mitglied
    Reaktionen
    1
    Punkte
    801
    Beiträge
    127
    • 9. November 2002 um 19:31
    • #1

    nachdem ich mir jetzt dreamweaverMX gekauft hab,hät ich ein paar fragen:
    -irgendwie klappt bei mir das connecten zum studentenserver ned.ich hab mir auch extra dieses programm für ssh geladen,log mich ein aber wenn ich dann bei dreamweaver auf "connect to remote host" klicke krieg ich nur ne fehlermeldung...
    -javascript:ich wollt nen counter in die page einbauen,hab auch nen code gefunden,den teil für den cookie in <head>
    kopiert und den teil der die besucheranzahl zeigt in <body> aber irgendwie passiert da nix...wieso?

    ALL GLORY TO THE HYPNO TOAD...

  • Wings-of-Glory
    28
    Wings-of-Glory
    Mitglied
    Reaktionen
    105
    Punkte
    8.305
    Beiträge
    1.573
    • 9. November 2002 um 23:47
    • #2

    puuh.. viele fragen auf einmal :winking_face:

    @connect: gibt's für dreamweaver ein plugin für ssh? weil der dreamweaver unterstützt meines wissens ssh nicht.

    @counter: schwer eine ferndiagnose zu machen. vielleicht postest du den code deiner html seite, dann tut mensch sich leichter... :winking_face:

    Otto: Apes don't read philosophy. - Wanda: Yes they do, Otto, they just don't understand
    Beleidigungen sind Argumente jener, die über keine Argumente verfügen.
    «Signanz braucht keine Worte.» | «Signanz gibts nur im Traum.» 

    Das neue MTB-Projekt (PO, Wiki, Mitschriften, Ausarbeitungen, Folien, ...) ist online
    http://mtb-projekt.at

  • Shade
    9
    Shade
    Mitglied
    Reaktionen
    1
    Punkte
    801
    Beiträge
    127
    • 10. November 2002 um 00:01
    • #3

    wie gesagt,ich hab ja dieses ssh progie geladen,was dreamweaver verlangt hat...
    zum code:
    kann man mit javascript überhaupt einen counter für die gesamte anzahl der besucher machen?
    der code sieht so aus(ist aber nur we oft man schon auf der seite war)
    cookie:

    PHP
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    
    
    // name - name of the cookie
    // value - value of the cookie
    // [expires] - expiration date of the cookie (defaults to end of current session)
    // [path] - path for which the cookie is valid (defaults to path of calling document)
    // [domain] - domain for which the cookie is valid (defaults to domain of calling document)
    // [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
    // * an argument defaults when it is assigned null as a placeholder
    // * a null placeholder is not required for trailing omitted arguments
    function setCookie(name, value, expires, path, domain, secure) {
      var curCookie = name + "=" + escape(value) +
          ((expires) ? "; expires=" + expires.toGMTString() : "") +
          ((path) ? "; path=" + path : "") +
          ((domain) ? "; domain=" + domain : "") +
          ((secure) ? "; secure" : "");
      document.cookie = curCookie;
    }
    
    
    // name - name of the desired cookie
    // * return string containing value of specified cookie or null if cookie does not exist
    function getCookie(name) {
      var dc = document.cookie;
      var prefix = name + "=";
      var begin = dc.indexOf("; " + prefix);
      if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
      } else
        begin += 2;
      var end = document.cookie.indexOf(";", begin);
      if (end == -1)
        end = dc.length;
      return unescape(dc.substring(begin + prefix.length, end));
    }
    
    
    // name - name of the cookie
    // [path] - path of the cookie (must be same as path used to create cookie)
    // [domain] - domain of the cookie (must be same as domain used to create cookie)
    // * path and domain default if assigned null or omitted if no explicit argument proceeds
    function deleteCookie(name, path, domain) {
      if (getCookie(name)) {
        document.cookie = name + "=" +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        "; expires=Thu, 01-Jan-70 00:00:01 GMT";
      }
    }
    
    
    // date - any instance of the Date object
    // * hand all instances of the Date object to this function for "repairs"
    function fixDate(date) {
      var base = new Date(0);
      var skew = base.getTime();
      if (skew > 0)
        date.setTime(date.getTime() - skew);
    }
    
    
    // -->
    </SCRIPT>
    Alles anzeigen


    anzeigen:

    PHP
    <SCRIPT LANGUAGE="JavaScript">
    
    
    <!--
    // create an instance of the Date object
    var now = new Date();
    // fix the bug in Navigator 2.0, Macintosh
    fixDate(now);
    // cookie expires in one year (actually, 365 days)
    // 365 days in a year
    // 24 hours in a day
    // 60 minutes in an hour
    // 60 seconds in a minute
    // 1000 milliseconds in a second
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
    var visits = getCookie("counter");
    // if the cookie was not found, this is your first visit
    if (!visits) {
      visits = 1; // the value for the new cookie
      document.write("By the way, this is your first time here.");
    } else {
      // increment the counter
      visits = parseInt(visits) + 1;
      document.write("By the way, you have been here " + visits + " times.");
    }
    // set the new cookie
    setCookie("counter", visits, now);
    // -->
    
    
    </SCRIPT>
    Alles anzeigen

    ALL GLORY TO THE HYPNO TOAD...

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!

Benutzerkonto erstellen Anmelden

Rechtliches

Impressum

Datenschutzerklärung