can any body tell me how i create a .txt file using javascript which is browser compatable too.
and after creating the file it gives the save as diaglog box so that
you need to send the data to the server and then offer a link to download it. Here's a terrible example with jquery and php just to give you basic idea.
$.ajax({
type: "post",
url: "ajax.php",
data: {
type: "save",
text: "this is some text you want to send"
},
dataType: "json",
success: function(data){
window.open(data["url"]);
}
});
ajax.php
"link",
"url" => "http://yourserver.com/{$name}"
));
}
?>