473,396 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

File Browser Form Tool

I am writing a database which I edit locally using PHP / MySQL / JavaScript.
What I currently do is to list all my DVD covers from a single folder into a
drop box but what I would LIKE to do is to have a browsing facility (similar
to uploading files) which is obviously a lot quicker. However, what I need
is not an upload file form object, rather a simple click button which will
open a browser, allow me to select a file and return the name of the file -
just the file not the full directory structure. Is it possible to either
just get the file upload form object to return just the name or, using
either PHP or JavaScript write a function that will do what I need?

--
With kindest regards

************
PSI_Orion
************
http://www.psiss.com
Jul 26 '06 #1
3 1471
PSI_Orion said the following on 7/26/2006 7:33 AM:
I am writing a database which I edit locally using PHP / MySQL / JavaScript.
What I currently do is to list all my DVD covers from a single folder into a
drop box but what I would LIKE to do is to have a browsing facility (similar
to uploading files) which is obviously a lot quicker. However, what I need
is not an upload file form object, rather a simple click button which will
open a browser, allow me to select a file and return the name of the file -
just the file not the full directory structure. Is it possible to either
just get the file upload form object to return just the name or, using
either PHP or JavaScript write a function that will do what I need?
<input type="file" onchange="someFunction(this.value)">

function someFunction(fileName){
alert('The file name is ' + fileName)
}

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 26 '06 #2
PSI_Orion schrieb:
I am writing a database which I edit locally using PHP / MySQL / JavaScript.
What I currently do is to list all my DVD covers from a single folder into a
drop box but what I would LIKE to do is to have a browsing facility (similar
to uploading files) which is obviously a lot quicker. However, what I need
is not an upload file form object, rather a simple click button which will
open a browser, allow me to select a file and return the name of the file -
just the file not the full directory structure. Is it possible to either
just get the file upload form object to return just the name or, using
either PHP or JavaScript write a function that will do what I need?
You could open a window with a page that lists all available files, each
with a link that reloads the main page with the file name as GET
variable. The links also have an onClick handler to close the popup window.

--
Markus
Jul 26 '06 #3
Randy's idea helped me out, along with some searching of the web for such an
issue.

Thanks for the help guys. I have it working nicely now thank you!

PSI_Orion

"PSI_Orion" <or***@psiss.comwrote in message
news:Gq******************@newsfe6-gui.ntli.net...
>I am writing a database which I edit locally using PHP / MySQL /
JavaScript.
What I currently do is to list all my DVD covers from a single folder into
a
drop box but what I would LIKE to do is to have a browsing facility
(similar
to uploading files) which is obviously a lot quicker. However, what I
need
is not an upload file form object, rather a simple click button which will
open a browser, allow me to select a file and return the name of the
file -
just the file not the full directory structure. Is it possible to either
just get the file upload form object to return just the name or, using
either PHP or JavaScript write a function that will do what I need?

--
With kindest regards

************
PSI_Orion
************
http://www.psiss.com

Jul 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dave Smithz | last post by:
Hi There, I have a PHP script that sends an email with attachment and works great when provided the path to the file to send. However this file needs to be on the same server as the script. ...
2
by: Christopher Johannsen | last post by:
Good Day: I am working on building a tool Using ASP/COM & IIS5.1 for a non-administrative technical support team to change domain passwords for users. I have the basic interface built and...
6
by: Nick Warrington | last post by:
Somebody let me loose with ASP and it was all going well until I hit (what I think is ) a minor problem. I am using IIS as a remote configuration tool to modify an XML config file on the server....
4
by: Mountain Bikn' Guy | last post by:
I am having serious problems with the following IDE bug: Could not write to output file 'x.dll' -- 'The process cannot access the file because it is being used by another process. ' and BUG:...
4
by: Evgeny Zoldin | last post by:
Hi ALL. I would like to download file from some web-server that requires Basic-Authetication, change somthing in the file and upload it back to the server. I can download the file and proceed...
5
by: Paul | last post by:
I am trying to create a log of certain events on the website by writing them to a text file. The logging code is in an "included" file that is inserted into the pages that need to be monitored....
3
by: PSI_Orion | last post by:
I am writing a database which I edit locally using PHP / MySQL / JavaScript. What I currently do is to list all my DVD covers from a single folder into a drop box but what I would LIKE to do is to...
5
by: jeremy | last post by:
I have an ASP.Net 2.0 application running on Windows Server 2003. The application displays properly in Internet Explorer, however, when I use a browser control embedded in a .net form, I get an...
1
by: SwamyKarthik | last post by:
I am building an MS Access application that has an embedded web browser in a form. The form is linked to a table and the browser navigates to the address in the table. I have used the activeX...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.