views:

18

answers:

1

I'm not usually one to just post code and say "help", but I feel like I've exhausted every search. Any help as to why this doesn't work would be greatly appreciated. I'm not getting any type of Javascript errors, the window just doesn't open when I click on the link I set up.

function openDialog()
{
    jQuery('#GREWaiverTable').show();
    jQuery('#GREWaiverTable').dialog('open');
}
jQuery(document).ready(function() {
    jQuery('body').append('<div id="GREWaiverTable" title="Am I required to take the GRE?"></div>');
    jQuery('#GREWaiverTable').load('grewaivertable.cfm?ajax=1')
    jQuery('#GREWaiverTable').dialog({
        autoOpen:false,
        width:600,
        modal:true,
        resizable:true,
        overlay: {
            backgroundColor: '#000',
            opacity: 0.7
        }
    });
    jQuery('#grewaiverlink').click(function() {
        openDialog();
    });
});

And the HTML:

<a id="grewaiverlink">Am I required to take the GRE?</a>
+1  A: 

I see a possible issue:

The ##GREWaiverTable should only have one hash symbol #GREWaiverTable. That is how you reference an ID attribute.

Also, are you using Fiddler or Firebug to ensure the call to the grewaivertable.cfm?ajax=1 is happening?

Dustin Laine
he fixed the double-# issue :-)
Pointy
Yeah, sorry, I pasted the code from my Coldfusion page and it's inside of a cfoutput tag which requires escaping the hash signs.
Kyle
Good call on Firebug though. I looked at the response from grewaivertable.cfm and it was including some javascript code from my Application.cfm which was causing conflicts when it got included twice on the page.
Kyle
Did it fix the issue?
Dustin Laine
Yes, sorry for the delay in accepting, but I had to wait a few minutes before it would allow me to accept the answer.
Kyle
No worries, just wanted to make sure you had a resolution.
Dustin Laine