Forum OpenACS Development: Re: Ajax Helper load error

Collapse
4: Re: Ajax Helper load error (response to 3)
Posted by Hamilton Chua on
Hi Eduardo,

I took some time to check the changes on OpenACS head and you're absolutely right, the files I included in my www/docs are now outdated. My bad for not keeping up 😊

I included copies of those files in www/docs because at the time template::head wasn't in CVS head yet but now they are so I'll be removing them on my next update. I will update the docs too.

Please use the ones from cvs head.

I just committed a change in head-procs.tcl which solves the error about prototype being required, so please get a fresh copy of head-procs.tcl from cvs head.

Now about that javascript error.

Do you have an id for your form ?

The error indicates that it can't find the form element.

Maybe instead of $(form), try using $("formid") where formid is the id you give your form.

Your form should look like &lt form id="formid" ... &gt

If you're using ad_form I believe you can add it in the html parameter like -html {id "formid"}

Thanks for trying out ajaxhelper and do let me know if this helped.

Thanks,

Hamilton

Collapse
5: Re: Ajax Helper load error (response to 4)
Posted by Eduardo Santos on
Hi Hamilton,

Sorry about the delay. I had to perform a lot of tests before I'm sure everithing is working.

I'm using now HEAD versions of all the files (the whole master stuff and the templating procs) and it seems to be working now. However, I had to manually setup the form id using the html id. It seems to me that ad_form is not parsing the right DOM information to the form. I uses a hidden input named form:id, and firefox doesn't see that as the form id.

Maybe someone need to change the ad_form API to improve DOM integration?

Thank you very much for your help. Everything is working now.