...

View Full Version : Need help with image upload script..



AngelDK
05-19-2005, 12:02 AM
Hi all you experts out there..
Im not that good at this scripting stuff, but i try my best anyway..
Im trying to add a image uploader to my site, but it will not work..
I get this message when i try to upload..:

Method Not Allowed
The requested method POST is not allowed for the URL /gallery.htm.


--------------------------------------------------------------------------------

Apache/1.3.29 Server at xn--englesd-v1a.com Port 80

The script html is this..:

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>

<script type="text/javascript">
<!--//
var count = 0;
function addFile(insertHere,howMany){
var form = document.forms[0];
var tbody = document.createElement('tbody');
var newRow = document.createElement('tr');
var newCell = document.createElement('td');
var newInput = document.createElement('input');

num = howMany;
newRow.onclick = new Function('addFile(this,num)');
newInput.onblur = function(){
if(this.value == '' && this.className.match(/file/i)){
insertHere.parentNode.removeChild(this.parentNode.parentNode);
count = count-2;
}
}

if(insertHere.getElementsByTagName('input')[0].value == ''){
insertHere.getElementsByTagName('input')[0].onchange = function(){
insertHere.parentNode.insertBefore(newRow,insertHere.nextSibling);
insertHere.getElementsByTagName('input')[0].className = 'file';
count++;
}
}



if(count < howMany-1){
newInput.type = 'file';
newInput.name = 'file'+count;
newCell.appendChild(newInput);
newRow.appendChild(newCell);
tbody.appendChild(newRow);
}


// alert(insertHere.parentNode.firstChild.innerHTML)

}
//-->
</script>
</head>

<body>
<form method="post" action="http://www.xn--englesd-v1a.com/gallery.htm">
<table>
<tr onclick="addFile(this,3)"><td>
<input type="file" name="file" value=""></td></tr>
</table>
<input type="submit" value="Submit">
</form>
</body>

</html>

Can someone please help me..

Best Regards AngelDK :eek: :confused: :(

trancedm
05-19-2005, 01:30 AM
i think you're going to need a Server side script to get this working like PHP

AngelDK
05-23-2005, 11:41 AM
Hi again.

Thx for responding.

Can you tell me more about this PHP server script.

How do i do. and is it easy to set up
and what do i need to do, to get it running.

Best Regards AngelDK
__________________________________________________
Damn i must be a dumbass for not knowing these things..! :( :confused:

AngelDK
05-23-2005, 12:29 PM
Hi again..

when i have made a upload webpage and have put in a php encrypt password script.. how do i get the picture to show on the page it should upload to :confused:

AngelDK
05-24-2005, 01:28 AM
Hi John33

Thx for the script.
But there is something missing.
There is no button, so that visitors can browse for the image they would like to upload.

Can this be right or is it a mistake. Sorry..
________________________________________________________________
I just wish that i had my head put on the right way to solve all my tasks.. :confused: :eek:

AngelDK
05-24-2005, 01:40 AM
Hi again..

Forgot to say.. Yes i have frontpage..

Well John33 i tryed the script you made, by putting the file path in manually and it did open my gallery, but the image never showed up in the gallery.
How can i get the images that in time can be uploaded to apear on the webpage i want them to show up on..
________________________________________________________________
Some times i wish there was no such thing as a noob.. :rolleyes: :eek:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum