File Browser to determine the image path

M

Maverick

Hi,
I have to give a browse button and you will be able to browse and pick
the image path instead of typing it out. One more requirement will be
the image will be residing on a shared machine in the network.

I will do the transformation to fix the LAN file path to something via
a web server. Kindly let me know how to start with it. Should I use a
<input type ="file">. I also need to specify the initial path.

TIA.
Sakthi
 
L

linarin

Yes,you must use a file input element (<input type="file"...) to let
client select files. but this input must outside the form tag.

when client user have selected a file ,you can copy the input
element's value property to a hidden input element inside the form
tag.

and when client hit submit button,the file content so will not be
submit.
 
S

shimmyshack

Hi,
I have to give a browse button and you will be able to browse and pick
the image path instead of typing it out. One more requirement will be
the image will be residing on a shared machine in the network.

I will do the transformation to fix the LAN file path to something via
a web server. Kindly let me know how to start with it. Should I use a
<input type ="file">. I also need to specify the initial path.

TIA.
Sakthi

the file input's value is read only to scripts for security reasons.
Unless you have control over your users, you cannot use a prefix.
 
T

Tim Slattery

Maverick said:
Hi,
I have to give a browse button and you will be able to browse and pick
the image path instead of typing it out. One more requirement will be
the image will be residing on a shared machine in the network.

I will do the transformation to fix the LAN file path to something via
a web server. Kindly let me know how to start with it. Should I use a
<input type ="file">. I also need to specify the initial path.

<input type="file"...> is the only way to get a "browse" button to let
your user select a file. There is no way to specify an initial path,
the value property of the element is read-only. And the element
selects a file, not a directory or path.

An ActiveX component, or something on that order that can get around
normal web security restraints may be able to do what you want.
 

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
474,161
Messages
2,570,892
Members
47,431
Latest member
ElyseG3173

Latest Threads

Top