FF + JavaScript Save Web Page Button

0

to jest kod działający pod IE źródło http://www.designerwiz.com/24fun/utilsave/utilsave.html

function doSaveAs(){
	if (document.execCommand){
		document.execCommand("SaveAs")
	}
	else {
		alert("Save-feature available only in Internet Exlorer 5.x.")
	}
}
</script>

Jak zrobić coś takiego żeby działało na firefox??

0

Nie tak samo dzialajac ale uzyskujac taki sam efekt mozesz stworzyc guzik, ktory po nacisnieciu wywoluje skrypt np w php wysylajacy aktualna strone z naglowkiem do zapisu.

     header("Content-type: text/html");
     header('Content-Disposition: attachment; filename="' . "plik_strony.html" . '"');
     echo "zawartosc strony";
0

Zamiast ECHO można też walnąć tak:

header("Content-type: text/html");
header('Content-Disposition: attachment; filename="plik_strony.html"');
readfile('strona.html');

1 użytkowników online, w tym zalogowanych: 0, gości: 1