Hi again.
I've submitted a bug about all of this but it seems it's gone... I
can't seems to find it neither in "My Bugs" (http://ui.jquery.com/bugs/
report/7), nor in "My Active Tickets" (http://ui.jquery.com/bugs/
report/9). And I received no email of whatever happened with my
ticked.
Anyway, for all who want a workaround I've created small function that
will allows use jQuery UI dialog with ASP.NET. This function will
clone dialog back to aspnet form, destroy old dialog and perform
clicking on specified button. Also it will copy values for password
fields, since they won't be clonned in IE.
var __passwordCloneValues;
//
// Function that will close jQuery UI dialog, clone it back to aspnet
form and perform submit.
// Should be applied to the dialog.
//
// Arguments:
// butOkId - id of the submit button
//
$.fn.extend({
dialogCloseAndSubmit: function(butOkId)
{
if (!Page_IsValid)
return false;
__passwordCloneValues = new Array();
$(":password", $(this)).each(function()
{
__passwordCloneValues.push($(this).val());
});
__passwordCloneValues = __passwordCloneValues.reverse();
var dlg = $(this).clone();
$(this).dialog("destroy");
dlg.css("display", "none");
$("#aspnetForm").append(dlg);
$(":password", dlg).each(function()
{
$(this).val(__passwordCloneValues.pop());
});
$("#" + butOkId, dlg).click();
return true;
}
});
A typical call from the aspnet page:
$("#<%= this.butOk.ClientID %>").click(function()
{
return $("#<%= this.panelMain.ClientID %>").dialogCloseAndSubmit($
(this).attr("id"));
});
On 16 сент, 15:53, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> It would fix it for any elements in that form, but not any later in the DOM.
> I don't think there's currently an API option to do this, so you'd have to
> modify the source (though it would be quite trivial). If you're interested
> in this being a supported option (it would be called appendTo), please
> submit a ticket here:
>
> http://ui.jquery.com/bugs/newticket(requires registration)
>
> Thanks.
>
> - Richard
>
> 2008/9/16 LM <[EMAIL PROTECTED]>
>
>
>
> > Thanks.
>
> > Well, I went the 1st way. Still I want to ask - maybe if you move
> > dialog not to the very end of the body but to the end of the form
> > maybe this will still fix IE stacking issue?
>
> > On 16 сент, 05:46, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> > > When the dialog gets created, the dom elements all get moved to the end
> > of
> > > the body. This is to fix z-index/stacking in IE. So it sounds like this
> > is
> > > interfering with the .net event. Here are a couple options:
>
> > > 1. move the elements back to the form, and manually submit when the
> > button
> > > is clicked
> > > 2. clone the elements when you create the dialog, then clone the values
> > > back, trigger click on the original button
>
> > > Some things to think about. Please let us know how you make out.
>
> > > - Richard
>
> > > On Mon, Sep 15, 2008 at 9:39 AM, LM <[EMAIL PROTECTED]> wrote:
>
> > > > Hi.
>
> > > > I have ASP.NET page wich uses jQuery UI extensions. Cause of ASP.NET
> > > > nature there can be only one <form> on the page. So, I have html like
> > > > this:
>
> > > > ...
> > > > <form action=...>
> > > > ...
> > > > <div id="myPopup">
> > > > Test popup<br />
> > > > <input type="submit" value="Test submit" />
> > > > </div>
> > > > ...
> > > > <input type="submit" value="Test submit 2" />
> > > > ...
> > > > </form>
>
> > > > I show "#myPopup" as modal dialog. All works fine but it seems jQuery
> > > > UI dialog blocks submit event from within the modal dialog box. So
> > > > when I click "Test submit" button nothing happens - no postback. In
> > > > the same time if I click on the "Test submit 2" button (which is
> > > > located outside of the dialog box) - form got submitted.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---