Click here to Skip to main content
11,711,887 members (73,698 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: jQuery
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>

any help would be appreciated

Thanks in advance
Pradeep Anugu
Posted 21-Mar-13 3:16am
Comments
@AmitGajjar at 21-Mar-13 9:21am
   
Where you have write code to register javascript ? is that on page load or page init ?
Pradeepp Anugu at 21-Mar-13 9:27am
   

not in page load in button click event
@AmitGajjar at 21-Mar-13 9:29am
   
try to place javascript after all your code. this can be because javascript call before object creation.
Pradeepp Anugu at 21-Mar-13 9:32am
   

thanks for ur reply


Protected Sub BoomerangLoginForm_LoginError(ByVal sender As Object, ByVal e As System.EventArgs) Handles BoomerangLoginForm.LoginError
If Not String.IsNullOrEmpty(BoomerangLoginForm.UserName.Trim()) Then
Dim oWebUser As MembershipUser = Membership.GetUser(BoomerangLoginForm.UserName.Trim())
If oWebUser IsNot Nothing Then
'if user exist
If Membership.GetUser(DirectCast(BoomerangLoginForm.FindControl("UserName"), TextBox).Text.Trim()).IsLockedOut Then
BoomerangLoginForm.FailureText = ""
Dim _alertString As String = "Sorry! Your attempt to log in is automatically denied as you have thrice entered an incorrect passowrd. Please click " & _
"" & _
"Forgotten your password
" & _
" to request a new password to enable you to access the secured pages of the website."
lblMessage.Text = _alertString
Page.ClientScript.RegisterStartupScript(Me.GetType(), "MyScript", _
"javascript:showMessage();", True)

------- > this is from where am calling java script function 'ScriptManager.RegisterClientScriptBlock(Page, Me.GetType(), "MyScript", _
' "javascript:showMessage();", True)


Else
BoomerangLoginForm.FailureText = "Invalid login id or password."
End If
Else
'if user does not exist
'LoginForm.FailureText = "Login ID does not exist."
BoomerangLoginForm.FailureText = "Invalid login id or password."
End If
End If

End Sub
@AmitGajjar at 21-Mar-13 9:34am
   
ok, but try to place your script tag and script files after your aspx page completed. and check the result.
Shubhashish_Mandal at 21-Mar-13 9:23am
   
Try to run it in firefox and grab the proper error message from error console.
Pradeepp Anugu at 21-Mar-13 9:29am
   
currently I am using IE 8.....
Sergey Alexandrovich Kryukov at 21-Mar-13 11:24am
   
Bad reply! Use firefox. Or use JavaScript debugger.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CHill60 280
1 Sergey Alexandrovich Kryukov 264
2 Andy Lanng 160
3 OriginalGriff 130
4 Richard MacCutchan 130
0 CHill60 280
1 Sergey Alexandrovich Kryukov 125
2 Andy Lanng 120
3 Abhinav S 95
4 Maciej Los 95


Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 21 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100