HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
input type = "File"
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
JohnEder



Joined: 03 Oct 2008
Posts: 1

PostPosted: Fri Oct 03, 2008 12:37 pm     input type = "File" Reply with quote

Retrieving a file after clicking Browse the full path shows in the text box but the formvar does not have the full path. How can I get the full path included with the filename in the formvar?

Moved to this section from "Introduce Yourself". Ron
nikki



Joined: 24 Nov 2008
Posts: 58

PostPosted: Tue Nov 25, 2008 11:12 am     Reply with quote

<head>
<title>Browse File</title>

<script>
function fileName(){
alert(document.getElementById("fileName").value);
}
</script>
</head>

<body>

<input type="file" id="fileName">
<input type="button" value="test" onclick ="fileName();"/>
</body>


This gives the full path to the file selected
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial