File Browser Form Tool

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PSI_Orion

    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
    ************



  • Randy Webb

    #2
    Re: File Browser Form Tool

    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="someF unction(this.va lue)">

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

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

    Comment

    • Markus Ernst

      #3
      Re: File Browser Form Tool

      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

      Comment

      • PSI_Orion

        #4
        Re: File Browser Form Tool

        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" <orion@psiss.co mwrote in message
        news:GqIxg.6278 5$sz1.6894@news fe6-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
        ************

        >

        Comment

        Working...