ajaxboy / cjax

Lightweight Ajax Framework built in PHP with no foot-print. Allows you to build ajax functionality with a single line of code & do so much more, right from the back-end!
http://cjax.sourceforge.net/
66 stars 27 forks source link

Installing cjax-5.9-RC5 #36

Closed oniwo closed 7 years ago

oniwo commented 8 years ago

The web server spewed successpage.pdf on the screen on the success page.

I am yet to test it further. Will report.

ajaxboy commented 8 years ago

Hi oniwo,

I am putting RC5b up soon.
In the mean time, to fix the problem edit: cjax/core/core/core.class.php line 1215, add keyword 'static' after public , and before function.

oniwo commented 8 years ago

I am already testing but meanwhile, I always include a file with the content

<?php ini_set('display_errors', 1);

error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR);

to suppress PHP error messages. Without it, the top of every page is splashed with the following annoying lines 3rdpartyerrors.pdf When should we hope to find the inclusion unnecessary?

ajaxboy commented 8 years ago

5.9 Stable should be compliant with these errors.

ajaxboy commented 8 years ago

@oniwo please download RC7 https://github.com/ajaxboy/cjax/releases

This new RC, appears to be one of the lasts RC's if not the last, it addresses the error notices you mentioned above. Please download, and let me know your feedback ASAP. Thank You!

oniwo commented 8 years ago

I am already testing.

I have noticed that:

    $ajax->click('#element_id' , $ajax->call('controller/method'))

does not work, I have to remove the '#' to be as below:

    $ajax->click('element_id' , $ajax->call('controller/method'));

With code that has been working with CJAX5.8, I got the following error:

"Function append generated an error: ReferenceError: data is not defined"

This was in response to calling append so as to add an element as the next sibling of another element I had added using insert.

    $ajax->insert('#marks_matrix', "<tr id='question_label' ></tr>", true);
    $ajax->insert('#marks_matrix', "<tr id='max_mark_value' ></tr>", true);
    $ajax->insert('#marks_matrix', "<tr id='actual_mark_value' ></tr>", true);
    $ajax->insert('#question_label', "<td class='labels' ></td>", true);        
    $ajax->insert('#max_mark_value', "<td class='labels' >Maximum Mark</td>", true);
    $ajax->insert('#actual_mark_value', "<td class='labels' >Actual Mark</td>", true);
    .
    .
    .
    $ajax->append('#question_label', "<tr id='compulsory' ></tr>", true);

In this last line I want to add the row 'compulsory' between the 'question_label' row and 'max_mark_value' row depending on some condition in between. 'marks_matrix' is the id of a table element.

I am still testing, but you can respond to these meanwhile.

ajaxboy commented 8 years ago

Hi oniwo,

  1. I have applied a fix for this. Should be available on the next release.
  2. I see. I am looking into the matter.
ajaxboy commented 8 years ago

I have released RC8 which contain the fix for the selector malfunction. I am still working on getting the insert(), append(), (internal custom functions) to work correctly, I could have this working right away, however I am improving that section with some refactoring to make this section better, it should take a few days before this refactoring is finished and I release the update.

oniwo commented 8 years ago

Thanks so much. Keep on.

There may be an issue with overlay, but am not sure what it is. I am still testing.

oniwo commented 8 years ago

At RC8, the selector is now working, but overlay not working. I end up with the screen screenshot from 2016-09-27 12-13-14. What is the progress on insert(), append(), (internal custom functions)?

ajaxboy commented 8 years ago

I will be getting back to this some times maybe this coming week, I have had a load of work and been moving so haven't had a chance to catch up on these changes.

oniwo commented 8 years ago

Hi @ajaxboy, hope you have not forgotten about the overlay issues.

oniwo commented 8 years ago

While still waiting, here is an error I encountered

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; ajax has a deprecated constructor

Filename: cjax/ajax.php

Line Number: 40

Backtrace:

File: /var/www/html/examsystem/ajax.php Line: 39 Function: _error_handler

File: /var/www/html/examsystem/ajax.php Line: 39 Function: require_once

oniwo commented 7 years ago

hi @ajaxboy, I hope you have not abandoned this project. It is a while since you were active.

Because the issue of overlay is not solved yet, I could do with opening a page in a new tab. How do I do this?

ajaxboy commented 7 years ago

It's not. Sorry this just hasn't been a top priority in 2016, will try to get a fix soon. Thanks for the reminder, one can lose track if not reminded.