By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

javascript onclick "save as" - firefox

P: n/a
Hi,

Is there a way to get a script function to save a page without the
execCommand (which works on IE but doesn't on Firefox).

Below there's the code I'm using, I took it from a template page and
added the save as command... all the functions are doing well within
the two browsers except the "save as" on Firefox.

<p>
<input class="eebuttons" type="button" value="Calcular"
name="bot_calculate" onclick="recalc_onclick('')">
<input class="eebuttons" type="button" value="Apagar" name="bot_reset"
onclick="reset_onclick('')">
<input class="eebuttons" style="margin-left:30px" type="button"
value="Gravar" name="bot_save"
onclick="document.execCommand('SaveAs');">
<input class="eebuttons" type="button" value="Imprimir"
name="bot_print" onclick="window.print();">
</p>

Please be aware that I'm a javascript noob.

Thanks in advance.

Nov 4 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ejrfigueiredo wrote:
Is there a way to get a script function to save a page without the
execCommand (which works on IE but doesn't on Firefox).
Not from within the sandbox, I presume; that would be a security leak.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Nov 4 '08 #2

P: n/a
On Tue, 4 Nov 2008 03:54:39 -0800 (PST), ejrfigueiredo
<ej***********@gmail.comwrote:
>Hi,

Is there a way to get a script function to save a page without the
execCommand (which works on IE but doesn't on Firefox).

Below there's the code I'm using, I took it from a template page and
added the save as command... all the functions are doing well within
the two browsers except the "save as" on Firefox.

<p>
<input class="eebuttons" type="button" value="Calcular"
name="bot_calculate" onclick="recalc_onclick('')">
<input class="eebuttons" type="button" value="Apagar" name="bot_reset"
onclick="reset_onclick('')">
<input class="eebuttons" style="margin-left:30px" type="button"
value="Gravar" name="bot_save"
onclick="document.execCommand('SaveAs');">
<input class="eebuttons" type="button" value="Imprimir"
name="bot_print" onclick="window.print();">
</p>

Please be aware that I'm a javascript noob.

Thanks in advance.

Many things work only in IE because M$ has made it that way.
Nov 5 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.