Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

web page save as box

Posted on 2011-10-27
5
Medium Priority
?
265 Views
Last Modified: 2012-06-22
Can someone please give me an example of php code which will allow me to put a "save / save as" dialogue box on to a web page
The page will be saved as a web page (complete)
0
Comment
Question by:doctorbill
5 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37039692
Sorry, not understanding what you are asking for. Do you want code that replicates the browser's Save function?

0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37039712
You don't need PHP, that is on the File menu of all browsers.
0
 
LVL 7

Accepted Solution

by:
amigura earned 2000 total points
ID: 37040427
works in ie

<script language="JavaScript" type="text/javascript">
function save_page(){
if (document.execCommand){
document.execCommand("SaveAs")
}
}
</script>
<form>
<input type="button" value="save" onClick="save_page()"
</form>

Open in new window

0
 

Author Comment

by:doctorbill
ID: 37041401
In answer to the above question- yes I am trying to emulate the save as command in a browser. The code above does work but I need to be able to save associated images , css etc as well- like with the save as button in ie.

I want to use a button in the page so that users will not have to go to the menu in ie
0
 

Author Closing Comment

by:doctorbill
ID: 37082444
fast response
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question