SUBMIT PAGE WITHIN JQUERY DIALOG

Samuel Fernandes

Total Post:159

Points:1117
Posted by  Samuel Fernandes
JQuery 
 984  View(s)
Ratings:
Rate this:

I have something like the following

 

$("#Lookup").load(url, function () {

        $(this).dialog({

          modal: true,

          width: 900,

          resizable: false,

          draggable: false,

          position: ['center', 210],

          title: "Lookup",

          create: function (event, ui) {

 

          }

        });

      });

The page that is loaded into the dialog has a search button (it is a lookup page for records) It returns the results to a grid and I select one of them and return it to the parent page, but obviously, clicking the search button posts the whole page back and I end up with the page loaded into the dialog becoming the parent, what I would like is the page within the dialog to postback, within the dialog and not affect the parent page. Can this be done?

  1. Kamlakar Singh

    Post:194

    Points:1396
    Re: submit page within jquery dialog

    Consider using $.get() instead of .load().

     

    Something like this:

     

    $.get({

        url: url,

        success: function (result) {

            //create your dialog and inject the content...

        }

    });

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!