Jquerey Dialog Popup [英] Jquerey Dialog Popup

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

问题描述

正在使用jquerey获取错误



Microsoft JScript运行时错误:对象不支持此属性或方法



当我删除jquerey Ui引用它'显示错误就像预期的对象



我已经尝试了所有的方式通过谷歌但它'' s不工作



我试图显示一个弹出对话框使用Page.ClientScript.RegisterStartupScript从代码后面调用Showmessage函数









我的代码如下:





代码落后:



 Page.ClientScript.RegisterStartupScript(Me.GetType(),  MyScript,_ 
< span class =code-string> javascript:showMessage();,True)















< link rel =  快捷图标 href =   images / favicon.ico /> 
< link rel = icon type = image / gif href = images / tnt_icon.gif />
< link href = css / CommonStyles.css rel = stylesheet type = text / css />

< link type = text / css href = css / ui-lightness / jquery-ui-1.8.21.custom.css rel = stylesheet />
<% -
< script src = js / jquery-1.7.2 .min.js type = text / javascript>< / script> ;
< script src = js / jquery-ui-1.8.21.custom.min.js type = text / javascript>< / script>
< script src = js / jquery.uniform.js type = text / javascript>< / script> - %>

< script src = js / jquery-1.4.4.min.js type = 文本/ JavaScript的>< /脚本>
< script src = // ajax.googleapis.com/ajax/libs/jquery/1.9。 1 / jquery.min.js type = text / javascript>< ; /脚本>

< script type = text / javascript>

var jq = $ .noConflict( true );

------>此处出错 function showMessage()
{
jq('
#Popup')。对话框(
{
title: 登录|失败
职位:[' center' 150 ],
modal: true
可调整大小: false
width: 650
按钮:[
{
id: button-ok
text: 确定
click: function ()
{
$( this )。dialog(< span class =code-string> close);
}
}
]
});
jq( #Popup)。dialog( 选项 按钮 null );
// $('#Popup')。parent()。appendTo($(form:first) ));
}

function closeDialog()
{
jq( ' #Popup')。dialog(' close');
}

< / script>

< script type = text / javascript>
<! -
function showThankYouMessage()
{
$(' #PopupThankYou')。对话框(
{
title: Boomerange |谢谢你
职位:[' center' 150 ],
modal: true
可调整大小: false
宽度: 600
按钮:[
{
id: button-ok
text: Ok
点击: function ()
{
$()。dialog( close);
}
}
]
});
$( #PopupThankYou)。dialog( 选项 按钮 null );
}

function closePopupThankYou()
{
$(' #PopupThankYou')。dialog(' 关闭);
}
- >
< / script>





任何帮助将不胜感激



提前致谢

Pradeep Anugu

解决方案

.noConflict( true );

------>此处出错 function showMessage()
{
jq(' #Popup')。对话框(
{
title: 登录|失败
职位:[' center' 150 ],
modal: true
可调整大小: false
width: 650
按钮:[
{
id: button-ok
text: 确定
单击: function ()
{


this )。dialog( close);
}
}
]
});
jq( #Popup)。dialog( 选项 按钮 null );
//


('#Popup')。parent( ).appendTo(

Am working with jquerey getting the error

Microsoft JScript runtime error: Object doesn''t support this property or method

when I remove jquerey Ui reference it''s showing error like object expected

I have tried all the ways through google but it''s not working

I am trying to show a popup dialog Calling Showmessage function from code behind using Page.ClientScript.RegisterStartupScript




my code follows here :


code behind :

Page.ClientScript.RegisterStartupScript(Me.GetType(), "MyScript", _
                   "javascript:showMessage();", True)








<link rel="shortcut icon" href="images/favicon.ico" />
    <link rel="icon" type="image/gif" href="images/tnt_icon.gif" /> 
    <link href="css/CommonStyles.css" rel="stylesheet" type="text/css" />  
    
    <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
    <%--
	<script src="js/jquery-1.7.2.min.js" type="text/javascript" ></script>
	<script src="js/jquery-ui-1.8.21.custom.min.js" type="text/javascript" ></script>	
	<script src="js/jquery.uniform.js" type="text/javascript" ></script>	--%>

    <script src="js/jquery-1.4.4.min.js" type="text/javascript"></script>
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript" ></script>	

	<script type="text/javascript">
	
	     var jq = $.noConflict(true);

------> error here	    function showMessage()
        {
            jq('#Popup').dialog(
                {              
                    title: "Login | Failure",
                    position:['center',150],
                    modal: true,
                    resizable: false,
                    width: 650,
                    buttons: [
                    {
                        id: "button-ok",
                        text: "Ok",
                        click: function() 
                        { 
                            $(this).dialog("close");                         
                        }
                    }
                ] 
            });
            jq("#Popup").dialog("option", "buttons", null);
            //$('#Popup').parent().appendTo($("form:first"));
        }
    
        function closeDialog()
        {
             jq('#Popup').dialog('close');          
        }
   
	</script>
	
	<script type="text/javascript">
	<!--
	    function showThankYouMessage()
        {
            $('#PopupThankYou').dialog(
                {              
                    title: "Boomerange | Thank You",
                    position:['center',150],
                    modal: true,
                    resizable: false,
                    width: 600,
                    buttons: [
                    {
                        id: "button-ok",
                        text: "Ok",
                        click: function() 
                        { 
                            $(this).dialog("close");                         
                        }
                    }
                ] 
            });
            $("#PopupThankYou").dialog("option", "buttons", null);             
        }
    
        function closePopupThankYou()
        {
             $('#PopupThankYou').dialog('close');          
        }
    -->
	</script>



any help would be appreciated

Thanks in advance
Pradeep Anugu

解决方案

.noConflict(true); ------> error here function showMessage() { jq('#Popup').dialog( { title: "Login | Failure", position:['center',150], modal: true, resizable: false, width: 650, buttons: [ { id: "button-ok", text: "Ok", click: function() {


(this).dialog("close"); } } ] }); jq("#Popup").dialog("option", "buttons", null); //


('#Popup').parent().appendTo(


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

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