Connecting Tech Pros Worldwide Help | Site Map

Firefox 3 problem

  #1  
Old August 27th, 2008, 01:05 PM
Newbie
 
Join Date: Feb 2008
Location: Pune
Posts: 24
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
  #2  
Old August 27th, 2008, 01:55 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,528
Provided Answers: 12

re: Firefox 3 problem


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to solve IE and Firefox problem sukhbir answers 3 November 14th, 2007 10:46 AM
Super wierd FireFox problem/Bug ? Please help davecph answers 11 May 8th, 2007 06:23 PM
CSS - IE/Firefox problem - element height matt@mailinator.com answers 18 January 26th, 2006 12:45 PM
Firefox problem with overflow books1999 answers 1 January 19th, 2006 07:05 PM
Javascript firefox problem Dave Blair answers 4 July 23rd, 2005 12:51 PM