Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default calendar in ASP

    Someone posted a very nice calendar on a page sharing ASP code.

    [url]http://www.asp101.com/articles/jacob/calendar/default.asp[/url]

    In it is the following line:

    MyCalendar.OnDayClick = "javascript:alert('You clicked on this date:
    $date')"

    Any idea how I can change this click event to go to another page, with
    $date as a variable?

    Thanks; I tried contacting the author of the page, but the e-mail name
    posted is no good.

    thanks,

    Larry
    - - - - - - - - - - - - - - - - - -
    "Forget it, Jake. It's Chinatown."
    bender Guest

  2. Similar Questions and Discussions

    1. calendar
      How do you place a calendar in forms?
    2. 2006 calendar needed for photo calendar
      I want to start work on a 2006 calendar featuring my own photographs. In Photoshop there used to be a calendar-creating feature that worked well,...
    3. asp calendar
      Can some of you point me to some website with good asp calendars. I did a search on the google but didn't find a whole lot . Thanks
    4. Calendar 9.0
      There are several calendars with the code to do that on my website: http://www.datastrat.com/Download/XCalendar2K.zip and...
    5. calendar asp
      Hello Everyone, I have a calendar http://thehihat.com/calendar/default.asp?month=6&year=2003 What I need to do is be able to add a graphic to the...
  3. #2

    Default Re: calendar in ASP

    "bender" wrote:
    : Someone posted a very nice calendar on a page sharing ASP code.
    :
    : [url]http://www.asp101.com/articles/jacob/calendar/default.asp[/url]
    :
    : In it is the following line:
    :
    : MyCalendar.OnDayClick = "javascript:alert('You clicked on this date:
    : $date')"
    :
    : Any idea how I can change this click event to go to another page, with
    : $date as a variable?

    MyCalendar.OnDayClick = "/anotherpage.asp?d=$date"

    You can see it here:
    [url]http://kiddanger.com/lab/calendarexample.asp[/url]

    HTH...

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - [url]http://www.microsoft.com/technet/scriptcenter/[/url]
    WSH 5.6 Documentation - [url]http://msdn.microsoft.com/downloads/list/webdev.asp[/url]
    MSDN Library - [url]http://msdn.microsoft.com/library/default.asp[/url]


    Roland Hall Guest

  4. #3

    Default Re: calendar in ASP

    > MyCalendar.OnDayClick = "/anotherpage.asp?d=$date"

    Well, wouldn't you need something like:

    MyCalendar.OnDayClick = "window.location.href='/anotherpage.asp?d=$date';"

    ?

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]




    "Roland Hall" <nobody@nowhere> wrote in message
    news:ehrdh#S#DHA.4084@tk2msftngp13.phx.gbl...
    > "bender" wrote:
    > : Someone posted a very nice calendar on a page sharing ASP code.
    > :
    > : [url]http://www.asp101.com/articles/jacob/calendar/default.asp[/url]
    > :
    > : In it is the following line:
    > :
    > : MyCalendar.OnDayClick = "javascript:alert('You clicked on this date:
    > : $date')"
    > :
    > : Any idea how I can change this click event to go to another page, with
    > : $date as a variable?
    >
    > MyCalendar.OnDayClick = "/anotherpage.asp?d=$date"
    >
    > You can see it here:
    > [url]http://kiddanger.com/lab/calendarexample.asp[/url]
    >
    > HTH...
    >
    > --
    > Roland Hall
    > /* This information is distributed in the hope that it will be useful, but
    > without any warranty; without even the implied warranty of merchantability
    > or fitness for a particular purpose. */
    > Technet Script Center - [url]http://www.microsoft.com/technet/scriptcenter/[/url]
    > WSH 5.6 Documentation -
    [url]http://msdn.microsoft.com/downloads/list/webdev.asp[/url]
    > MSDN Library - [url]http://msdn.microsoft.com/library/default.asp[/url]
    >
    >

    Aaron Bertrand [MVP] Guest

  5. #4

    Default Re: calendar in ASP

    On Sat, 21 Feb 2004 23:14:25 -0800, bender <larry@netgeexdotcom>
    wrote:
    >Someone posted a very nice calendar on a page sharing ASP code.
    >
    >[url]http://www.asp101.com/articles/jacob/calendar/default.asp[/url]
    >
    > In it is the following line:
    >
    >MyCalendar.OnDayClick = "javascript:alert('You clicked on this date:
    >$date')"
    >
    >Any idea how I can change this click event to go to another page, with
    >$date as a variable?
    Something like:

    MyCalendar.OnDayClick =
    "window.open('http://www.sample.com/anotherpage.asp?=MyDate$date',Another
    Page)"

    See the syntax:

    [url]http://www.devguru.com/Technologies/ecmascript/quickref/win_open.html[/url]

    Follow up in a Javascript group for other options. Naturally, the
    anotherpage.asp will need to deal with accepting the value for MyDate
    that you passed.

    Jeff
    Jeff Cochran Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139