Select to view content in your preferred language

How To Change Application CSS with OnLoad?

1016
2
07-21-2012 10:36 PM
JohnWeiss
Emerging Contributor
Hi, i'd like to change the CSS of the default application after it loads. The element i'd like to change is id popup_1, the layers palette. (it's ID changes on subsequent clicks, but I'm ok with that for now).

My simple objective is to keep the built-in layers palette open at all times. I posted this question on this other thread, but started this separate thread to specifically explore "OnLoad" methods.

http://forums.arcgis.com/threads/49867-How-To-Keep-Layers-Button-Open

i attempted to do this using window.OnLoad, but it did not work.

What's the appropriate way to dynamically load css after the application loads?

Do i need to use a javascript function to register the OnLoad function?

Do i need to "chain" my function on arcgis existing OnLoad functions? Here are two methods i found to accomplish that, but want to hear from the experts before i started blinding trying stuff.

http://onwebdevelopment.blogspot.com/2008/07/chaining-functions-in-javascript.html

http://www.brothercake.com/site/resources/scripts/onload/

Of course, the simplest possible method is preferred.

help is much appreciated!
Tags (2)
0 Kudos
2 Replies
JohnWeiss
Emerging Contributor
can someone please point me in the right direction on this?

thanks!
0 Kudos
MikeMinami
Esri Notable Contributor
I'd suggest posting programming questions here:

http://forums.arcgis.com/forums/15-ArcGIS-API-for-JavaScript

Developers monitor that forum, but rarely visit this one...

Thanks,

Mike
0 Kudos