0

I was following an on-line tutorial on JSON. I want to be able to pass the returned data to a results page however I cant get it to work. It just returns null. I am getting the data back because it shows up in the console. N00bie, Help please =)

success: function(data) {
                    console.log(data);
                    if(data.success){
                        resultObject.formSubmitionResult = data;
                        $.mobile.changePage("#results");

.

 $(document).on("pageinit", "#results", function() {
    console.log('pageinit event - #results only');

        $('#results [data-role="content"]').append('This is a result of form submition: ' + resultObject.formSubmitionResult);
    });

var resultObject = {
    formSubmitionResult : null
};
4

0 回答 0