printing ticket in ajax