PDA

View Full Version : How Do I Put An Error Message In This Age vervication htm page



codymc
Feb 7th, 2011, 02:00 AM
How Do I Put An Error Message In This Age vervication htm page Below?

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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="http://cdn.battlefieldbadcompany2.com//misc/favicon.ico" type="image/x-icon">
<link type="text/css" rel="stylesheet" media="all" href="./agegate_files/css_2b22bb76f86419edef5093a148bae2d9.css">
<link type="text/css" rel="stylesheet" media="print" href="./agegate_files/css_d34ed7daed866afd03ff14a52c469b82.css">
<!--[if IE]>
<link type="text/css" rel="stylesheet" media="all" href="http://battlefieldbadcompany2.com/sites/all/themes/zen_ninesixty/css/ie.css?D" />
<![endif]-->
<script type="text/javascript" src="./agegate_files/js_07d74692b8bac063e891abbaba65653e.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/", "thickbox": { "close": "Close", "next": "Next \x3e", "prev": "\x3c Prev", "esc_key": "", "next_close": "Next / Close on last", "image_count": "Image !current of !total" } });
//--><!]]>
</script>
</head>

<body class=" agegate">

<div id="wrapper">

<div id="page" class="container-12">

<div id="site-header">
<div id="header-inner" class="grid-12">


</div>
</div> <!-- End 'site-header' -->

<div class="agegate-block">
<div class="agegate-header">
<h2>Enter your age</h2>
</div>
<div class="content">
<img src='enterage.gif' />
<form action="./agegate_files/agegate.htm" accept-charset="UTF-8" method="post" id="agegate-form" class="agegate-form">
<div><div class="languages"><h3>Country ( US ONLY )</h3><div class="flag-wrapper"><div><ul>
<li class="en">
<a class="active" href="agegate.htm">
<img height="20" width="36" title="English" alt="English" class="language-icon" src="./agegate_files/en.gif">
</a>
</li>

</ul></div></div></div><div class="form-item" id="edit-age-wrapper">
<input type="text" maxlength="2" name="age" id="edit-age" size="2" value="" class="form-text agegate-age-input">
</div>
<div class="form-item"><a href='index.htm'><input type="submit" name="op" id="edit-submit" value="Continue" class="form-submit agegate-submit-btn"></a>
</div><input type="hidden" name="form_build_id" id="form-6167175a48bd92c722f6decc9d1c5ac7" value="form-6167175a48bd92c722f6decc9d1c5ac7">
<input type="hidden" name="form_id" id="edit-agegate-form" value="agegate_form">

</div></form>
</div>
</div>

</div> <!-- End 'page' -->
</div> <!-- End 'wrapper' -->

<div id="omnitureWrapper" style="display: none;"><script language="javascript" src="./agegate_files/utils.js"></script>
<script language="JavaScript"><!--
var language = "en";
omniture="home";
var country = "";
var category = "";
var host = "";
switch(language)
{
case "en":
country = "us";
category = "NA";
language = "en-US";
host = "eaeacom,eaeacomna,eaeabrandna,eagamebfbc2na,eagamebfbc2global";
break;
case "en-gb":
country = "uk";
category = "EMEA";
language = "en-GB";
host = "eaeacom,eaeacomeu,eagamesuk,eagamebfbc2uk,eagamebfbc2global";
break;
default:
country = "us";
category = "NA";
language = "en-US";
host = "eaeacom,eaeacomna,eaeabrandna,eagamebfbc2na,eagamebfbc2global";
break;
}

var s_account=omniCheckHost(host)
var s_imageDisableFlag = 0;
//--></script>
<script type="text/javascript" language="JavaScript" src="./agegate_files/s_code_remote_v02.js"></script>
<script language="JavaScript"><!--
s_ea.server=""
s_ea.channel=""
s_ea.prop1=s_ea.setUserState('No ID')
s_ea.prop2="BFBC2"
s_ea.prop3="GAMES"
s_ea.prop4="BATTLEFIELD"
s_ea.prop5= "BFBC2";
s_ea.prop7= "DICE";
s_ea.prop9= "MKT";
s_ea.prop10= "Agegate";
s_ea.prop11= category;
s_ea.prop12= language;
s_ea.prop15= "General Info";
s_ea.prop17= country.toUpperCase();
s_ea.prop18= country.toUpperCase()+":BFBC2";

s_ea.pageName=category+":"+country.toUpperCase()+":"+s_ea.prop3+":"+s_ea.prop7+":"+s_ea.prop9+":"+s_ea.prop4+":"+s_ea.prop2+":"+s_ea.prop5+":"+s_ea.prop10.toUpperCase();

/* E-commerce Variables */
s_ea.eVar1="No ID";
s_ea.eVar3="BFBC2";
s_ea.eVar17=country.toUpperCase();
s_ea.eVar18=category ;
s_ea.eVar29=s_ea.setInitValOnce(country.toUpperCase()+":"+s_ea.prop2+":"+s_ea.prop5);
s_ea.eVar30=country.toUpperCase()+":"+s_ea.prop2+":"+s_ea.prop5;
s_ea.eVar34="GAMES";/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
if((s_imageDisableFlag == null) || (typeof (s_imageDisableFlag) == "undefined") || (!s_imageDisableFlag)){var s_code=s_ea.t();if(s_code)document.write(s_code);}//--></script><!-- End SiteCatalyst code version: H.0. --><script language="javascript" type="text/javascript" src="./agegate_files/omniture_wrapper.js"></script></div>


</body></html>

Philip M
Feb 7th, 2011, 10:17 AM
When posting here please help us to help you by following the posting guidelines and wrapping your code in CODE tags. This means use the octothorpe or # button on the toolbar. You can (and should) edit your previous post.

What message? What kind of message - an alert or what? Where is it to appear? What will cause it?

Perhaps you are groping for


<input type="text" maxlength="2" name="age" id="edit-age" size="2" value="" class="form-text agegate-age-input" onchange = "checkage()">

<script type = "text/javascript">
function checkage() {
var a = document.getElementById("edit-age").value;
if (a < 18) { // or whatever
alert ("You must be at least 18 to register");
return false:
}
</script>


Note that <script language=javascript> is long deprecated and obsolete. Use <script type = "text/javascript"> instead. The <!-- and //--> comment (hiding) tags have not been necessary since IE3 (i.e. since September 1997). If you see these in some published script it is a warning that you are looking at ancient and perhaps unreliable code.



Notice in laundrette: AUTOMATIC WASHING MACHINES: PLEASE REMOVE ALL YOUR CLOTHES WHEN THE LIGHT GOES OUT