J
Joe Stateson
I can add an onclick event for my asp menu using
Menu1.Attributes.Add("onclick", "jfunctioncall()"). I do not see how to add
a similar event for any of the items in the menu. Looking at the page
source I see onmouseover, onmouseout, onkeyup and was wondering if
onmouseclick could somehow be added?
=======source code=======
<asp:MenuItem Text="Select All" Value="all"></asp:MenuItem>
=====generates the following on the page====
<tr onmouseover="Menu_HoverDynamic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(this)" id="Menu1n3">
<td><table class="Menu1_6" cellpadding="0" cellspacing="0" border="0"
width="100%">
<tr>
<td style="white-space:nowrap;width:100%;"><a class="Menu1_1 Menu1_5"
href="javascript:__doPostBack('Menu1','Edit\\all')">Select All</a></td>
</tr>
</table></td>
=======end of code segment=====
Is there any way to make a template out of a menu item and add an item that
has some type of OnClientClick?
The only thing I can think of is to override the __doPostBack and test for
"Menu1" and "Edit\all" etc which does work but is a kluge.
Menu1.Attributes.Add("onclick", "jfunctioncall()"). I do not see how to add
a similar event for any of the items in the menu. Looking at the page
source I see onmouseover, onmouseout, onkeyup and was wondering if
onmouseclick could somehow be added?
=======source code=======
<asp:MenuItem Text="Select All" Value="all"></asp:MenuItem>
=====generates the following on the page====
<tr onmouseover="Menu_HoverDynamic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(this)" id="Menu1n3">
<td><table class="Menu1_6" cellpadding="0" cellspacing="0" border="0"
width="100%">
<tr>
<td style="white-space:nowrap;width:100%;"><a class="Menu1_1 Menu1_5"
href="javascript:__doPostBack('Menu1','Edit\\all')">Select All</a></td>
</tr>
</table></td>
=======end of code segment=====
Is there any way to make a template out of a menu item and add an item that
has some type of OnClientClick?
The only thing I can think of is to override the __doPostBack and test for
"Menu1" and "Edit\all" etc which does work but is a kluge.