| 7:41 pm on Jul 16, 2008 (gmt 0)|
I would be willing to bet that a browser will not pass that data under any circumstances. It's a security risk.
You would need to run an activeX control or some other form of client side software.
Either that or have the user input the file path themselves.
| 8:29 pm on Jul 16, 2008 (gmt 0)|
I have another text box that allows them to input it manually and the user can copy and paste the path that the browse button fills in the text box, I just wanted to make it so the user would not have to copy and paste. If there is no way around it that is ok. Thanks,
| 10:09 pm on Jul 16, 2008 (gmt 0)|
| 12:14 am on Jul 17, 2008 (gmt 0)|
Yes I know, I just didn't want to have to mess with JS because I hate it and it is not powerful enough to do what I want. I would end up with a mess of PHP and JS or setting a header in PHP to output in JS and I don't want to deal with that headache. Thanks,
| 4:01 am on Jul 17, 2008 (gmt 0)|
>> it is not powerful enough
I disagree. For what you need (to send the path using POST) this is definitely 'powerful' enough, and might even be one of your only solutions.
>> I would end up with a mess of PHP and JS
If you properly organize your code this shouldn't be an issue at all.
| 4:16 am on Jul 17, 2008 (gmt 0)|
Alright ran a quick test. Calling the value of the file element in a form gives you the path of the file. This only works in Internet Explorer, however; I tested it on Opera and Firefox, as well, and you only get the filename not the whole path. In any case, since this is for your intranet, I don't think it would be too much to ask if they used IE to use it, although there might be a more universal solution, I just don't know of it. But to get the filename in IE, it looks something like this:
var file_path = document.getElementById("browse").value
| 12:32 pm on Jul 17, 2008 (gmt 0)|
Yea I may break down and use JS but try to figure out a way to get it to work. As far as the IE thing goes, everyone in the office uses IE. I'm the only person who uses FF (because it is simply much more user friendly). Usually, I have the problem of things working or looking fine in FF and Opera, but not working or showing correctly in IE so this will be a first. Thanks for all of your help.