Solved

jquery hide() not working

Posted on 2011-09-06
1
521 Views
Last Modified: 2012-05-12
I have a window which pops up using tb_show("New Window", url, null);

When a button is clicked, I call a function defined in parent window and then get rid of the pop-up.
The parent window function in turn pops up same dialog.  The problem is for the user, it looks like the dialog stays in place, perhaps with a wired blink.  I want the dialog to actually reappear.

Here is the code currently in place:

In parent window:

openPopup();

Also tried:

setTimeout(openPrevAddrPopup(), 5000); - no effect

In Pop-up window:

function openPrevAddrPopup() {
        var url = "#TB_inline?height=300&width=600&inlineId=MyDivID";  
        tb_show("Previous Address", url, null);      
    }  

Function for button click:

function rerunRequest() {
    //debugger
        $(this).hide();
        parent.focus();
        ShowBlockUI('Searching Database');
        SearchInsuredCreditScore(prevAddress);
        HideBlockUI();
        //window.tb_remove(); -- using tb_remove() does not allow re-open same dialog
        parent.$(this).remove();
    }

ShowBlockUI and HideBlockUI are just customizations for jquery BlockUI plugin used throughout the application.

Thank you.
0
Comment
Question by:Mare22
1 Comment
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 36491047

Also tried:

setTimeout(openPrevAddrPopup(), 5000); - no effect
Also tried:
Get rid of the parentheses after openPrevAddrPopup. You need to use a function reference, not a function call:
setTimeout(openPrevAddrPopup, 5000);
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A few customers have recently asked my thoughts on Password Managers.  As Security is a big part of our industry I was initially very hesitant and sceptical about giving a program all of my secret passwords.  But as I was getting asked about them mo…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now