This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes jQuery-UI Dialog Container goes missing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery-UI Dialog Container goes missing" Watch "jQuery-UI Dialog Container goes missing" New topic
Author

jQuery-UI Dialog Container goes missing

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6



I call the above function on the click event of a button. It displays a form in a dialog (#dialog-form). After closing the form the dialog won't open when this function is called subsequent times. Looking at the console.log() statements, it always finds the $(tab) but the #dialog-form comes back empty. To make matters worse, it is sporadic. The other day, this was working just fine. I could get the dialog to display any time I wanted. Today? Only once.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

A tad bit more information. $(tab) is looking for the ID of a jQuery UI tab element, and on this tab I have the DIV#dialog-form. In firebug, I can type console.log($('#dialog-form')) and I get my DIV element back. If I do a search off the $(tab) it comes back []. This only occurs after I've dismissed the dialog the first time. Prior to showing the dialog, I can find the element no problem.

My guess is that when the Dialog is closed, the DIV#dialog-form isn't a child of $(tab) anymore.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

<off-topic>
    I can't help. At the same time, I'm amused enough I have to post *something*, because stuff like this, DOM/JavaScript interaction, cracks me up, in the way that makes me want to stick my head in an oven and long for a more unified, sane model.
</off-topic>
 
GeeCON Prague 2014
 
subject: jQuery-UI Dialog Container goes missing