wow, yeah I testet it and it gets the path.
Since I am a newbie (especially when it comes to javacript) I was wondering how I could get the path from the javascript into a php variable?
I need to send the path through a GET, right?
I have put the javascript in the head with the function name "getpath()", and when I I call the function (onSubmit) it works.
The question is how I can save the path in my php-variable. As you can see my form action, down low, is screwed up.. but I would imagine it should look something similar, or?
If I have the javascript in the head
<?
if(isset($_POST['submit'])){
$path= $_GET['path'];
echo "<a href=\"$path\";>Klicka</a>";
}
?>
<form method="post" action="in_pp.php?path=getpath();" enctype="multipart/form-data">
<input type="file" size="15" name="file" class="button">
<input type="submit" name="submit" value="Open" class="button">
</form>