01-09-2007, 01:01
|
#1
|
|
Inactive
Join Date: Aug 2007
Posts: 10
|
Form buttons
Hi All
Can anyone throw any light on this little conundrum?
I see this message intermittently on my website when clicking the button to move to the next page or when attempting to close the page. "Method Not Allowed. The requested method POST is not allowed for the URL......."
Have I transgressed some kind of NTL server protocol?
Does this mean that form buttons are not permitted on the NTL server? most of the time these buttons function as intended, and the problem has only arisen in the last 48 hours.
This does not happen all of the time sometimes everything works just fine, and it does not seem to affect all pages, just some of them.
If this a problem, does anyone know of a work round? I really do not want use text links to perform these functions as it will spoil the design layout.
The site is not finished, and I have only uploaded the site to iron out any bugs. This is not a problem that I was expecting. The exercise has been useful because a lot of bugs have been eradicated. Has anyone else had this problem? Once I am happy with it I will transfer it to a domain, so is this maybe just an NTL issue or will I have this problem where ever I go?
|
|
|
01-09-2007, 02:46
|
#2
|
|
Inactive
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
|
Re: Form buttons
sorry but not understood if its a site you made up, but javascript is allowed on ntl/virgin
your javascript may not be up to scratch, but who knows I am drunk right now
ik
|
|
|
01-09-2007, 02:52
|
#3
|
|
Inactive
Join Date: Jun 2003
Age: 44
Posts: 14,750
|
Re: Form buttons
Seems odd sometimes POST isn't allowed but sometimes it is.
Can you use the GET method instead? Its only for small submission fields though.
|
|
|
01-09-2007, 10:25
|
#4
|
|
Inactive
Join Date: Aug 2007
Posts: 10
|
Re: Form buttons
Well, what is even more confusing is the fact that the site was up for week before this started happening. I have checked again this morning and it all seems to be working! It is unlikely (although I would not completely discount it) that there is any problem with the script as I got it from 'The Java Script' site. Not only that but I have looked at several scripts from several different sources and they are all more or less the same. I have run the Dreamweaver debugging and that does not show any problems.
Here is the offending script:
HEAD
<!-- Original: Sven David Hildebrandt (shildebr@online.no) -->
<!-- Web Site: http://home.hia.no/~sdhild99 -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function goToURL() { window.location = "wytonretro print media 3.htm"; }
// End -->
</script>
BODY
<FORM ACTION="wytonretro print media 3.htm" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded"></P>
<P>
<CENTER>
<P><INPUT TYPE="SUBMIT" VALUE="View print media 3" input onClick="parent.location='wytonretro womens magazines.htm'"></P>
</CENTER>
<P></FORM>
<FORM ACTION="wytonretro newspaper headlines.htm" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded"></P>
<P>
<CENTER>
<P><INPUT TYPE="SUBMIT" VALUE="Close this page" input onClick="parent.location='wytoretro newspaper headlines.htm'">
|
|
|
01-09-2007, 13:50
|
#5
|
|
Inactive
Join Date: Jun 2003
Age: 44
Posts: 14,750
|
Re: Form buttons
Ugh, that's really messy.
There are two forms there, but I don't see what they are submitting? It looks like they are just redirecting to other pages.
If that's the case you don't need the forms declaration, and you can change type="submit" to type="button" which would solve a lot of problems.
You shouldn't have spaces in your filenames though.
|
|
|
01-09-2007, 14:29
|
#6
|
|
Inactive
Join Date: Aug 2007
Posts: 10
|
Re: Form buttons
Yes, that is exactly what I want to do. That is to say the ability to go to the next page as one option, or to close the page as a second option. I will be the first to put my hand up, and say that I do not know very much about javascript, so I am grateful for your advice and I will rework the script as you have suggested. Thank you for your advice.
|
|
|
01-09-2007, 14:54
|
#7
|
|
Inactive
Join Date: Jun 2003
Age: 44
Posts: 14,750
|
Re: Form buttons
You need to really simplify it, as what you are writing is far too much for what you want to do.
The simplest way of directing people to a new page is a standard text link like so:
<a href="http://www.site.com/page.htm">link text</a>
Change the blue text to where you want the link to go, and the red text to whatever text or pictures you want to appear.
if you want to use a button instead of text or pictures you can just do:
<input type="button" value"button text" onclick="javascript:window.location='http://www.site.com/page.htm'">
Again blue text tells the browser where to go and the red text changes what the button says.
To close the window do:
<input type="button" value="close this window" onclick="javascript:window.close()">
And change the red text to what you want to say.
|
|
|
01-09-2007, 17:22
|
#8
|
|
Inactive
Join Date: Aug 2007
Posts: 10
|
Re: Form buttons
Thank you for that information. i shall get to work on it later on. I will let you know how it goes.
---------- Post added at 16:22 ---------- Previous post was at 14:51 ----------
O.K. well, I have tried doing as you suggested, unfortunately it does not work. The buttons appear alright, but when they are clicked nothing happens, with or without this in the header.
<!-- Original: Sven David Hildebrandt (shildebr@online.no) -->
<!-- Web Site: http://home.hia.no/~sdhild99 -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function goToURL() { window.location = "wytonretro print media 3.htm"; }
// End -->
</script>
So, the buttons are there and they change on mouseover, but in depending on the button the page will not close or go to the next page.
|
|
|
01-09-2007, 17:35
|
#9
|
|
Inactive
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
|
Re: Form buttons
Quote:
Originally Posted by rgs00002
Thank you for that information. i shall get to work on it later on. I will let you know how it goes.
---------- Post added at 16:22 ---------- Previous post was at 14:51 ----------
O.K. well, I have tried doing as you suggested, unfortunately it does not work. The buttons appear alright, but when they are clicked nothing happens, with or without this in the header.
<!-- Original: Sven David Hildebrandt (shildebr@online.no) -->
<!-- Web Site: http://home.hia.no/~sdhild99 -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function goToURL() { window.location = "wytonretro print media 3.htm"; }
// End -->
</script>
So, the buttons are there and they change on mouseover, but in depending on the button the page will not close or go to the next page. 
|
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> new document </title>
</head>
<body>
<input type="button" value="Go Here" onclick="window.location='http://www.woskf.co.uk'">
<input type="button" value="Close This" onclick="javascript:window.close()">
//not sure if this will close the window, you may have to reference the window you want to close
//why do you want to close the window, why not redirect somewhere else?
</body>
</html>
|
|
|
01-09-2007, 19:47
|
#10
|
|
Inactive
Join Date: Aug 2007
Posts: 10
|
Re: Form buttons
Right, may I extend a heartfelt thank you to everybody for your valuable contributions. Everything is now working as it should, and of course the good thing about the solution is that I have been able to dump a lot of excess content. I thank you all.
|
|
|
01-09-2007, 20:01
|
#11
|
|
Inactive
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
|
Re: Form buttons
Quote:
Originally Posted by rgs00002
Right, may I extend a heartfelt thank you to everybody for your valuable contributions. Everything is now working as it should, and of course the good thing about the solution is that I have been able to dump a lot of excess content. I thank you all. 
|
no probs
ik
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 20:22.
|