Welcome Guest, Not a member yet? Register   Sign In
Repopulating Form being displayed through Jquery UI tabs interface
#36

[eluser]Timothy_[/eluser]
Hmmm I was doing some research and I think I am going to have to put a condition in my jquery form.

I found this code from this post http://stackoverflow.com/questions/19909...-ajax-call

Code:
$.ajax({
    type: "POST",
    url: reqUrl,
    data: reqBody,
    dataType: "json",
    success: function(data, textStatus) {
        if (data.redirect) {
            // data.redirect contains the string URL to redirect to
            [removed].href = data.redirect;
        }
        else {
            // data.form contains the HTML for the replacement form
            $("#myform").replaceWith(data.form);
        }
    }
});

Now I just have to work out how to integrate it into my code.


Messages In This Thread
Repopulating Form being displayed through Jquery UI tabs interface - by El Forum - 02-19-2011, 11:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB