Hi Dig.
first of all, i've encountered a similar problem in the past, and the only file-type that didn't cause errors was text, (regardless of what file-extension i used in the 'SavaAs' file-name).
it's possible your DOM object is viewed as 'object' and needs to be converted to text
you can try writing the xml into an iframe and then use:
<iFrameID>.document.execCommand('SaveAs', false, '[<path>/]<fileName>');
(as text/html type it shouldn't create security issues with javascript or the browser)
maybe i'm misreading your needs here, but if you are trying to reshape a web page using client side script why do you need to save the file? and if it's not a web-page you're attempting to manipulate, why use JavaScript?
anyway - if all you need is to swap rows in a 2D-table on a web page - another possible solution would be to swap the contents between table rows instead of rearranging them, i.e. - swapping whole rows' innerHTML, (primitive, but effective). |