/    Sign up×
Community /Pin to ProfileBookmark

A problem with checkbox/submit…

I am having difficulties with a piece of code that I got on the Javascript page. It is a “check if you agree”, submit button that goes to the next page. I am just getting the site up on the server and trying to get it all hooked together. I get a n error ” this method of POST not allowed for this url…”

<form action=”http://elizabethstewartclarkandcompany.com/CC/CC3/CC3.3/CC3.5.htm” method=”POST” onsubmit=”return checkCheckBox(this)”>
<p align=”center”><u><b><font size=”4″>I accept:</font></b></u> <input type=”checkbox” value=”0″ name=”agree”>&nbsp;&nbsp;
<input type=”submit” value=”Continue to Next Step!”>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type=”button” value=”EXIT” onclick=”window.close();”>

any thoughts???

Thank you in advance,
David

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@KeithMcLNov 08.2003 — Can you post the javascript code, so we can check it?
Copy linkTweet thisAlerts:
@D_S_R_ClarkauthorNov 08.2003 — Here is the page. Its rather small. It worked just fine in my compter, but not on the web.


<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<meta name="GENERATOR" content="Microsoft FrontPage 5.0">

<meta name="ProgId" content="FrontPage.Editor.Document">

<title>~~Terms of Agreement- Elizabeth Stewart Clark &amp; Co.~~</title>

<meta name="Microsoft Border" content="none">

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function checkCheckBox(f){

if (f.agree.checked == false )

{

alert('Please check the box if you AGREE with the terms!.');

return false;

}else

return true;

}

// End -->

</script>

</head>

<body bgcolor="#000000">

<div align="center">

<center>

<table border="1" cellpadding="4" cellspacing="4" style="border-collapse: collapse" bordercolor="#111111" width="425" height="445" bgcolor="#C1AF94">

<tr>

<td width="100%">

<div align="center">

<center>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="370" height="365">

<tr>

<td height="335">


<div align="center">
<center>
<table border="3" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="325">
<tr>
<td width="100%">
<p align="center">
<iframe name="I1" width="353" height="326" src="../../../Admin/A3/B/LD/LD3/EULA.htm" align="middle">
Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></td>
</tr>
</table>
</center>
</div>
<form action="http://elizabethstewartclarkandcompany.com/CC/CC3/CC3.3/CC3.5.htm" method="POST" onsubmit="return checkCheckBox(this)">

<p align="center"><u><b><font size="4">I accept:</font></b></u> <input type="checkbox" value="0" name="agree">&nbsp;&nbsp;

<input type="submit" value="Continue to Next Step!">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<input type="button" value="EXIT" onclick="window.close();">

</p>

</form>

</form></td>

</tr>

</table>

</center>

</div>

</td>

</tr>

</table>

</center>

</div>

</body>

</html>



Thank you for your help!!

David Clark
Copy linkTweet thisAlerts:
@D_S_R_ClarkauthorNov 08.2003 — Ok what about this one?

<form action="/yourscript.cgi-or-your-page.html"

is this where I put the page to go to if they agree??





<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Original: Colin Pc -->

<!-- Web Site: http://www.insighteye.com/ -->

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin

function checkCheckBox(f){

if (f.agree.checked == false )

{

alert('Please check the box to continue.');

return false;

}else

return true;

}

// End -->

</script>

</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<form action="/yourscript.cgi-or-your-page.html" method="POST" onsubmit="return checkCheckBox(this)">

I accept: <input type="checkbox" value="0" name="agree">

<input type="submit" value="Continue Order">

<input type="button" value="Exit" onclick="document.location.href='/index.html';">

</form>

<p><center>

<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>

by <a href="http://javascriptsource.com">The JavaScript Source</a></font>

</center><p>

<!-- Script Size: 1.21 KB -->
Copy linkTweet thisAlerts:
@KeithMcLNov 08.2003 — Try changing the action in the form tag to just # and then in the javascript code change it from:
function checkCheckBox(f){
if (f.agree.checked == false )
{
alert('Please check the box to continue.');
return false;
}else
return true;
}
to
function checkCheckBox(f){
if (f.agree.checked == false )
{
alert('Please check the box to continue.');
return false;
}else
window.location='pagename.html';
}
Copy linkTweet thisAlerts:
@D_S_R_ClarkauthorNov 08.2003 — I am still a little new at this.

I understand the addition of code you gave me, but I do not understand # in the tag???
Copy linkTweet thisAlerts:
@KeithMcLNov 09.2003 — The # just stops the action in the form tag from actually running an action. You could leave it blank too. It doesn't have any special meaning.
Copy linkTweet thisAlerts:
@D_S_R_ClarkauthorNov 09.2003 — Method Not Allowed

The requested method POST is not allowed for the URL /CC/CC3/CC3.3/CC3.5.htm.



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

Apache/1.3.28 Server at www.elizabethstewartclarkandcompany.com Port 80


This iswhat I have been getting each time the check is placed the the "next" button clicked.?
Copy linkTweet thisAlerts:
@KeithMcLNov 09.2003 — I can't see this making any difference but try changing POST to lowercase letters. Your host might have the POST method disabled for some strange reason. Contact them to see.
×

Success!

Help @D_S_R_Clark spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...