document.execCommand('SaveAs', false,'fileName' + ".txt");
I am trying to save the page in a file by using the above command in javascript.
Issue: I have some hidden elements on the page..CSS Style [display:none], So when I try to save the pages content using the above command, it writes the hidden elements contents as well.
Any ideas how to get rid of the hidden elements content. Is there any other parameter that we can pass which will tell not to save the hidden elements content.,
Any help is appreciated.
PS: I dont want to remove the hidden elements content from DOM. Its not an option.
Thanks, Ben
Does anyone has any other answers..