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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Detect jQuery Ajax complete within CMS


Go to End


2 Posts   1915 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?