ajax for preview
preview done