Select to view content in your preferred language

ISSUE WITH TEXT SHOWING BEFORE THE MAP IS LOADED

753
1
Jump to solution
07-23-2013 10:28 AM
JuneAcosta
Frequent Contributor
Hi all,

The text that belongs to the ContentPane shows/loads on the screen before the map viewer does. Is there a way to hide the text before the app fully loads?  Here's the link:

http://gismaps.carlsbadca.gov/carlsbadclip/index.html

I spoke with someone from the Javascript island at the conference and he suggested I change the order in which I load the stylesheet in the app- I tried it, but its still an issue.

Has anyone run into this same issue? Do you have a solution?

Thanks!
0 Kudos
1 Solution

Accepted Solutions
SteveCole
Honored Contributor
My advice would be this:


  1. Put the offending text inside a div with a unique ID

  2. In your CSS add the "display:none" CSS property for that item

  3. At the end of your init routine, add some javascript code to reverse the CSS visibility:

theDiv = document.getElementById("<your Div ID here>"); theDiv.setAttribute("display","inline");


If you need to support an older version of IE, which code you use to set the CSS property might change. Note: Dojo also has a way to set the CSS properties of a DOM element.

Steve

View solution in original post

0 Kudos
1 Reply
SteveCole
Honored Contributor
My advice would be this:


  1. Put the offending text inside a div with a unique ID

  2. In your CSS add the "display:none" CSS property for that item

  3. At the end of your init routine, add some javascript code to reverse the CSS visibility:

theDiv = document.getElementById("<your Div ID here>"); theDiv.setAttribute("display","inline");


If you need to support an older version of IE, which code you use to set the CSS property might change. Note: Dojo also has a way to set the CSS properties of a DOM element.

Steve
0 Kudos