Inserting form into modal dialog (newb question?)
I'm a jQuery newb so sorry if the answer is painfully obvious. :D I'm
using jQuery version 1.2.6 and UI version 1.5. I'm loading a form
into a modal dialog box using the .load method, but I seem to have
trouble assigning a click event to the button in my form; it just
won't register. I tried including a script block in the form itself,
but that gets stripped out when the form is loaded. It looks like it
tries to look for the button before the form is loaded and isn't
finding it. Below is my code. Thanks.
jQuery("a[@id*=form]").click(function()
{
jQuery("#dialog").load(jQuery(this).attr("href") + "
form[@id*=order] fieldset").dialog({
modal: true,
autoOpen: false,
width: 600,
dialogClass: "flora",
overlay: {opacity: 0.5, background: "black"}
});
jQuery("#dialog").dialog("open");
alert(jQuery("#dialog").find("#update01").attr("id")); //returns
undefined
return false;
});