弹出窗口不停留在屏幕上 [英] popup window not stay on the screen

查看:80
本文介绍了弹出窗口不停留在屏幕上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

弹出的Javascript函数:

Hi all,

Javascript function for popup:

function show_popup() {
            $find("InstrucionsCancelbtn").show();(InstrucionsCancelbtn - is ajax popup behaviorid)
        }





Design page:
<br />
 Should problem persist plesse <u><a href="AboutUs.aspx" style="color: Red" onclick="show_popup()">
                                                        Contact Us</a></u> for more Information.<br />
                                                    <br />


Ajaxpopup:


Ajaxpopup:

<ajaxtoolkit:ModalPopupExtender ID="ModalPopupExtenderID"  runat="server" BehaviorID="InstrucionsCancelbtn"
    TargetControlID="InstructionsHyperLink" PopupControlID="InstructionsPanelId"
    BackgroundCssClass="modalBackground">

<asp:Panel ID="InstructionsPanelId" runat="server" CssClass="modalPopup">
    <div class="inner" id="PopUpInstructions">
    </div>
    <table>
        <tr valign="top" style="padding-removed 400px;">
            <td style="width: 100px">
                Description:
            </td>
            <td style="width: 230px">
                <asp:TextBox ID="txtDescription" Height="50px" Width="230px" CssClass="text text_Box-large"
                    Wrap="true" runat="server" word-wrap="word-break;" TextMode="MultiLine">
                <asp:Label ID="lblalert" runat="server" ForeColor="Red" Text="">
            </td>
        </tr>
        <tr valign="middle">
            <td align="center" colspan="2" valign="middle" style="width: 100%;">
                <img id="imgsavecomments" title="Save"  runat="server" src="~/Images/ico_save.gif"
                    alt="Save"  önclick="javascript:AddDescriptionPopup();" />
                <img id="imgdeletecomments"  runat="server" title="Delete" src="~/Images/ico_delete.gif"
                    alt="Delete"  önclick="javascript:DeleteDescriptionPopup();" />
            </td>
        </tr>
    </table>
    <asp:HyperLink ID="InstructionsHyperLink" runat="server" OnClick="Description();"
        Font-Underline="True" ForeColor="Blue" />


如果单击 与我们联系 ,我需要打开弹出窗口,这是代码,并且弹出窗口正在打开,但不能同时停留在屏幕上,关闭.为什么会发生?


If I click the contact us, I need to open the popup window, this is the code and popup window is opening but not stay on the screen at the same time, it get closed. Why its happening?

推荐答案

find(" ).show();(InstrucionsCancelbtn-是ajax弹出行为ID) }
find("InstrucionsCancelbtn").show();(InstrucionsCancelbtn - is ajax popup behaviorid) }





Design page:
<br />
 Should problem persist plesse <u><a href="AboutUs.aspx" style="color: Red" onclick="show_popup()">
                                                        Contact Us</a></u> for more Information.<br />
                                                    <br />


Ajaxpopup:


Ajaxpopup:

<ajaxtoolkit:ModalPopupExtender ID="ModalPopupExtenderID"  runat="server" BehaviorID="InstrucionsCancelbtn"
    TargetControlID="InstructionsHyperLink" PopupControlID="InstructionsPanelId"
    BackgroundCssClass="modalBackground">

<asp:Panel ID="InstructionsPanelId" runat="server" CssClass="modalPopup">
    <div class="inner" id="PopUpInstructions">
    </div>
    <table>
        <tr valign="top" style="padding-removed 400px;">
            <td style="width: 100px">
                Description:
            </td>
            <td style="width: 230px">
                <asp:TextBox ID="txtDescription" Height="50px" Width="230px" CssClass="text text_Box-large"
                    Wrap="true" runat="server" word-wrap="word-break;" TextMode="MultiLine">
                <asp:Label ID="lblalert" runat="server" ForeColor="Red" Text="">
            </td>
        </tr>
        <tr valign="middle">
            <td align="center" colspan="2" valign="middle" style="width: 100%;">
                <img id="imgsavecomments" title="Save"  runat="server" src="~/Images/ico_save.gif"
                    alt="Save"  önclick="javascript:AddDescriptionPopup();" />
                <img id="imgdeletecomments"  runat="server" title="Delete" src="~/Images/ico_delete.gif"
                    alt="Delete"  önclick="javascript:DeleteDescriptionPopup();" />
            </td>
        </tr>
    </table>
    <asp:HyperLink ID="InstructionsHyperLink" runat="server" OnClick="Description();"
        Font-Underline="True" ForeColor="Blue" />


如果单击 与我们联系 ,我需要打开弹出窗口,这是代码,并且弹出窗口正在打开,但不能同时停留在屏幕上,关闭.为什么会发生?


If I click the contact us, I need to open the popup window, this is the code and popup window is opening but not stay on the screen at the same time, it get closed. Why its happening?


您是否检查了没有回发的情况? IMO使用JQuery UI对话框可以提供更多控制和更好的性能.
Have you checked that there is no postback happening? IMO using JQuery UI dialog gives more control and better performance.


如果可能的话,可以使用链接按钮

< asp:LinkBut​​ton ID ="InstructionsHyperLink" .../>而不是< a href =" .../>

现在开始..

LinkBut​​ton1_onclick(....)
{
ModalPopupExtenderID.show();

}
if possible you can take a linkbutton

<asp:LinkButton ID="InstructionsHyperLink"... /> instead of <a href="" .../>

Now on..

LinkButton1_onclick(....)
{
ModalPopupExtenderID.show();

}


这篇关于弹出窗口不停留在屏幕上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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