Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts

    problems creating calendar

    Please check out what I have already completed so you can see what I am basically looking for.

    http://www.tweedscott.com/calendar5.html

    I would like the calendar months to be automatically set up so that it pulls from the computers date/time properties.

    Basically a whole new design is not out of the question for me, also, instead of clicking on the date, and the whole page changing, I would like a popup window to appear with information regarding that days activities. somehow my popup scripting was lost in its present format.

    Basically what I am looking for is a calendar in a table format that...

    when you click on a date, a popup window will appear showing what is scheduled for that day.

    the calendar is pulled from the computers date/time properties.

    Each day of the month should have it's own popup window.

    all popups should be adjustible...in other words, I want to be able to change the information in each of the popups without having to rewrite the entire script.

    The date in the scrolling marquee should be pulled from the date/time properties of the computer as well.

    Also, I cant seem to take out the ">" above the Sunday part of the February calendar.

    Can anyone help me with this Please?

    I am still very new to javascript, so any help would be greatly appreciated.


    Thanks,

    Imperial Spider

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: problems creating calendar

    Originally posted by ImperialSpider
    Also, I cant seem to take out the ">" above the Sunday part of the February calendar.

    Can anyone help me with this Please?
    imp...
    thatts 'cause of the ol' double >> ya have in thisss closing td...

    Code:
    <td align="center" width="1"></td>
    <td>mar 4</td>
    
    <td align="center" width="1"></td>>
    see it in the 'cell' just a beside® mar 4???

    n' just a thanx® goood ol' viewsource/open in notepad™/find >> ...hehehe

  • #3
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you Justame,

    I did not see that at first. But now it has been corrected.
    I am much abliged.

    Any thoughts on the rest of the calendar?




    Thanks again,

    Imperial Spider

  • #4
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts

    help!!!

    can anyone else help with the calendar portion?

    please help me find this solution.



    Imperial Spider

  • #5
    New Coder
    Join Date
    Jan 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    On your links change the <a href="Sunday.html" to <a href="#"

  • #6
    New Coder
    Join Date
    Jan 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you would like, here is a quick calendar that I wrote a while ago. I added your requirement to have a popup window with a new page in it. Put the link to the page between the quotes on the second variable, like how I have your full url as well as just the word Sunday.html. The daystart is what day of the week the month starts out on. The calendar works in both ie and netscape, however the popup only works in IE at this point.


    <script language="javascript" type="text/javascript">


    var month="January 2004";

    // S1 M2 T3 W4 T5 F6 S7
    var daystart = 5;
    var ct = 0;


    var dt=new Array();
    dt[31]=new Array("1","http://www.tweedscott.com/Sunday.html");
    dt[30]=new Array("2","Sunday.html");
    dt[29]=new Array("3","");
    dt[28]=new Array("4","");
    dt[27]=new Array("5","");
    dt[26]=new Array("6","");
    dt[25]=new Array("7","");
    dt[24]=new Array("8","");
    dt[23]=new Array("9","");
    dt[22]=new Array("10","");
    dt[21]=new Array("11","");
    dt[20]=new Array("12","");
    dt[19]=new Array("13","");
    dt[18]=new Array("14","");
    dt[17]=new Array("15","");
    dt[16]=new Array("16","");
    dt[15]=new Array("17","");
    dt[14]=new Array("18","");
    dt[13]=new Array("19","");
    dt[12]=new Array("20","");
    dt[11]=new Array("21","");
    dt[10]=new Array("22","");
    dt[9]=new Array("23","");
    dt[8]=new Array("24","");
    dt[7]=new Array("25","");
    dt[6]=new Array("26","");
    dt[5]=new Array("27","");
    dt[4]=new Array("28","");
    dt[3]=new Array("29","");
    dt[2]=new Array("30","");
    dt[1]=new Array("31","");


    // double slash in front of dates not needed


    function popup(theURL){
    window.open(theURL,"pop","height=300,width=300")
    }


    document.write('<center><table border=1 width=100% bgcolor="ffffff">');
    document.write('<tr><td colspan=7><h1 align=center>'+ month + '<\/h1><\/td><\/tr>');

    document.write('<tr align=center>');
    document.write('<td><b>Sunday<\/b><\/td>');
    document.write('<td><b>Monday<\/b><\/td>');
    document.write('<td><b>Tuesday<\/b><\/td>');
    document.write('<td><b>Wednesday<\/b><\/td>');
    document.write('<td><b>Thursday<\/b><\/td>');
    document.write('<td><b>Friday<\/b><\/td>');
    document.write('<td><b>Saturday<\/b><\/td><\/tr><tr valign=top align=right>');


    for (var i=dt.length-1;i>=0;i--)
    {
    if (ct <= 8) {
    if (ct == 0) {
    if (daystart > 1) {
    document.write('<td valign=top colspan=' + (daystart - 1) + '></td>');
    }
    ct = daystart;
    }

    document.write('<td><a href="#" value=' + dt[i][1] + ' onClick="popup(this.value)">' + dt[i][0] + '</a></td>');
    ct = ct + 1;

    if (ct == 8) {
    document.write('</tr><tr valign=top align=right>');
    ct = 1;
    }

    }
    }


    </script>
    </table>

  • #7
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Treetop,

    Thank you so much! That script is awesome!

    That was the VERY close to what I am wanting.

    Actually, the only thing that is missing, is the part where the script ties the Calendar to the date/time properties of the users computer... So when the computers clock says it is July, the calendar reads for July, and if the computer reads the month of February, the calendar displays February...or whatever month it is with the correct days aligning with the correct dates. I hope I am not confusing anyone. I dont know how else to explain it.

    Do you know how to do this?

    I am very open to learning, so please forgive me, as I am still very new to Javascripting.

    But, this is definitely a great script to use until I can get the exact code, because it is nowhere near as much work as what I was doing before.

    I sincerely thank you,

    Imperial Spider

  • #8
    Regular Coder
    Join Date
    Jan 2004
    Location
    San Antonio, TX
    Posts
    131
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question small adjustment request?

    I am still trying to try to find a way to adjust this code to pull the calendar from the users date/time properties instead of having to change the calendar each month... Can anyone help me with the code used by treetop? Again, a totally new code is not out of the question, as I am not married to any specific code for the calendar.

    Thanks,

    ImperialSpider

  • #9
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Use a server side language to do this, it'll be much easier..if you do a search on google or hotscripts i'm sure you'll find some allready made.

  • #10
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,511
    Thanks
    3
    Thanked 503 Times in 490 Posts
    I have a MemoCalender but think you will need serverside to complete the memos

    http://www.vicsjavascripts.org.uk/Me...moCalender.htm

    I can possibly modify if suggestion has common application

  • #11
    New Coder
    Join Date
    Jan 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is the way I choose a month to display using the users computer's date. In the last document.write line has the source for the individual months calendars. I created a sub directory called cal and use 1 - 12 as the file names. This script is on the actual page you want the calendar to appear.


    var kw=new Array();

    kw[12]=new Array("2005/01/01","12");
    kw[11]=new Array("2005/02/01","1");
    kw[10]=new Array("2005/03/01","2");
    kw[9]=new Array("2005/04/01","3");
    kw[8]=new Array("2005/05/01","4");
    kw[7]=new Array("2005/06/01","5");
    kw[6]=new Array("2005/07/01","6");
    kw[5]=new Array("2005/08/01","7");
    kw[4]=new Array("2005/09/01","8");
    kw[3]=new Array("2005/10/01","9");
    kw[2]=new Array("2005/11/01","10");
    kw[1]=new Array("2005/12/01","11");
    kw[0]=new Array("2006/01/01","12");

    var today = new Date();
    var ct = 0;


    for (var i=kw.length-1;i>=0;i--)
    {
    var date = new Date(kw[i][0])
    var date2 = new Date(kw[i][0])

    var year = 1900 + date.getYear()%1900 // < AD 3800
    var year2 = 1900 + date2.getYear()%1900 // < AD 3800

    if (pt < 2) {
    if (ct < 1) {
    if (today.getTime() <= date.getTime()) {
    ct = ct + 1

    document.write('<script language=JavaScript src=cal/' + kw[i][1] + '.js></script>');
    }
    }
    }


    if (pt > 1) {
    if (ct < 2) {
    if (today.getTime() <= date.getTime()) {
    ct = ct + 1

    document.write('<script language=JavaScript src=cal/' + kw[i][1] + '.js></script>');

    }
    }
    }


    }


  •  

    Posting Permissions

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