日历显示在asp.net中的iframe后面 [英] Calendar is showing behind the iframe in asp.net

查看:84
本文介绍了日历显示在asp.net中的iframe后面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用日历扩展器来选择日期.基于日期,使用iframe以pdf格式显示记录.显示记录后,如果我单击日期日历将在iframe后面.仅在IE7和IE8中不起作用.低于IE7的工作方式.

我尝试过z索引.但没有用.任何人都可以解决我的问题.

这是我的代码

Hi,

Am using calendar extendar to select the date. Based on date am showing the records in pdf using iframe. after showing the record if i click the date calendar is going behind the iframe. Only in IE7 and IE8 its not working. below IE7 its working.

Am have tried z index. but no use. Please can anyone solve my prob.

This is my code

<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
                <tr>
                    <td align="center" style="width: 100%; position: relative;">
                        <div>
                            <asp:Label ID="Label1" runat="server" CssClass="LabelStyle1" Font-Bold="False" Text="As of date"></asp:Label>
                            &nbsp;&nbsp;
                            <asp:TextBox ID="txtSrtDate" CssClass="TextBoxStyle1" onclick="javascript:return hi();"
                                runat="server" Width="100px"></asp:TextBox>
                            <cc1:CalendarExtender EnableViewState="true" ID="dtDate" TargetControlID="txtSrtDate"
                                Format="dd/MM/yyyy" runat="server">
                            </cc1:CalendarExtender>
                                                      &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnShow" runat="server" CssClass="ButtonLoginPage"
                                Text="Show" ValidationGroup="DateValidation" />
                        </div>
                    </td>
                </tr>
                  <tr>
                    <td align="left">
                        <div id="div2">
                            <iframe runat="server" id="ifShowPdf" visible="false" width="100%" height="650px">
                            </iframe>
                        </div>
                    </td>
                </tr>
            </table>




谢谢您




Thanking You

推荐答案

将此JavaScript片段添加到您的页面中:
Add this bit of javascript to your page:
function calendarShown(sender, args)
{
    sender._popupBehavior._element.style.zIndex = 10005;
}


然后在日历扩展器的属性中,添加:


And then in the attributes for your calendar extender, add:

OnClientShown="calendarShown"


您有什么快乐吗?

我会尽量避免使用ajax工具包.它充满了错误,并且具有太多的CSS属性,这些属性被硬编码到控件后面的javascript中.

我将看看日历的JQuery和JQuery UI.它的样式更加灵活,您肯定可以修复与之兼容的跨浏览器.

在此处查看. http://jqueryui.com/ [
Have you had any joy?

I''d steer away from the ajax toolkit as much as possible. It''s full of bugs and has far too many css properties that are hardcoded into the javascript behind the controls.

I would have a look at JQuery and the JQuery UI for the calender. It''s much more flexible to style and you will definitely be able to fix up something cross browser compatible with that.

Check it out here.http://jqueryui.com/[^]

Oh and avoid using inline javascript or css styles. It''s just bad practise.


下载ajaxcontroltoolkit源代码并在popupextender类中进行小小的修复,然后重新编译DLL,将此新编译的DLL添加到您的项目和问题中将得到解决.
;)

请参阅提供的解决方案@
http://isolvable.blogspot.com/2009 /09/problem-rendering-ajax-popupextender.html#comment-form [
Download the ajaxcontroltoolkit source code and make a small fix in the popupextender class, then recomile the DLL, add this newly compiled DLL in your project and your problem will be solved.
;)

Refer the solution provided @ http://isolvable.blogspot.com/2009/09/problem-rendering-ajax-popupextender.html#comment-form[^]


这篇关于日历显示在asp.net中的iframe后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆