• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 54
  • Last Modified:

Execute JQuery from vb code

I have a div tag that is heing opened in modal with a button click
<a onclick="ShowFilterPopUp()" role="button" id="add_staff">Filters</a>

Open in new window

I am running some code on a second button click (In the modal window)

It reloads a grid
That reload closes the window

When I add an export to File as part of the process
The file does export but the modal does not close.

I tried calling a second code from server side but the modal window still does not close.

        If chkACH.Checked = True Then
            ExportACH() - exports but modal window does not close
            ScriptManager.RegisterStartupScript(Me, [GetType](), "blah", "ShowFilterPopUpHide();", True)
        End If

Open in new window

        function ShowFilterPopUp() {

        function ShowFilterPopUpHide() {

Open in new window

Larry Brister
Larry Brister
  • 2
1 Solution
test with this line 4 :
ScriptManager.RegisterStartupScript(Me, [GetType](), "blah", "alert(typeof ShowFilterPopUpHide);", True)

Open in new window

you should get an alert saying "function"
let me know if you don't get it, that would mean your function is not in the same scope for some reason or javascript doesn't run in the modal if you don't get the alert
Larry Bristersr. DeveloperAuthor Commented:
I am on the road for a few hours but will test when I get to my destination.
Larry Bristersr. DeveloperAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now