Discussion Locked

Invoke file dialog - JavaScript/Netscape

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need to invoke the Windows file dialog from my web page. From IE, I can hide on the page and then invoke from JavaScript using x.Click(), but this does not work in Netscape.
I can set focus to the input field, but Icannot seem to reference the button. Any tricks on how to make this work from Netscape 4.7?

5 replies

by jay eckles

The fact that you can do any manipulation of the file type input in IE is IMHO a bug. You cannot manipulate the field in Netscape because of security controls; if you could do stuff like set the value of the field, then you could upload any arbitrary file from a client's machine. The fact that you can launch the file/open dialog from IE might allow someone to be "tricked" into uploading a file.

In any case, to see EVERYTHING that can be done in terms of Javascript with any element in any version of Netscape, view the official Javascript documentation:

http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm
(remember to remove any spaces or linebreaks in that URL)

Good luck.

Jay
www.jayeckles.com

by jay eckles

Of course you rejected my answer because you found something incorrect about it...would you care to share with the group?

Don't reject answers because you don't get the answer you want.

[reject answers like this that don't answer the question ;-) ]

This discussion is closed to new replies.