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

Manipulating Properties not working in cjax-5.9-RC4 #35

Closed oniwo closed 8 years ago

oniwo commented 8 years ago

Property manipulation not working for me. $ajax->optionList = array('selectedIndex'=>-1); does not deselect the list. The first item in the list remains selected.

HallofFamer commented 8 years ago

Does this not work for you on CJAX 5.9 RC4 specifically, or it doesnt work on other versions either? To my understanding, CJAX's property manipulation API cannot modify certain properties, such as 'class'.

ajaxboy commented 8 years ago

Thanks for reporting,

this seems like an option that should work.

Will add support to any of these options that don't work. Please let me know if you find anymore.

ajaxboy commented 8 years ago

Just tried it, and it seemed to work:

I used this example to test on: http://cjax.sourceforge.net/examples/propagate_dropdown.php

On controller, method: propagate(), at the bottom after: $ajax->select('dropdown2',$data); File: examples/controllers/dropdown.php

Added: ...... after: $ajax->select('dropdown2',$data);

    $ajax->dropdown2 =  array('selectedIndex'=> 3);

    $ajax->wait(3);

    $ajax->dropdown2 =  array('selectedIndex'=> 1);

    $ajax->wait(3);

    $ajax->dropdown2 =  array('selectedIndex'=> -1);

The test passed, and it worked.

Please let me know the conditions you tested on, as this seems to be working.

ajaxboy commented 8 years ago

RC 5 is already out: https://github.com/ajaxboy/cjax/releases/tag/5.9RC5 Let me know if you find any issues.

ajaxboy commented 8 years ago

@oniwo Are you able to replicate this issue still ?

oniwo commented 8 years ago

No, the issue is gone. Thanks.