CalendarExtender定位问题 [英] CalendarExtender Positioning Problem

查看:151
本文介绍了CalendarExtender定位问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我增加了CalendarExtender到一个页面,使用默认的样式。当我点击日历按钮来触发日历弹出,日历通常显示。然而,当我向下滚动,然后再次单击该按钮,在日历的位置不是它应该是,如下所示。

这是为什么发生的历史,如何解决这个问题?

编辑:关于本页面执行情况的位

该CalendarExtender和文本框是一个Web部件的一部分添加到SharePoint 2007页。我创建像这样的扩展:

 的textBox =新的TextBox(){ID =textBox中};
Controls.Add被(的textBox);日历=新CalendarExtender()
    {
        ID =ceStartDate,
        的TargetControlID = textBox.ID,
        PopupPosition = CalendarPosition.Right,
        PopupButtonID = image.ID
    };
Controls.Add被(日历);


解决方案

什么是的 DOCTYPE 这一页?此外,什么浏览器是什么呢?我看到的在Quirks模式无效/旧文档类型与IE6-7页面这个问题。

在怪癖模式,JavaScript的值(如滚动位置),可断,造成不好的渲染。您应该确保您有迫使IE浏览器进入标准模式有效的DOCTYPE如..

 <!DOCTYPE HTML PUBLIC -  // W3C // DTD XHTML 1.0过渡// EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">

I am adding a CalendarExtender to a page, using the default styles. When I click the calendar button to trigger the calendar popup, the calendar displays normally. However, when I scroll down and click the button again, the calendar's position is not where it should be, as seen below.

Why is this occuring and how do I fix it?

EDIT: A bit about the implementation of this page.

The CalendarExtender and TextBox are part of a WebPart added to a SharePoint 2007 Page. I am creating the extender like so:

textBox = new TextBox() { ID = "textBox" };
Controls.Add(textBox);

calendar = new CalendarExtender()
    {
        ID = "ceStartDate",
        TargetControlID = textBox.ID,
        PopupPosition = CalendarPosition.Right,
        PopupButtonID = image.ID
    };
Controls.Add(calendar);

解决方案

What is the DOCTYPE of the page? Also, what browser is it? I have seen this issue on pages with invalid/old DOCTYPEs with IE6-7 in Quirks mode.

In quirks mode, javascript values(like scroll position), can be off, resulting in a bad render. You should ensure you have a valid DOCTYPE that forces IE into standards mode like..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

这篇关于CalendarExtender定位问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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