1

How can i call a jquery method from vb sub routine?

My code is when it returns false, the div which contains an alert message will show.

Her'es my code, but its not working:

If res = Nothing Then
    Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "PopupMessage", "$('.styleError').toggle('5000');", True)
End IF
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Blair Yumi
  • 31
  • 1
  • 4

1 Answers1

0

Is this in an UpdatePanel? If so, see ASP.NET - UpdatePanel and JavaScript .

Also, check the Javascript console in the browser to see if any errors are generated, for example you might find that you need to wrap your code in a way similar to $(document).ready(function() {/* your code here */} )

Community
  • 1
  • 1
Andrew Morton
  • 24,203
  • 9
  • 60
  • 84