Tuesday, September 16, 2008

Re: Ajax ObserField "Form is not defined"

anyone, anyone... does observeField actually work in 1.1? I have it
working in 1.2 ok, but this project uses 1.1

On Aug 5, 4:37 pm, AussieFreelancer <patr...@aussiefreelancer.com.au>
wrote:
> Hi all, I am trying to get a chained select working using the code
> found here: (5th post)
>
> http://groups.google.com/group/cake-php/browse_thread/thread/b9eb6c15...
>
> However when I run it, it doesn't work, and the error console tells me
> that "Form is not defined". From looking at the source code, I can see
> that the observeField has added the following code:
>
> <script type="text/javascript">new
> Form.Element.Observer('JobsCompanyId', 1, function(element, value)
> {new Ajax.Updater('jobs_select_sites','/sites/ajax_sites/',
> {asynchronous:true, evalScripts:true,
> parameters:Form.Element.serialize('JobsCompanyId'), requestHeaders:['X-
> Update', 'jobs_select_sites']})})</script>
>
> So I can see where the Form bit comes from, but am unsure as to why it
> is undefined. I have added the prototype and scriptaculous libs to /
> app/webroot/js and included them in the page head.
>
> I am using 1.1 for this project, and would love to have this working,
> as this is just the start of the chained select development (I have 3
> multiple select boxes)
>
> Any help someone can offer would be hugely appreciated.
>
> Thanks
>
> Patrick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: