This is a migrated thread and some comments may be shown as answers.
RadMenu item alt tag
3 Answers 39 Views
This is a migrated thread and some comments may be shown as answers.
Mouse
Top achievements
Rank 1
Mouse asked on 13 Jul 2011, 12:55 PM
Hi guys,

I have a radmenu which has images for its hoveredurl and imageurl. It works great - when i hover over the item it changes to the correct image and once not hovered it changes back to the normal image.

The problems i have is there is no option for alternative text if for some reason the images dont appear. At this point the website becomes unuseable.

When the menu bar is rendered down to pure html you can see an img tag with an alt="" with nothing in it. I tried putting the alt tag on the menuitem but it doesn't work. 

I can put text on the menuitem but then my image moves along side the text - not helpful.

I think this maybe something you have overlooked?

Any hints would be fantastic.

Thank you
Phil

3 Answers, 1 is accepted

Sort by
0
Accepted
Kate
Telerik team
answered on 18 Jul 2011, 01:44 PM
Hello Mouse,

To be able to render some text when an image is not displayed you could use the ToolTip property of the RadMenu item. You could also refer to the following demo where you can see how this property is applied and how it is rendered on the page. 

Best wishes,
Kate
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Mouse
Top achievements
Rank 1
answered on 18 Jul 2011, 02:05 PM
Hello Kate,

Thank you for your help this works but my menu doesnt look very nice with tooltips. I suppose thats how i will have to have it.

Phil
0
Kate
Telerik team
answered on 18 Jul 2011, 03:52 PM
Hello Mouse,

Currently we only provide support for the above mentioned approach. However, you could try to check if the image exist by using javascript and if it does not, you can set the a tooltip(see the code below) that will show only in such cases. 
function pageLoad() {
    var menu = $find("<%= mnuMain.ClientID %>");
    var newItem = menu.findItemByText("B");
    newItem.get_element().title = "Tooltip";
}

<telerik:RadMenu ID="mnuMain" runat="server" >
            <Items>
                <telerik:RadMenuItem runat="server" Text="A">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="B">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="C">
                </telerik:RadMenuItem>
                 
            </Items>
        </telerik:RadMenu>

All the best,
Kate
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Menu
Asked by
Mouse
Top achievements
Rank 1
Answers by
Kate
Telerik team
Mouse
Top achievements
Rank 1
Share this question
or