Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Dynamically Add Calendars
Jeremy
Newbie

Posts: 1
Registered: 5/23/2005
Member Is Offline
posted on 5/23/2005 at 04:13 PM Reply With Quote
Dynamically Add Calendars


Hi,

I would like to dynamically add a text field and a calendar. I thought this would be possible using an array cal[x] rather than calx as normal.

So I have:

var cal = new Array(100);
.
.

and in my code to dynamically add fields, "z" is an table cell for instance:

z.innerHTML = "<input type='text' name='training_Date" + x + "'> <a href='javascript:cal[" + x + "].popup();'><img src='images/cal.gif' align='absmiddle' width='16' height='16' border='0' alt='Click Here to Pick up the date'></a>"
.
.
.
var cal[x] = new calendar1(document.forms['Training'].elements["training_Date" + x]);

cal[x].year_scroll = true;
cal[x].time_comp = false

"x" increasing each time I add a field.

Is this the right approach? Don't seem to work so far! I am finding the "cal[x].popup()" gives an error!

Any thoughts ideas?

Many thanks

Jeremy
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004