airyhades
04-29-2006, 11:52 AM
hello,
im working on a web application that generates dynamic data. My question is: i want users to be able to save the generated data, but not the whole web page, just a table in the web page that holds this data. I searched and found out that showing a "save as" dialog box is possible with javascript, with a method like: onclick="javascript: document.execCommand('SaveAs','1',null);. However, i coulnd't find out how to change the document object (or is it possible?) or a trick to print just the table of dynamic data. I tried to cover the table with <div id="myData"></div> and use onclick="javascript: myData.execCommand('SaveAs','1',null); but as you might guess, it didn't work and gave this error message: "object doent support this property or method". Indeed i dont have any idea what div tag can and can't do, so it was just a meaningless try. By the way, i want to add that i can't use iframes just because of program design issues.
Anyway, do you have any suggestions?
thanks in advance,
ibrahim saygılı
im working on a web application that generates dynamic data. My question is: i want users to be able to save the generated data, but not the whole web page, just a table in the web page that holds this data. I searched and found out that showing a "save as" dialog box is possible with javascript, with a method like: onclick="javascript: document.execCommand('SaveAs','1',null);. However, i coulnd't find out how to change the document object (or is it possible?) or a trick to print just the table of dynamic data. I tried to cover the table with <div id="myData"></div> and use onclick="javascript: myData.execCommand('SaveAs','1',null); but as you might guess, it didn't work and gave this error message: "object doent support this property or method". Indeed i dont have any idea what div tag can and can't do, so it was just a meaningless try. By the way, i want to add that i can't use iframes just because of program design issues.
Anyway, do you have any suggestions?
thanks in advance,
ibrahim saygılı