This is a migrated thread and some comments may be shown as answers.

[Solved] IFRAME disables submenus

5 Answers 87 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dave
Top achievements
Rank 1
Dave asked on 08 Jun 2012, 04:30 PM
I have an <iframe> in a page (in order to display HTML documents inside another HTML page) and now the dropdown submens do not display at all. Any ideas? The <iframe> is positioned just under the menu.

Thanks,
Dave

5 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 11 Jun 2012, 07:50 AM
Hi Dave,

It is not clear whether the problem is that the Menu subitems do not open at all, or whether they open below the iframe.

The first problem can be caused by a Javascript error. The second problem should not occur in standard scenarios, unless you have some z-index styles applied to (ancestor) elements that are related to the Menu or the iframe.

If you need further assistance, you may need to provide a live URL or a runnable example.

Greetings,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Dave
Top achievements
Rank 1
answered on 11 Jun 2012, 11:45 AM
Dimo,

I was actually able to solve this problem by using the <object> tag rather than an <iframe> to display the HTML content. The menus work fine now.

<object id="docViewer" data="@Model.DocumentUrl" type="text/html" style="width:100%;" />


Thanks,
Dave 
0
Dave
Top achievements
Rank 1
answered on 01 Aug 2012, 10:41 AM
Dimo,

Turns out my use of the <object> tag works fine in IE9 but not in IE8. It appears the menu is still working to some degree because main level menu items (that do not have submenu items) are clickable. However, if a main menu item has submenu items, highlighting of the main menu item is not shown and neither does the submenu items.

Ideas?

Thanks,
Dave
0
Dimo
Telerik team
answered on 01 Aug 2012, 11:51 AM
Hello Dave,

In the case when an iframe is used, please make sue that it has a separate closing tag. Self closing iframes are not valid HTML and cause various problems.

The Menu problem sounds like a Javascript error to me, however, I am not able to provide more specific advice based on the provided information. Please send me a demo to test locally. Thank you in advance.
All the best,
Dimo
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
0
Dave
Top achievements
Rank 1
answered on 01 Aug 2012, 12:37 PM
Providing a separate closing tag <iframe></iframe> did the trick! Thanks!
Tags
Menu
Asked by
Dave
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Dave
Top achievements
Rank 1
Share this question
or