4 Replies Latest reply: Sep 27, 2013 10:44 AM by Joe R RSS

    Help with building the JQuery UI Modal Dialog

    Joe R





      I have requirement to create validation on a manually created tabbed form to display a message to the user that they haven't entered values on 12 fields on the row.

      The message is to ask if they really want to save the record or not. If they want to save the record call apex.submit('SUBMIT') and if not call apex.submit('CANCEL2').


      I've have no experience with JQuery and my javascript isn't too strong either.

      I'm hoping someone can help me to get this working.


      The message I want to display, but I don't know how to add that to the dialog box is:

      "You have no time assigned to your Forecast. Do you want to save this Forecast without time entered?<br /><br />"Yes" to save the Forecast.<br /><br />"No" to return with no changes."


      My code so far is:


      function confirmNoTimeSaved()


          if (html_GetElement('P11_CONFIRMNOTIMESAVED').value == '1')
                  $( "#dialog-confirm" ).dialog({
                                                      resizable: false,
                                                      positon: {my: "center", at: "center", of: window},
                                                      title: "Confirm Saving With No Time",
                                                      modal: true,
                                                      autoOpen: false,
                                                      buttons: {"Yes": function(){apex.submit("SUBMIT");},"No": function(){apex.submit("CANCEL2");}};











      Please let me know if I need to explain something.