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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Getting javascript into the DOM popup


Reply


2 Posts   908 Views

Avatar
MarcusDalgren

Community Member, 288 Posts

1 April 2010 at 8:20am

Hi Uncle Cheese!

Is there a way to get my own javascript into the DOM popup?
I've created a data object that uses Google maps in its form and right now I'm injecting my custom javascript through the literal field. That's almost too nasty for words but I tried putting Requirements in the beginning of getCMSFields but the scripts I tried to require that way did not show up in the popup.

Is there some other better way of doing this or am I stuck with my nasty solution?

I've thought about making a field like Rossiter has done in his module but I'd really like to store latitude, longitude and the google address in separate fields and don't really know the best way of approaching making a field that really is several fields.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

1 April 2010 at 8:41am

I would just put your own DataObjectManager_popup.ss in your theme dir, and add a require tag..

<% require javascript(some/js/file.js) %>