kpa
Posts: 31
|
| Posted: 10/23/2010, 5:33 PM |
|
Would be most grateful for some advice from someone with a little more PHP knowledge than me. Some time ago I put together a small site for a charitable organisation (pro bono job for me). I did this site in PHP which is not my bailiwick (I prefer CF but the organisation had budget and hosting constraints) so I'm bit stumped on this one.
Of late there has been an issue loading FCKEditor in the backend. The editor does not load (just see the text area and the browser (IE8) shows a JS error in the bottom left). The unhelpful error is:
Object expected
Code 0
In each of the three locations where FCK is used the location of the error given by the browser appears to correspond to the first if statement in this function in CCS generated code (see code below). I've tried commenting out lines to see the effect of maybe removing error conditions but all that does is move the location of the error down one line. Be most grateful if someone with a liitle more expertise with PHP could give me a pointer please. TIA!!
//bind_events @1-BE7F4CE8
function bind_events() {
if (functionExists("header_bind_events")) header_bind_events();
if (functionExists("footer_bind_events")) footer_bind_events();
addEventHandler("ascf_eventsEventDetails", "load", ascf_eventsEventDetails_OnLoad);
addEventHandler("ascf_eventsButton_Cancel", "click", ascf_eventsButton_Cancel_OnClick);
addEventHandler("ascf_eventrelateddocumentCancel", "click", ascf_eventrelateddocumentCancel_OnClick);
}
//End bind_events
window.onload = bind_events; //Assign bind_events @1-19F7B64
_________________
++++++
kpa
++++++ |
 |
 |
datadoit
|
| Posted: 10/24/2010, 6:08 AM |
|
If the code is in 'gray', then you'll not want to mess around with it.
I would recommend trying this:
1. Make a backup of your page (yourpage.php, yourpage.html,
yourpage_events.php, yourpage.js if it exists).
2. Remove the includes from your page.
3. Remove all other client-side events from the page (the button OnClick
events). You should now be left with no javascript code in your page.
4. One at a time, put back in the client-side events, starting with the
buttons. Testing after each one, and saving if all is well as you proceed.
5. If after placing in all of the client-side events you don't get any
errors (including after placing your FCKeditor event), then drop back in
the include references.
6. If you get errors after dropping in any particular include, then
you'll then know the error is in the include, and not on your page.
Sometimes what happens is that on includable pages, the javascript isn't
quite right or doesn't exit or return gracefully. When that happens,
any other javascript that proceeds it will not invoke. In CCS, this
could happen more than desired when the includable page has a javascript
menu in it. Will have you pulling your hair out. I always like to just
stick with CSS styled menus instead.
|
|
|
 |
|