AngelDK
05-19-2005, 12:02 AM
Hi all you experts out there..
I´m not that good at this scripting stuff, but i try my best anyway..
I´m 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: :(
I´m not that good at this scripting stuff, but i try my best anyway..
I´m 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: :(