Board Logo

Open Calendar with Function
daxjkent - 6/18/2010 at 03:42 AM

Hello all,

Has anyone come up with a solution to open a Pop-Up Calendar with a function call.

I require all the Init settings to reside in the <head> section of a page and then a button to init the calendar as follows

javascript: openCalendar('formname','fieldname');

The problem I'm running into is the <script> tags are not recognized inside a Coldfusion Ajax area when it's loaded.

Thanks

Any help would be appreciated.


daxjkent - 6/18/2010 at 03:50 AM

Sorry for the Double Post, but here's a simplified version along the route I've been trying.

<head>

<script language="JavaScript">

function calendarInit(formName, fieldName) {
// initial calendar settings structure
var CAL_Init = {
'formname' : formName,
'controlname' : fieldName,
'controlonchange':true,
'watch' : true,
'dataformat' : 'd/m/Y'
};

new calendar(CAL_Init, CAL_TPL);

}
</script>

</head>

<body>
<form name="test_form">
<a href="javascript:calendarInit('test_form', 'date')">Get Date</a>
</form>

</body>


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/