[SOLVED] Ajax event bug

I KNOW I am not the only one with this issue.

When you create a new ajax event, even if you select a field as a parameter… the list wont appear in the screen you are coding the event and… the actual field is not passed as a par?meter.

you can use the {field} method but ONLY IF SUCH FIELD IS VISIBLE. otherwise the field is not available.

An error appear in scriptcase with a

“invalid parameter in foreach”

I would love this to be fixed.

Regards

this is the error message

Invalid argument supplied for foreach() | Script: scriptcase8/devel/class/page/nmPageEvent.class.php linha: 900

Wich list?

you can use the {field} method but ONLY IF SUCH FIELD IS VISIBLE. otherwise the field is not available.

An error appear in scriptcase with a

“invalid parameter in foreach”

I would love this to be fixed.

Regards

onAjaxClick event for field {myfield1}
echo {myfield2}; //this field is hidden

It’s working as expected. Did you cleaned your tmp folder, browser cache and so on?

Ok, I understand, I replicated your problem.

This don’t works, returning undefined

onAjaxClick event for field {myfield1}. Pass as param {fieldID}, {fieldID is hidden}
echo {fieldID}; //this field is hidden

But this works for me:

onAjaxClick event for field {myfield1}. {fieldID is hidden}
echo {fieldID}; //this field is hidden

Thank you… so bottom line when I create the ajax event I must avoiid passing the field as a parameter right?.

I’ve tried what you suggested Gui… and its not working… only if the field is on the right when you select them in the field possitioning option.

Regards

fields.png

Can your share with ne the app/project and DB privatelly?

I found what the confusion is gui… and I get now what you say:

Firstly the fields have a “Hidden” option inside their properties, wich is not the same as field possitioning which I’m using… if take the field to the right inside “field possitioning” I’m enabling the field for the generated form. if not then not even the variable is generated.

I added the field to the form and set it to hidden… until then it worked.

Regards

One more thing… this is nothing more than a WORKAROUND… but not a solution… scriptcase is bugged and a hotfix is required. I think We all can agree to that.

Regards

Hello,

This problem has been reported to our development team.


I reported this case for you, @Cavadinha.

Most appreciated.

Regards

Hello,

This problem was solved in our last release, 8.1.043.


Best regard,
Netmake team

Thank you so much for your time and effort guys.

Regards

Hi,

After update i still have problem with this error “Invalid argument supplied for foreach() nmPageAppAjaxEventNew.class.php” and for anyone who have this situation try this :

  • in grid go to “Field positioning” and press SAVE, now you go back to “New Ajax Event” and all field are there now in first drop down.

This is my solution until Scriptcase solve this.
Note : I already try with clear browser chache,delete files from tmp,reset apache…

Regards

Scriptcase 9.2 same problem :frowning: :frowning: :frowning:

Similar problem on 9.3.009.
I’m trying this on a grid.

I have a simple button to toggle a field’s status (active/inactive in my case), and update SQL as required.

It works fine only as long as the affected field is visible in the grid. If the field is hidden, the ajax Event OnClick doesn’t seem to receive the hidden field value

Regards
Mariano

1 Like

Scriptcase 9.4 - stilll not fixed :confused::confused::confused:

Still an issue… in 9.06