Dhirendra Posted October 26, 2006 Share Posted October 26, 2006 Hi,I have following requirement. Can anyone help me???I am developing an application which will create an Excel file and save it to the disk without prompting the user. In other words it should not display the save dialog box. . I am using PL/SQL Cartridges. Owa_Util.Mime_Header ( 'application/vnd.ms-excel', False);htp.Print('Content-Disposition:attachment;filename="test.xls"');owa_Util.Http_Header_Close; The Owa_Util is used to write the data into EXCEL. But when the second line encounters it displays the save dialog box. even if i will specify C:\test.xls instead of test.xls. I came to know this is possible through JS. So if any one can help me......... Regards,Dhirendra Link to comment Share on other sites More sharing options...
boen_robot Posted October 26, 2006 Share Posted October 26, 2006 You can't do that. It's a security measure. Thank god for it too. Imagine every page you visit saves a HUGE file in your HDD without you knowing it. Link to comment Share on other sites More sharing options...
Chocolate570 Posted October 26, 2006 Share Posted October 26, 2006 Do you mean your server's files, or your client's files? I'm sure there's a way to do it with your server's files, but if you're trying to write to your user's hard drive...there's no chance. Link to comment Share on other sites More sharing options...
Dhirendra Posted October 27, 2006 Author Share Posted October 27, 2006 Of course i am trying to write the data to my server's OS and that to its not available to all users rather its only for the Administrator of the application. Please help. Link to comment Share on other sites More sharing options...
Chocolate570 Posted October 27, 2006 Share Posted October 27, 2006 Then why would you write it to the server OS? Why not just put it in a database, or upload it into the public_html section of your OS? Link to comment Share on other sites More sharing options...
boen_robot Posted October 27, 2006 Share Posted October 27, 2006 ..or use a server side scripting language application that is executed on that server. I mean, the above fragment looked like JS and JS can't do that. Link to comment Share on other sites More sharing options...
Guest salah Posted October 31, 2006 Share Posted October 31, 2006 can i do the opposite?i mean how can i send file from client pc to the server using javscript without postback? Link to comment Share on other sites More sharing options...
aspnetguy Posted October 31, 2006 Share Posted October 31, 2006 you can't, use can use JavaScript (AJAX) to send a request to some serverside code to upload the file without post back but you cannot do it all with JavaScript. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now