[JavaScript] bei klick var x in ein textfeld setzen

Dieses Thema im Forum "Webentwicklung" wurde erstellt von razgoolyy, 11. Oktober 2007 .

Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 11. Oktober 2007
    bei klick var x in ein textfeld setzen

    Halloo,

    Also ich habe mir so einen Kalender geholt für meine Webseite..:
    http://www.zapatec.com/website/main/coding.jsp

    Jetz will ich das wenn ich ein Datum anwähle, das es mir dies in ein Textfiel setzt...
    Hier ist der code:

    HTML:
    <!-- The following empty element is the container for the calendar.
    It has the ID that you defined at step 1 (“Type”).
    When “Calendar.setup” is called below, the calendar will be generated
    in this element. Feel free to position it the way you want
    using CSS. You will normally want this to be a floating element
    which is why we generated one having the style “float: right”. -->
    
    <div style="float: right; margin: 0 0 1em 1em" id="calendar"></div>
    
    <!-- The following JavaScript code defines a function that will
    get called each time the user modifies the date inside the calendar.
    To make sure that a date was actually clicked, we check the
    cal.dateClicked variable. If a date wasn't clicked this will be
    “false” and it usually means that the date was modified using the
    month or year navigation buttons, or that only the time got modified. -->
    
     <script type="text/javascript">//<![CDATA[
     function flatCalendarCallback(cal) {
     if (cal.dateClicked) {
     var url = "http://www.mydomain.com/" + cal.date.print("%Y/%m/%d/");
     alert("Jumping to: “" + url + "” (not really).");
     // uncomment the following line to actually jump:
     // window.location = url;
     }
     };
     //]]></script>
    <noscript>
    <br/>
    This page uses a <a href="http://www.zapatec.com/website/main/products/prod1/"> Javascript Calendar </a>, but
    your browser does not support Javascript. 
    <br/>
    Either enable Javascript in your Browser or upgrade to a newer version.
    </noscript>
    
     <script type="text/javascript">//<![CDATA[
     Zapatec.Calendar.setup({
     firstDay : 1,
     range : [2000.01, 2999.12],
     flat : "calendar",
     flatCallback : flatCalendarCallback
     });
     //]]></script>
    <noscript>
    <br/>
    This page uses a <a href="http://www.zapatec.com/website/main/products/prod1/"> Javascript Calendar </a>, but
    your browser does not support Javascript. 
    <br/>
    Either enable Javascript in your Browser or upgrade to a newer version.
    </noscript>
    Wie kann ich nun machen das var url in das textfeld gesetzt wird?

    Kann mir da jemdan helfen?

    mfg
     
  2. 11. Oktober 2007
    AW: bei klick var x in ein textfeld setzen

    hat sich erledigt..

    ~ closed ~
     
  3. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.