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: Calendar Pro error
pdd_2003_1
Newbie

Posts: 1
Registered: 8/9/2007
Member Is Offline
posted on 8/9/2007 at 08:25 AM Reply With Quote
Calendar Pro error


I copied the files in the tigra_calendar_propopup_mode folder to the server and created a simple page using the example from the documentation as shown below.

==============

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<img src="img/cal.gif" name="an_img" onclick="A_CALENDARS[0].showcal()">

<form name="a_form">

<input type="Text" name="control1" id="control1">

<script language="JavaScript">
var CAL_INIT = {

'controlname': 'control1',
'picttype': 'img',
'pictname': 'an_img',
'formname': 'a_form',

}
new calendar(CAL_INIT, CAL_TPL1);
</script>

</form>
============================

The page opens but with errors. I cannot work out what is missing. Anyone able to help?
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 8/9/2007 at 03:25 PM Reply With Quote

The sample you used is for modal mode, not pop-up mode calendar.
If you want to use pop-up version with the existing input box then use method .popup() instead of .showcal()

here is the sample code that uses pop-up calendar with pre-existing input box as you wanted:
Code:

<html>
<head>
<title>JavaScript Calendar</title>
<script language="JavaScript" src="cal_tpl.js"></script>
<script language="JavaScript" src="cal_strings.js"></script>
<script language="JavaScript" src="calendar.js"></script>
<link rel="stylesheet" href="calendar.css">
<script language="JavaScript">

// initial calendar settings structure
var CAL_INIT1 = {
'formname' : 'test_form',
'controlname' : 'controlname',
'controlonchange':true,
'watch' : true,
'dataformat' : 'm/d/Y'
};
</script>
</head>

<body>
<form name="test_form">
<input name="controlname" value="08/06/2002">
<script language="JavaScript">
new calendar(CAL_INIT1, CAL_TPL);
</script>
</form>
</body>
</html>
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Popup Calendar
Onpage Calendar
Modal Calendar
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


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