Skip navigation
Currently Being Moderated

How do I get a Spry Textfield to return the full file path, not just the file name.

Jul 28, 2012 5:11 PM

In my form I am asking the user to enter a file name. After browsing the textfield does show the full path and name but both GET and my javascript can only return the file name without the path. Obviously I am going to need the path as well to be able to upload the file.


From the body:


  <span id="sprytextfield5">

    <input name="dw_Abstract" type="file" required="required" id="dw_Abstract" tabindex="30" size="66" />

    <span class="textfieldRequiredMsg">Please enter the file name for your abstract.</span>

  </span><br />

  <font size="-1">(Document type - plain text (txt) file only, please, up to 20kB.)</font>



From my JavaScript:

function GetSpryValue(SName)


  return document.getelementById(SName).value;



$Doc_AbstractFile = GetSpryValue("dw_Abstract");


Thanks, Mike


More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points