tags:

views:

55

answers:

5

I am using following code to open a file dialog box, but nothing happens on button click(). What's wrong?

<input id="btnBrowse" name="btnBrowse" type="button" value="Browse" onclick="document.execCommand('SaveAs');"/>

Edited:

Any other way to open such a dialog on other browsers as well?

+1  A: 

AFAIK, It will work only in IE. It is working on my IE 7 and not in FF.

Check this : http://msdn.microsoft.com/en-us/library/ms536419%28VS.85%29.aspx

Anuraj
A: 

Related SO post:
Javascript: document.execCommand cross-browser?

o.k.w
A: 

IT works in IE only !

Sarfraz
A: 

I found an alternative. It's name is Uploadify and is a JQuery implementation.

RPK