Click here to Skip to main content
15,891,431 members

Jquerey Dialog Popup

Pradeepp Anugu asked:

Open original thread
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 :

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







JavaScript
<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
Tags: jQuery

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900