[ This topic is solved ]
elguapo
19 February 10 / 12:24
I'm getting a 'CalendarPopup is not defined' since I updated to version 1.2.10 (downloaded today).
I've found out that the file calendar_popup.js is not referenced (it is not in the html-code). Checked in class.jsDateField.php, there it is added using $oForm->_setJS, but when checking in function GetJavascriptCode() in class.FormHandler.php it was not there.
How do I fix that?
Johan Wiegel (Admin)
19 February 10 / 13:14
try a new download,
changed something, it's working in my script
elguapo
19 February 10 / 14:26
thnx for your fast reply. Unfortunately it didn't help. Any clues where to look?
Johan Wiegel (Admin)
19 February 10 / 15:30
please post some code to test with.
As I said before it's works in my test environment
elguapo
19 February 10 / 16:36
In this example the second jsDatField does not work.
<?php
error_reporting ( E_ALL );
require( 'inc/database.config.php' );
require( 'FH3/class.dbFormHandler.php' );
$klant =& new dbFormHandler ( "klant" );
$klant -> setConnectionResource ( $connection , "klant" , "mysql" );
$klant -> jsDateField ( "Geboortedatum" , "geboortedatum" );
$content = $klant -> flush ( true );
$form =& new dbFormHandler ( "intake" );
$form -> setConnectionResource ( $connection , "intake" , "mysql" );
$form -> jsDateField ( "Datum intakegesprek" , "datum_intake" );
$content .= $form -> flush ( true );
echo $content ;
?>
Gives another error (objY is undefined) then I get in my other code though, I'll digg into it and will let you know.
Johan Wiegel (Admin)
19 February 10 / 18:26
so the jsdatefield is working.
It's even working if you put to or more of them in 1 form.
It's juist not working when you put more forms with a jsdate field on 1 page.
I see the problem, just haven't a solution yet.
Johan Wiegel (Admin)
19 February 10 / 19:27
Found a solution.
Updated the js function and added an extra argument to jsDateField wheter to include jsscript or not.
Default is true.
In every next form on the same page set this argument to false to avoid including js file and function
elguapo
23 February 10 / 14:13
Thnx for the solution. I also noticed that the js-file is included when the form is in viewMode, which is not necessary ;-)
I'll try to see if my first problem is solved tomorrow. Will keep you posted.