Note that there are some explanatory texts on larger screens.

plurals
  1. POFusion Chart swap
    text
    copied!<p>I have tried to do a fusion chart swap but asp doesn't like doing that. So the next best thing is to have the fusion chart render, and then with a onmousedown, replace the chart with an image. Only this isn't working as well. I have tried adding div's around the code and using id's, but the swapping isn't working. I have used the 'popChartDiv' in the document.popChartDiv.src, but this ID is what is calling the rendering for the Literal3. I am not sure about how to switch Literal3 with the 2 div's below it (testimage.png and testimage1.png). It seems the chart is the focal point and the images are unable to override the chart. I have tried using z-index as well but that didn't work. So I'm stuck.</p> <pre><code>&lt;div style="width:798px; margin-left:auto; margin-right:auto; height:250px; float:left; overflow:hidden;" id="popChartDiv"&gt; &lt;script src="../../Dashboard/Charts/FusionCharts.js" type="text/javascript"&gt;&lt;/script&gt; &lt;div id="popChartContainer"&gt;&lt;/div&gt; &lt;asp:Literal ID="Literal3" Visible="true" runat="server"&gt;&lt;/asp:Literal&gt; &lt;div id="line3ChartContainer"&gt;&lt;/div&gt; &lt;asp:Literal ID="Literal9" Visible="true" runat="server"&gt;&lt;/asp:Literal&gt; &lt;img src="/images/testimage.png" width="798" height="250" name="swap"/&gt; &lt;/div&gt; &lt;div style="width:38px; height:250px; float:left;"&gt; &lt;img src="../../images/labortab.png" style="float:left; width:38px; height:125px;" id="labor" onmousedown="document.swap.src='/images/testimage.png';"/&gt; &lt;img src="../../images/odctab.png" style="float:left; width:38px; height:125px;" id="odc" onmousedown="document.swap.src='/images/testimage1.png';"/&gt; &lt;script type="text/javascript"&gt; $('#labor').hover(function () { $(this).attr('src', '/images/labortabhover.png'); }, function () { $(this).attr('src', '/images/labortab.png'); }); $('#odc').hover(function () { $(this).attr('src', '/images/odctabhover.png'); }, function () { $(this).attr('src', '/images/odctab.png'); }); &lt;/script&gt; &lt;/div&gt; </code></pre>
 

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