Javascripting the Webcontrols.Menu

D

Dittrich

Hello,

In my project, I'm using the standard Webcontrols.Menu on a page. I want to
be able to manipulate the menuitems with javascript. Therefore, the anchor
tags that are rendered by the menu need to include an id attribute. How do I
override the standard rendering of the menuitems so that an id attribute can
be generated?

this is wat is generated for a standard menuitem:

<tr onmouseover="Menu_HoverDynamic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(this)" id="mainMenun2">
<td><table class="DynamicMenuItem mainMenu_7" cellpadding="0"
cellspacing="0" border="0" width="100%">
<tr>
<td style="white-space:nowrap;width:100%;"><a class="mainMenu_1
DynamicMenuItem mainMenu_6" href="main.aspx"
style="border-style:none;font-size:1em;"><img src="Images/Delete.png" alt=""
style="border-style:none;vertical-align:middle;" />Delete</a></td>
</tr>
</table></td>
</tr>

and this is what I want the menuitem to generate:

<tr onmouseover="Menu_HoverDynamic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(this)" id="mainMenun2">
<td><table class="DynamicMenuItem mainMenu_7" cellpadding="0"
cellspacing="0" border="0" width="100%">
<tr>
<td style="white-space:nowrap;width:100%;"><a id="item_21"
class="mainMenu_1 DynamicMenuItem mainMenu_6" href="main.aspx"
style="border-style:none;font-size:1em;"><img src="Images/Delete.png" alt=""
style="border-style:none;vertical-align:middle;" />Delete</a></td>
</tr>
</table></td>
</tr>

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top