XForms: how can I browse around?

Discussion in 'Web Design, HTML And CSS' started by pietrom, Mar 8, 2007.

  1. pietrom

    pietrom New Member

    Joined:
    Feb 2, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    I use XForms to obtain a file path from the user and to write it on a local file:

    HTML:
    ...
    <xf:model  id="model1">
         <xf:instance>
               <input>./data/default.txt</input>
         </xf:instance>
         <xf:submission  id="s01" method="put" action="file:output.xml" />
    </xf:model>
    ...
    <xf:input  model="model1" ref="input">
         <xf:label>File path:</xf:label>
    </xf:input>
    ...
    <xf:submit  submission="s01">
         <xf:label>Save</xf:label>
    </xf:submit>
    
    Here everything works correctly, but the path has to be written "by hand" inside the form.
    What I need is the possibility to choose the file in the usual way, with a point and click.
    I can do it with an usual form:

    HTML:
    <input  model="model1" ref="input" type="file" name="datafile" size="40 />
    
    but in this way I cannot save the path on a local file...

    Is it possible to get both things at the same time?
    I.e. choose a local file from the GUI and save its path on a local text or XML file?
    Either with XForms, classic forms or whatever...
     
  2. pietrom

    pietrom New Member

    Joined:
    Feb 2, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Can anybody give me a hint? :eek:
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice