Connecting Tech Pros Worldwide Help | Site Map

Firefox 3 problem

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 27th, 2008, 12:05 PM
Newbie
 
Join Date: Feb 2008
Location: Pune
Age: 23
Posts: 23
Default Firefox 3 problem

Hi all,

I wanted to browse a file using HTML.
So, I have written this code:

[HTML]<input type="file" style="height:22px" size=30 name="file" id="file"><br><br>[/HTML]

and JavaScript code for get the path of that selected file as
[HTML]var file_name = document.getElementById('file').value;
alert(file_name);
[/HTML]

But problem is I am getting only file name, not full path. Its working fine on Internet Explorer and Firefox version older than 3.0.
Then what should be the problem? Is it Firefox 3 issue or is there any error in my code?

Thanks
Reply
  #2  
Old August 27th, 2008, 12:55 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,236
Default

No problem with your code. Firefox 3 has changed the behaviour of file upload elements. See http://developer.mozilla.org/en/docs..._upload_fields.
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.