List Info

Thread: Calendar Array




Calendar Array
country flaguser name
United States
2007-03-02 13:52:15
Hi to everyone,

I would like to make and array with the calendar, but I'm
having 
some problems I attach my code

<SCRIPT language="javascript">
  var cal1 = new Array(15);
  var cal2 = new Array(15);
  var cal3 = new Array(15);
  for(i=1;i<=15;i++){
    cal1[i]=new ctlSpiffyCalendarBox("cal1
["+i+"]", "frmRefacciones",
"fecha_x"+i,"btnDate1"+i,"",sT
rainingNMODE_CAL
BTN);
    cal2[i]=new ctlSpiffyCalendarBox("cal2
["+i+"]", "frmRefacciones",
"fecha_p"+i,"btnDate2"+i,"",sT
rainingNMODE_CAL
BTN);
    cal3[i]=new ctlSpiffyCalendarBox("cal3
["+i+"]", "frmRefacciones",
"fecha_e"+i,"btnDate3"+i,"",sT
rainingNMODE_CAL
BTN);
    cal1[i].readonly=true;
    cal1[i].dateFormat="dd/MM/yyyy";
    cal2[i].readonly=true;
    cal2[i].dateFormat="dd/MM/yyyy";
    cal3[i].readonly=true;
    cal3[i].dateFormat="dd/MM/yyyy";
  }
</SCRIPT>

later on the code I call them like this

<SCRIPT
language="javascript">cal1[<%=i%>].writeC
ontrol();</SCRIPT>
<SCRIPT
language="javascript">cal2[<%=i%>].writeC
ontrol();</SCRIPT>
<SCRIPT
language="javascript">cal3[<%=i%>].writeC
ontrol();</SCRIPT>

any idea, thanks



------------------------ Yahoo! Groups Sponsor
--------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/hOt0.A/lOaOAA/yQLSAA/saFolB/TM

------------------------------------------------------------
--------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://gro
ups.yahoo.com/group/spiffyDHTML/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http:/
/groups.yahoo.com/group/spiffyDHTML/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:spiffyDHTML-digest@yahoogroups.com 
    mailto:spiffyDHTML-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    spiffyDHTML-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

Re: Calendar Array
country flaguser name
United States
2007-03-03 18:28:21
on first glance, I don't see anything wrong with this
code... it 
should work.  There is no problem with many on a page as
this 
example shows:

http://www.geocities.com/bazillyo/spiffy/calendar/tou
r2.htm

I have had people who put +50 on a page experience browser 
performance issues but it is possible to have multiple ones
on the 
page.  (they share the same div though - so only one can be
popped 
up at a time)...

I suggest making a stripped down page away from all your
other 
script code and getting that to work first, then viewing the
source 
code of the page and comparing it with the loop counters and
other 
html/js your server code is generating.

hope this helps 
baz

--- In spiffyDHTML@yahoogroups.com, "Jorge Fernando
Gonzalez 
Martinez" <comp_mas...> wrote:
>
> Hi to everyone,
> 
> I would like to make and array with the calendar, but
I'm having 
> some problems I attach my code
> 
> <SCRIPT language="javascript">
>   var cal1 = new Array(15);
>   var cal2 = new Array(15);
>   var cal3 = new Array(15);
>   for(i=1;i<=15;i++){
>     cal1[i]=new ctlSpiffyCalendarBox("cal1
> 
["+i+"]", "frmRefacciones",
"fecha_x"+i,"btnDate1"+i,"",sT
rainingNMODE_CAL
> BTN);
>     cal2[i]=new ctlSpiffyCalendarBox("cal2
> 
["+i+"]", "frmRefacciones",
"fecha_p"+i,"btnDate2"+i,"",sT
rainingNMODE_CAL
> BTN);
>     cal3[i]=new ctlSpiffyCalendarBox("cal3
> 
["+i+"]", "frmRefacciones",
"fecha_e"+i,"btnDate3"+i,"",sT
rainingNMODE_CAL
> BTN);
>     cal1[i].readonly=true;
>     cal1[i].dateFormat="dd/MM/yyyy";
>     cal2[i].readonly=true;
>     cal2[i].dateFormat="dd/MM/yyyy";
>     cal3[i].readonly=true;
>     cal3[i].dateFormat="dd/MM/yyyy";
>   }
> </SCRIPT>
> 
> later on the code I call them like this
> 
> <SCRIPT
language="javascript">cal1[<%=i%>].writeC
ontrol();</SCRIPT>
> <SCRIPT
language="javascript">cal2[<%=i%>].writeC
ontrol();</SCRIPT>
> <SCRIPT
language="javascript">cal3[<%=i%>].writeC
ontrol();</SCRIPT>
> 
> any idea, thanks
>




------------------------ Yahoo! Groups Sponsor
--------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/hOt0.A/lOaOAA/yQLSAA/saFolB/TM

------------------------------------------------------------
--------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://gro
ups.yahoo.com/group/spiffyDHTML/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http:/
/groups.yahoo.com/group/spiffyDHTML/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:spiffyDHTML-digest@yahoogroups.com 
    mailto:spiffyDHTML-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    spiffyDHTML-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )