javascript onclick "save as" - firefox

E

ejrfigueiredo

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.
 
T

Thomas 'PointedEars' Lahn

ejrfigueiredo said:
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
 
R

richard

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top