> I have a form where the user can capture a link to a file.

> They click on Browse and navigate their network and point
> to the file they
> want to link to. (Bullet Proof browse to the file.)

> When the form is submitted I capture the full path to the
> file with some
> _javascript_
> kinda thing.

> Then I use that full path and store it so that when
> someone wants to visit
> the link they can ... (if they have permissions across
> their internal
> network to open/read the file).

> The issue is that even though I am only storing the full
> network path name
> the file is being uploaded and then discarded.

>    -- Can this behavior be suppressed?

>    -- Is their a way that would suppress it that would not
>    require me to
> build an equivalent browse tool that can be used across
> linux/windows
> clients and cfServers?

> Thanks again to anyone who knows,
> Gonz

Unfortunately, at least with Internet Explorer, the file field is
considered to be a security risk, and so to lock that down, they don't
allow _javascript_ to edit its value. Once the user's selected
something, that file is going to the server, like it or not...

There is one possible way to prevent this, and that's to place the
file field in another element which you can reference by an ID, i.e.
<div id="mydiv"> then in the form's onsubmit event, after any form
validation occurs, dynamically change the content of that div to an
empty string, thus removing the file input from the form.
(document.getElementById('mydiv').innerHTML = '';) I haven't tried it,
and I don't know how browsers would react. It's also important to note
also that although the DOM standard insists that the innerHTML
property is read/write for all elements, Internet Explorer's
implementation is read-only for <tr> and <table> elements.

hth

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to