PDA

View Full Version : Clicking table cause page to refresh



mtdave
24 May 2011, 6:59 AM
Hi, I have dialog that I've built that is a map layer control for turning off and on ArcServer map layers. The control nests the following widgets:

1) Window
2) Tab Panel
3) Tree

Inside each Tree Node I am placing the node text and inserting a Div that contains an HTML Table with legend icons and descriptive text.

The problem I am having is if someone double clicks on the table the page refreshes. I have a double click handler setup for the entire node that does something different and works correctly. I need to figure out how to keep the page from refreshing on double click of the table but I don't understand why it is even doing that.

Below is the inspect element html code for a Tree Node.

Thanks, Dave



<li class="x-tree-node"><div class="x-tree-node-el x-tree-node-leaf x-unselectable treelab" unselectable="on" ext:tree-node-id="fc-2">
<span class="x-tree-node-indent">

<img class="x-tree-ec-icon x-tree-elbow" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="">

<img class="x-tree-node-icon transpicon" unselectable="on" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="">

<input class="x-tree-node-cb" type="checkbox" checked="">

<a class="x-tree-node-anchor" tabindex="1" href="" hidefocus="on">
<span unselectable="on">
<span id="lgt-2" style="color:black">Transportation Network</span>

<div id="lgp-2" style="margin-left:80px">
<table>
<tbody>
<tr>
<td>
<img alt="img" src="/ArcGIS/rest/services/DemoMapV2/MapServer/2/images/F9CDC93A">


</td>

<td style="width:100px;font-size:11px">Freeway/Controlled Access</td>


</tr>

<tr>
<td>
<img alt="img" src="/ArcGIS/rest/services/DemoMapV2/MapServer/2/images/7BC4184A">


</td>

<td style="width:100px;font-size:11px">Principle Arterial</td>


</tr>

<tr>
<td>
<img alt="img" src="/ArcGIS/rest/services/DemoMapV2/MapServer/2/images/7BC4184A">


</td>

<td style="width:100px;font-size:11px">Minor Arterial</td>


</tr>

<tr>
<td>
<img alt="img" src="/ArcGIS/rest/services/DemoMapV2/MapServer/2/images/7BC4184A">


</td>

<td style="width:100px;font-size:11px">Collector Arterial</td>


</tr>

<tr>
<td>
<img alt="img" src="/ArcGIS/rest/services/DemoMapV2/MapServer/2/images/1E0527D6">


</td>

<td style="width:100px;font-size:11px">Local Street</td>


</tr>


</tbody>


</table>


</div>


</span>


</a>


</div>

<ul class="x-tree-node-ct" style="display:none;"></ul>


</li>