Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 30. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  jscalendar

phpMyEdit Configuration     jscalendar
Odoslať novú tému   Odpovedať na tému    
 
Darius     Založený: 17.10.2008   Príspevky: 4  
Príspevok Zaslal: 2008-10-17 01:03
Návrat hore  Odpovedať s citátom     

Hi,
I am having real trouble getting the calendar to work. I have followed the instructions in the file phpMyEdit-mce-cal.class.php but it won't work.

In the form the button shows up, but when I press it, it takes me back to the main page.

Code is as follows:

<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="/jscripts/tinymce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "specific_textareas",
auto_reset_designmode : true,
width: "800",
height: "200"
});
</script>
<!-- /tinyMCE -->

<!-- calendar stylesheet -->
<link rel="stylesheet" type="text/css" media="all" href="/jscripts/calendar-win2k-cold-1.css" title="win2k-cold-1" />

<script type="text/javascript" src="/jscripts/calendar.js"></script>
<script type="text/javascript" src="/jscripts/lang/calendar-en.js"></script>
<script type="text/javascript" src="/jscripts/calendar-setup.js"></script>


phpMyEdit stuff: --->

$opts['fdd']['Purchase_Date '] = array(
'name' => 'Purchase Date',
'select' => 'T',
'options' => 'ACPVD',
'required' => true,
'calendar' => true
);



require_once 'extensions/phpMyEdit-mce-cal.class.php';
new phpMyEdit_mce_cal($opts);




At End -->

<script type="text/javascript">
Calendar.setup(
{
inputField : "PME_data_Data_Atual",
ifFormat : "%d-%m-%Y",
button : "PME_data_Data_Atual"
}
);
</script>



Please help

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2008-10-17 13:05
Návrat hore  Odpovedať s citátom     

That typically means that there's an error somewhere in the Javascript code. I assume that the webserver can find the jscalendar code?

Looking briefly through your post, I can't see anything wrong, however the best way of checking to see that jscalendar is installed properly would be to create a very basic HTML page with one field with a jscalendar button on it to check to see whether it's a jscalendar problem or a PME problem.

I've been working on a jscalendar problem for someone else on the forum over the last week, and I am confident that there is not a code problem if you use the latest version of PME and the mce_cal extension from the CVS.

One problem I did find is that some of the jscalendar language files are incomplete (Polish in this case) and that was causing an error like you describe, however the English file is fine.

Does the Firefox error console give you any specific errors?

If none of this works, let me have the URL and I'll see what I can find.

BTW - does the TinyMCE work on any of the fields?

 
Darius     Založený: 17.10.2008   Príspevky: 4  
Príspevok Zaslal: 2008-10-19 22:54
Návrat hore  Odpovedať s citátom     

Thanks for the reply,
It seems that jscalendar does work outside of PME. I just click on one of the test pages in jscalendar and everything works fine.

I have deleted a lot of language from the jscalendar lang folder but the problem still remains.

What do you mean does the TinyMCE work on any of the fields?


Naposledy upravil Darius dňa 2008-10-21 22:48, celkom upravené 1 krát

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2008-10-21 07:48
Návrat hore  Odpovedať s citátom     

TinyMCE is the HTML editor for textareas.

It looks to me as if PME can't find the Calendar scripts. Check the paths in your header. I'm also not sure what the script right at the end is about, PME_data_atual...have you added that manually? As there is no field called that, it will crash. You don't need to add any Calender.setup manually, the extension will create them all.

 
Darius     Založený: 17.10.2008   Príspevky: 4  
Príspevok Zaslal: 2008-10-21 22:51
Návrat hore  Odpovedať s citátom     

Thanks for your help. I have it working now. What I did was: Delete that last bit, I got it off one of the forums. And put the Calendar scripts into the main directory and lang one into lang. Now it works. For some reason it didn't like being called from the other directory.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov