Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Detect jQuery Ajax complete within CMS


Go to End


2 Posts   1423 Views

Avatar
jaedb

Community Member, 6 Posts

9 July 2012 at 4:10pm

Edited: 09/07/2012 4:11pm

I'm trying to create a button-based approach to radio buttons within SilverStripe 3.0 and am having trouble hooking into the CMS jQuery hooks.

I have looked at the documentation on the matter (http://doc.silverstripe.org/framework/en/topics/javascript/) but am getting javascript errors on:

 Behaviour.register({ ...
.

Basically I need to detect when the current page is fully loaded (after saving, publishing, deleting, loading new page, etc) so I can use jQuery and apply the appropriate styles and classes to the label elements (see screenshot - these are radio buttons).

How do I (using jQuery) listen for the PageLoaded hooks as discussed in the documentation (http://doc.silverstripe.org/framework/en/topics/javascript/)?

Attached Files
Avatar
hallecsyz

Community Member, 5 Posts

16 August 2012 at 3:22am

I'm having the same problem, I'm trying to load a javascript function after the page is loaded.

I get a Type Error: Object #<HTMLFormElement> has no method 'observeMethod'.

Any idea how this could be fixed?