Note that there are some explanatory texts on larger screens.

plurals
  1. POIE7 Ajax load image issue - css property display not working
    primarykey
    data
    text
    <p>I am trying to display an image conditionally - but it is not working only in IE Browser. In Firefox , it is working correctly. Any other options to achieve the same? Thanks. </p> <pre><code>&lt;span id="goog" style="display:none;" &gt; &lt;img height="14" width="14" src="static/images/ajax_load.gif" /&gt; &lt;/span&gt; if(document.getElementById("goog")){ alert('goog'); document.getElementById("goog").style.display="none"; } if(document.getElementById("goog")){ alert('goog'); document.getElementById("goog").style.display="inline"; } </code></pre> <p>Update : 03/07</p> <p>I have been trying to solve this for IE ,but I couldn't do it yet. </p> <p>Problem: I am using the customized javascript tree component from <a href="http://www.destroydrop.com/javascript/tree/" rel="nofollow">dtree</a> and to populate the data or children of every node clicked in the tree, I am using Ajax. Everytime,if something is being processed, I would like to show the ajax image(gif) along with the 'processing' text. Everything I tried works in Firefox but not in IE. Each node is a div tag in the HTML document and is as below:</p> <pre><code>&lt;div class="dTreeNode"&gt; &lt;a href="javascript: d.o(1);"&gt; &lt;img id="jd1" alt="" src="static/images/minusbottom.gif"/&gt; &lt;/a&gt; 0 &lt;input id="ch1" type="checkbox" onclick="javascript: changeCheckBoxValues(1);"/&gt; &lt;a id="linkNode1" class="node" onclick="javascript: d.o(1); return false" href="#"&gt;AIG&lt;/a&gt; &lt;span id="aj1" style="display: none;"&gt; &lt;img height="14" width="14" src="static/images/ajax_load.gif"/&gt; &lt;/span&gt; </code></pre> <p></p> <p>When the Ajax request is fired, A static and previously undisplayed (display:none) is shown displayed, like below</p> <pre><code>&lt;table align="center" width="80%" border="1" cellspacing="0" cellpadding="0" id="proc" style="display:none;border-collapse: collapse; border: 1px solid; border-color: #D8D8D8;"&gt; &lt;tr&gt; &lt;td width="33%"&gt;&lt;/td&gt; &lt;td class="buttonBar" width="33%"&gt; &lt;span class="TextBlackNormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;processing &lt;/span&gt; &lt;/td&gt; &lt;td width="33%"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>Both the anchor tags trigger the Ajax request, but the display (of the GIF Image and the processing text ) doesn't work only in IE. </p> <p>I had tried the following :</p> <p>1) interchanged the href &amp; onclick values of the anchor tags in the DIV 2) visibility value of the DOM is tried instead of display 3) creating a dynamic DOM element and adding the image + text 4) innerHTML of the container (div / table ) where the ajax loading image + processing text is shown</p> <p>I had figured out that it is not the Ajax call that is causing the issue, at least I think so. </p> <p>When I experimented, with the conditional display of the image+text using display/visibility in IE, with some DOM value (value of text box) , It worked like a charm. </p> <p>I am really not sure whats causing the issue. </p> <p>Appreciate any help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload