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

Add JavaScript to "Edit Use"r Popup


Go to End


2 Posts   1555 Views

Avatar
DeklinKelly

Community Member, 197 Posts

18 August 2010 at 2:07pm

I want to add JavaScript to the popup box for editing users. This does NOT add JavaScript to the popup:

LeftAndMain::require_javascript('mysite/javascript/adminPopup.js');

Avatar
Bambii7

Community Member, 254 Posts

18 August 2010 at 3:07pm

Whats with your use of capitalizing NOT? It will work but chances are you're NOT coding it correctly aye. Like in your post here http://www.silverstripe.org/customising-the-cms/show/290571
I'm sure it WILL work
I haven't done it before but checking out UncleChesse's code in DataObjectManager he's making a custom popup form
class DataObjectManager_Popup extends Form {
and in the constructor function
__construct
Requirements::javascript('dataobject_manager/javascript/dataobjectmanager_popup.js');

You might want to look at the way DataObjectManager module is pieced together.