Page 1 of 1

input button

Posted: Tue Oct 26, 2010 4:45 am
by cornflakegirl
Hello,

I'm a student and quite new to php&Javascript
Next you see my programming code. I have a textaerae where I want to paste the URL of the input type="file". This copy and pasting i want to do with my button. I don't know if it's right to refer a function to my button. So that function can copy and paste from my file-URL to my textaerea.
Is that possible?

Thx

Code: Select all

<script type="text/javascript">
function copy()
{
$copy = $_POST

}
</script>

<h1 class="title" >Welcome to the annotation page</h1>
<p> Here you can annotate your new data en paste a link that will bring you to the data-file. </p></br>

<div id="dataform">
 
<table>
    <form method="post" enctype="multipart/form-data" action="?form=make" name="pageform">
        <th colspan="2">URL to the data *</th> <tr><td width="500" colspan="2">
        <textarea name="datalink" id="datalink" style="width:500px; overflow:auto; height:100px; "> </textarea>
       
<tr><td colspan="2"><center><input type="hidden" name="MAX_FILE_SIZE" value="1600000" /><br />
        <input type ="file " name="linkfile" id ="linkfile" /><br /><br />
        <input type="button" id ="copylink" name="copylink" "value="Copy to the box above" ONCLICK="copy()" /></center></td></tr>
        <th colspan="2"></th><tr></tr><th colspan="2"></th><tr></tr><th colspan="2"></th><tr></tr></td>   

 </form></table></div>

Re: input button

Posted: Fri Oct 29, 2010 9:21 am
by cornflakegirl
so I want to copy the URL that is in the box after I search and select a file on my pc (input type ="file " name="linkfile" )
The button will have the function to copy the URL and paste it in the textarea before it is present in my database.
In this textarea there can be more than one URL. That's why i want to use that button (input type="button" name ="copylink")

so is it possible to create a function that let do something like that...