execCommand

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rafal Konopka

    #1

    execCommand

    I've read MS documentation, I've searched the discussion threads, I cannot
    invoke the SaveAs command from a web page.

    I tried
    <a href="javascrip t:window.execCo mmand(\"SaveAs\ ");"><click here</a>
    <a href="javascrip t:document.exec Command(\"SaveA s\");"><click here</a>

    I tried passing arguments (\"SaveAs\",1,\ "myfile.htm \");

    I cannot get it to work.

    Rafal


  • Zifud

    #2
    Re: execCommand

    Rafal Konopka wrote:[color=blue]
    > I've read MS documentation, I've searched the discussion threads, I cannot
    > invoke the SaveAs command from a web page.
    >
    > I tried
    > <a href="javascrip t:window.execCo mmand(\"SaveAs\ ");"><click here</a>
    > <a href="javascrip t:document.exec Command(\"SaveA s\");"><click here</a>
    >
    > I tried passing arguments (\"SaveAs\",1,\ "myfile.htm \");[/color]

    Perhaps try Microsoft?

    <URL:http://msdn.microsoft. com/library/default.asp?url =/library/en-us/vbafpd11/html/fpmthexecComman d_HV03085060.as p>

    You must visit these pages with IE or you will not see the extra
    content MS provides using their own proprietary stuff (such as
    the list of commands that can be invoked with the execCommand
    method).
    [color=blue]
    >
    > I cannot get it to work.
    >[/color]

    You are attempting VBA commands, not JavaScript. There is no
    "SaveAs" command or anything similar that can be invoked with
    execCommand, so you will not 'get it to work' until the
    functionality exists in whatever browser you use.

    --
    Zif

    Comment

    • Arik Segal

      #3
      Re: execCommand

      This should work:
      <a
      href="javascrip t:void(document .execCommand('S aveAs',true))"> save</a>



      On Wed, 16 Mar 2005 19:31:01 -0500, "Rafal Konopka"
      <rafalk@comcast .net> wrote:
      [color=blue]
      >I've read MS documentation, I've searched the discussion threads, I cannot
      >invoke the SaveAs command from a web page.
      >
      >I tried
      > <a href="javascrip t:window.execCo mmand(\"SaveAs\ ");"><click here</a>
      > <a href="javascrip t:document.exec Command(\"SaveA s\");"><click here</a>
      >
      >I tried passing arguments (\"SaveAs\",1,\ "myfile.htm \");
      >
      >I cannot get it to work.
      >
      >Rafal
      >[/color]

      Comment

      Working...