The reason I want to review the data in the Dialog before submitting
is because I will be uploading CSV files with information and that's
basically the reason.

I used this simple form so that I could understand how it works before
I implemented the import CSV method.

I will check this out after dinner.

Thanks for the quick reply.

On Nov 27, 6:07 pm, Mean Mike <[email protected]> wrote:
> I'm not sure I understand what it is your trying to accomplish.
>
> you have input fields with data in them that the user can review
> without the dialog
> then it looks like you have the submit button calling the dialog which
> then in turn calls the submit
>
> that said you first don't want to continually have the dialog re-
> appear so have a plain button call the dialog which will then in turn
> call the submit function
>
> I'm not sure how why you would want to show them the same information
> again in the dialog but not to worry
>
> you could either clone the boxes to the dialog or just copy their
> values to the dialog
>
> something like this where .checkfirst is your button
>
>         $('.checkfirst').live('click',function() {
>                 var ip = $('form#new_roles').find('input');
>                 t = "";
>                 for (var i = 0; i < ip.length; i++) {
>                         t+= "<p>" + ip[i].name + ": " + ip[i].value + "</p>";
>                 }
>                 $(".checkdata").innerHTML(t);
>                 $('#confirmation').dialog('open');
>         });
>
> and your html like this
>
> <div id="confirmation" title="Confirmation">
>         <p class="ui-state-highlight"><span class="ui-icon ui-icon-
> alert"></span>Please check the information below if it's correct
> before
> submission.
> <div class="checkdata"><div>
> </div>
>
> hth
> Mean mike
>
> On Nov 27, 11:30 am, moleculezz <[email protected]> wrote:
>
> > Hello,
>
> > I have been working on submit forms in combination with a confirmation
> > dialog.
> > I would like to have the confirmation dialog pull up the information
> > to be submitted, so that I can check if what's being submitted is
> > correct before hitting the "Confirm" button to submit the information.
>
> > I'm new with jquery but if I'm not mistaken with the setup I have
> > right now it would not work because the jquery code halts the submit
> > until I click "Confirm". So I was thinking it would be impossible to
> > get the submitted values before clicking "Confirm".
>
> > Is there any other way I might be able to do this?
>
> > This is what I have at the moment:
>
> > $(function(){
> >         $('#confirmation').dialog({
> >                 autoOpen: false,
> >                 modal: true,
> >                 minHeight: 300,
> >                 width: 400,
> >                 buttons: {
> >                         "Confirm": function() {
> >                                 document.new_roles.submit();
> >                         },
>
> >                         "Cancel": function() {
> >                                 $(this).dialog('close');
> >                         }
> >                 }
> >         });
>
> >         $('form#new_roles').submit(function(){
> >                 $('#confirmation').dialog('open');
> >                 return false;
> >         });
>
> > });
>
> > The HTML Form:
> > <form action="http://localhost/index.php/member/roles/1"; method="post"
> > id="new_roles" name="new_roles">
> >         <label for="fname">First Name * </label>
> >         <input type="text" name="fname" value="" id="fname" />
> >         <label for="lname">Last Name * </label>
> >         <input type="text" name="lname" value="" id="lname"  />
> >         <label for="dob">Date of Birth (yyyy-mm-dd) * </label>
> >         <input type="text" name="dob" value="" id="dob" class="datepicker"  
> > /
>
> >         <label for="email">Email </label>
> >         <input type="text" name="email" value="" id="email"  />
> >         <label for="address">Address * </label>
> >         <input type="text" name="address" value="" id="address"  />
> >         <label for="city">City * </label>
> >         <input type="text" name="city" value="" id="city" />
> > </form>
>
> > <div id="confirmation" title="Confirmation">
> >         <p class="ui-state-highlight"><span class="ui-icon ui-icon-alert"></
> > span>Please check the information below if it's correct before
> > submission.</p>
> >         <p>Name: </p>
> >     <p>Email: </p>
> >     <p>Address: </p>
> >     <p>etc.....</p>
> > </div>

--

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.


Reply via email to