Hello, Below is the code for a Captive Portal Splash Page.
I have tried to research how to fix the button at the bottom of my page but I can either add a link (which does not require checking the box to agree to terms) or simply how it came to me without the ability to send customer anywhere.

[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="../css/styles.css" rel="stylesheet" type="text/css" />
<title>Holiday Inn&reg; eHost&trade; | Terms &amp; Conditions</title>
</head>
<script language="javascript">
 function showerror(){
    if(document.terms.accept.checked == false){
        document.getElementById("error").style.visibility = "visible";
        }
 }
</script>
<body id="login">
<div id="wrapper">
  <div id="header"><img src="../images/logo_hiex.gif" alt="Holiday Inn Express&reg;" border="0" width="121" height="61" />
  </div>
  <div id="main">
    <h1 id="text_tc"><img  src="../images/welcome_click_go_hiex.gif" alt="Welcome to Holiday Inn&reg; High speed Internet access - It's free just click and go." width="359" height="84"/></h1>
    <p>Please read the Terms &amp; Conditions. If you accept the Terms, simply click below to connect.</p>
    <div id="termsconds">
      <h3><b>Six Continents Hotels, Inc.<br />
        Terms of Use of Internet</b><br />
        <br />
        TERMS, CONDITIONS AND NOTICES<br />
        <br />
      </h3>
      <h4>USE OF THE SERVICE AND ACCESS TO  THE WEB SITE</h4>
      <p>The Service .....</p>
      <p>You agree .....</p>
    </div>
    <div id="access">
      <p class="error" id="error">Please accept the Terms &amp; Conditions and check the access code.</p>
      <form name="terms" id="terms">
        <table width="586" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="left" width="30" valign="top"><input name="accept" type="checkbox" /></td>
            <td valign="middle"><p>I accept the Terms &amp; Conditions.</p></td>
          </tr>
        </table>

      <table width="586" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="130"><img src="../images/access_web.gif"  width="112" height="24" border="0" alt="Access Code" /></td>
          <td width="160">&nbsp;</td>
          <td><a onclick="showerror()" style="cursor:pointer;"></a></td>
        </tr>
      </table>
      </form>
    </div>
  </div>
  <div id="footer"><img id="stay" src="../images/stay_smart.gif" width="68" height="15" alt="Stay Smar" border="0" /></div>
</div>
</body>
</html>]

Recommended Answers

All 16 Replies

I'm sorry, but your problem is not clear.
Are you trying to make sure that a box is checked before leaving the page?
Or something else entirely?

BTW: please use the 'CODE' button when posting code..

Yes, a customer must check box then click button (has to be picture - access_web.gif)
Sorry, I am very new to this.
Thanks

This

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta name="generator" content=
    "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org" />
    <meta http-equiv="Content-Type" content=
    "text/html; charset=us-ascii" />
    <link href="../css/styles.css" rel="stylesheet" type=
    "text/css" />
    <title>
      Holiday Inn&reg; eHost&trade; | Terms &amp; Conditions
    </title>
    <script language="javascript" type="text/javascript">
//<![CDATA[
function showerror() {
    if (document.getElementById('accepted').checked == false) {
        document.getElementById("error").style.display = "inline";
    } else {
        document.getElementById("error").style.display = "none";
    }
    return document.getElementById('accepted').checked;
}
    //]]>
    </script>
  </head>
  <body id="login">
    <div id="wrapper">
      <div id="header">
        <img src="../images/logo_hiex.gif" alt=
        "Holiday Inn Express&reg;" border="0" width="121" height=
        "61" />
      </div>
      <div id="main">
        <h1 id="text_tc">
          <img src="../images/welcome_click_go_hiex.gif" alt=
          "Welcome to Holiday Inn&reg; High speed Internet access - It's free just click and go."
          width="359" height="84" />
        </h1>
        <p>
          Please read the Terms &amp; Conditions. If you accept the
          Terms, simply click below to connect.
        </p>
        <div id="termsconds">
          <h3>
            <b>Six Continents Hotels, Inc.<br />
            Terms of Use of Internet</b><br />
            <br />
            TERMS, CONDITIONS AND NOTICES<br />
            <br />
          </h3>
          <h4>
            USE OF THE SERVICE AND ACCESS TO THE WEB SITE
          </h4>
          <p>
            The Service .....
          </p>
          <p>
            You agree .....
          </p>
        </div>
        <div id="access">
          <p style="color:red; display:none" id="error">
            Please accept the Terms &amp; Conditions and check the
            access code.
          </p>
          <form name="terms" id="terms">
            <table width="586" border="0" cellspacing="0"
            cellpadding="0">
              <tr>
                <td align="left" width="30" valign="top">
                  <input id='accepted' name="accept" type=
                  "checkbox" />
                </td>
                <td valign="middle">
                  <p>
                    I accept the Terms &amp; Conditions.
                  </p>
                </td>
              </tr>
            </table>
            <table width="586" border="0" cellspacing="0"
            cellpadding="0">
              <tr>
                <td>
                  <a href="#" onclick="showerror()" ><img src=
                  "../images/access_web.gif" width="112" height=
                  "24" border="0" alt="Access Code" /></a>
                </td>

              </tr>
            </table>
          </form>
        </div>
      </div>
      <div id="footer">
        <img id="stay" src="../images/stay_smart.gif" width="68"
        height="15" alt="Stay Smart" border="0" name="stay" />
      </div>
    </div>
  </body>
</html>

may give you an idea.

Without the images, I don't know what "check the access code" is supposed to mean.

Almost there.
Sorry about the reference to "Check the access code" the people who supplied me the version did not remove it for me.
You have the error popping up if the box is not checked but did not take me anywhere.
So I researched and put in my web address for the # in line 85 <a href="#".
But it does not require the check box to be "ticked" to proceed to the website.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta name="generator" content=
    "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org" />
    <meta http-equiv="Content-Type" content=
    "text/html; charset=us-ascii" />
    <link href="../css/styles.css" rel="stylesheet" type=
    "text/css" />
    <title>
      Holiday Inn&reg; eHost&trade; | Terms &amp; Conditions
    </title>
    <script language="javascript" type="text/javascript">
//<![CDATA[
function showerror() {
    if (document.getElementById('accepted').checked == false) {
        document.getElementById("error").style.display = "inline";
    } else {
        document.getElementById("error").style.display = "none";
    }
    return document.getElementById('accepted').checked;
}
    //]]>
    </script>
  </head>
  <body id="login">
    <div id="wrapper">
      <div id="header">
        <img src="../images/logo_hiex.gif" alt=
        "Holiday Inn Express&reg;" border="0" width="121" height=
        "61" />
      </div>
      <div id="main">
        <h1 id="text_tc">
          <img src="../images/welcome_click_go_hiex.gif" alt=
          "Welcome to Holiday Inn&reg; High speed Internet access - It's free just click and go."
          width="359" height="84" />
        </h1>
        <p>
          Please read the Terms &amp; Conditions. If you accept the
          Terms, simply click below to connect.
        </p>
        <div id="termsconds">
          <h3>
            <b>Six Continents Hotels, Inc.<br />
            Terms of Use of Internet</b><br />
            <br />
            TERMS, CONDITIONS AND NOTICES<br />
            <br />
          </h3>
          <h4>
            USE OF THE SERVICE AND ACCESS TO THE WEB SITE
          </h4>
          <p>
            The Service .....
          </p>
          <p>
            You agree .....
          </p>
        </div>
        <div id="access">
          <p style="color:red; display:none" id="error">
            Please accept the Terms &amp; Conditions and check the
            access code.
          </p>
          <form name="terms" id="terms">
            <table width="586" border="0" cellspacing="0"
            cellpadding="0">
              <tr>
                <td align="left" width="30" valign="top">
                  <input id='accepted' name="accept" type=
                  "checkbox" />
                </td>
                <td valign="middle">
                  <p>
                    I accept the Terms &amp; Conditions.
                  </p>
                </td>
              </tr>
            </table>
            <table width="586" border="0" cellspacing="0"
            cellpadding="0">
              <tr>
                <td>
                  <a href="http://www.google.com" onclick="return showerror();" ><img src=
                  "../images/access_web.gif" width="112" height=
                  "24" border="0" alt="Access Code" /></a>
                </td>

              </tr>
            </table>
          </form>
        </div>
      </div>
      <div id="footer">
        <img id="stay" src="../images/stay_smart.gif" width="68"
        height="15" alt="Stay Smart" border="0" name="stay" />
      </div>
    </div>
  </body>
</html>

Sorry, I edited one line but forgot to edit another.

Works great. Thank you very much for all your help. This project would not have cost me my job but I am sure it will get me a pat on the back! LOL

Pat on the back? You can do that too.
Use the up-arrow and the 'solved' link.

commented: Fixed my problem in 3 hours after my 2 days of Google could not. Thanks +0

couple of codescraps that go with this thread even though its solved,

<script type="text/javascript">function theChecker() { if(document.getElementById('agree').checked==false) { document.getElementById('subm').disabled=true; } else { document.getElementById('subm').disabled=false; } }</script>
<input type='checkbox' id='agree' name='agree' id='agree' value="Confirmed" onclick='theChecker();' /><label for='agree'> I agree to the rules </label>
<button type="submit" title="Click To send completed form" onclick='return confirm("Are all Required fields complete? ");' id='subm' name="submit" value="Send" disabled='disabled'>Send</button>

the submit buttons greyed out until the agree button is checked, as above solution shows
and the submit button has an "Are you sure" prompt
<label> provides the now-almost-standard clickable checkbox text

Thanks for the input 'almostbob' but I need to stick to "corporate" as much as possible.
I tested yesterday on computer and all seemed fine.
Now on the "captive portal server" the links are not working properly.
Basically a month ago we were given the task of updating the page with new logo & colors. I figured I would take the opportunity to fix the button not actually requiring a "tick" in the checkbox. (thanks for your help fxm) now I can't get the user forwarded off of the captive portal screen. I noticed that in the prior version released in 2008 they used a "form" at the bottom and now they are simply using a "table". Is this the cause for it not working.
See 2008 code below, (I hope I post right this time)

<form id="terms" name="terms">
<table cellspacing="0" cellpadding="0" width="586" border="0">
<tbody>
<tr>
<td valign="top" align="left" width="30">
<input type="checkbox" name="accept" />
</td>
<td valign="center">
<p>I accept the Terms &amp; Conditions.
</p>
</td>
</tr>
</tbody>
</table>
</form>

<form method="POST" action="http://10.10.10.1/">
<table border=0 cellpadding=5 cellspacing=0>
	<tr>
 	<td align=center height="23"><font size="2" face="Geneva, Arial, Helvetica, san-serif">
        <input type="image" name="mode_login" src="access_btn.gif" img height="23" alt="Access the Web" width="116" border="0">
</font>
</td>
</tr>
</table>
<input type="hidden" name="redirect" value="http://www.google.com">
</font>
</form>





<table cellspacing="0" cellpadding="0" width="586" border="0">
<tbody>
<tr>
<td align="left" width="125"><a style="cursor: pointer" onclick="showerror()"></a>

</td>
<td align="left">
<p class="error" id="error">Please accept the Terms &amp; Conditions.</p></td></tr></tbody></table></div></div>


<div id="footer"><img height="24" alt="Stay Smart&reg;" width="68" src="stay_smart_img.gif" /> </div></div>
</body>
</html>

Does clicking with the link in 'test' mode go to Google?
Does clicking with the link in 'real' mode do nothing?
Or does it do something but not go to the right page?
Or not to any page?
What error(s) do you get?

its the action in the form, that provides the uri of the next page onsubmit

To go from test to real I have to eliminate the folders that organize the Images and Style. Next I insert the long legal text that I did not want to bury you in. Finally I put on flash drive and boot in Captive Portal machine.
fxm:
Does clicking with the link in 'test' mode go to Google?
No, It appears to simply Re-load the same "splash" web page.
Does clicking with the link in 'real' mode do nothing?
Or does it do something but not go to the right page?
Or not to any page?
It appears to simply Re-load the same "splash" web page.
What error(s) do you get?
No errors, just stays on same page. (I did notice that the (bottom background and top background) pictures are not loading. Is this due to being jpg not gif
almostbob:
I am sorry I don't understand your comment.
I provided the 2008 code in hopes that you can see the point where the user needs to go back to the Captive Portal to be authenticated at 10.10.10.1
I am not sure exactly how to incorporate this as they have them going to 10.10.10.1 then to the next site for demo we are using google.
I am sorry I thought that it would be as simple as updating google to 10.10.10.1

Without seeing the code you are now using (or a test page on the server) I can't do much.

Below is the code for the OLD logo. The checkbox did not work right. Sorry, I thought that i provided enough before. There technically is no server. Thanks again for all your help.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Holiday Inn. eHost  | Terms & Conditions</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<link type="text/css" rel="stylesheet" href="styles.css" />
</head>
<script language="javascript"> 
function showerror(){ 
if(document.terms.accept.checked == false){ 
document.getElementById("error").style.visibility = "visible"; 
} 
} 
</script>

<body>
<div id="wrapper">
<div id="header"><img height="72" alt="Holiday Inn Express." width="269" border="0" src="hi_express_logo.gif" /></div>
<div id="main">
<h1 id="text_tc"><img height="79" alt="Welcome to Holiday Inn Express. high speed Internet access - Please Log In" width="576" src="hi_express_tc1.gif" /></h1>
<p>Please read the Terms &amp; Conditions. If you accept the Terms, simply click below to connect.</p>
<div id="termsconds">
<h3><strong>Our company, Inc.<br />
</div>
<div id="access"><!--
<p>Please accept the Terms &amp; Condition.-->
<form id="terms" name="terms">
<table cellspacing="0" cellpadding="0" width="586" border="0">
<tbody>
<tr>
<td valign="top" align="left" width="30">
<input type="checkbox" name="accept" />
</td>
<td valign="center">
<p>I accept the Terms &amp; Conditions.
</p>
</td>
</tr>
</tbody>
</table>
</form>

<form method="POST" action="http://10.10.10.1/">
<table border=0 cellpadding=5 cellspacing=0>
	<tr>
 	<td align=center height="23"><font size="2" face="Geneva, Arial, Helvetica, san-serif">
        <input type="image" name="mode_login" src="access_btn.gif" img height="23" alt="Access the Web" width="116" border="0">
</font>
</td>
</tr>
</table>
<input type="hidden" name="redirect" value="http://www.google.com">
</font>
</form>
<table cellspacing="0" cellpadding="0" width="586" border="0">
<tbody>
<tr>
<td align="left" width="125"><a style="cursor: pointer" onclick="showerror()"></a>
</td>
<td align="left">
<p class="error" id="error">Please accept the Terms &amp; Conditions.</p></td></tr></tbody></table></div></div>
<div id="footer"><img height="24" alt="Stay Smart&reg;" width="68" src="stay_smart_img.gif" /> </div></div>
</body>
</html>

OK, I previously fixed some quite different code only to find out that there was some kind of unstated constraint that prevented you from using my solution.

So what is the plan now? Fix this? Or simulate this with something that works?

I hope that we can use your previously fixed code as it works perfectly but just not in my specific application. I hope that you can see exactly what they are trying to do in the OLD working code that I am missing in your NEW code. I think that the prior "IT Guy" modified the code to get the Captive Portal to acknowledge the form was "Checked". I just can't get the new to work on the old, and I figured now is the time to fix the Checkbox not working.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.