Advertisement
Advertisement
| 07.08.2008 at 03:00PM PDT, ID: 23548477 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: |
The external javascript file
function f36_InitCurrency(f36_ip,f36_sel,f36_ary){
f36_CIP=document.getElementById(f36_ip);
f36_Sel=document.getElementById(f36_sel);
f36_Sel.options.length=0;
f36_Sel.options[0]=new Option(f36_CIP.value,1,true,true);
for (f36_0=0;f36_0<f36_ary.length;f36_0++){
f36_Sel.options[f36_0+1]=new Option(f36_ary[f36_0][0],f36_ary[f36_0][1],true,true);
}
f36_Sel.selectedIndex=0;
f36_Sel.ip=f36_CIP;
f36_Sel.base=f36_CIP.value;
f36_Sel.onchange=function(){ f36_Calculate(this); }
f36_CIP.sel=f36_Sel;
f36_CIP.onfocus=function(){ f36_Focus(this); }
f36_CIP.onblur=function(){ this.v=this.value; }
f36_CIP.onkeyup=function(){ this.value=this.value.replace(/[^0123456789.]/g,''); }
}
function f36_Focus(obj){
obj.value='';
obj.sel.selectedIndex=0;
}
function f36_Calculate(f36_obj){
//f36_obj.ip.v
if (f36_obj.ip.value.length<1||f36_obj.ip.value==f36_obj.base){ return; }
f36_v=Math.ceil(Number (f36_obj.ip.v)*100*f36_obj.options[f36_obj.selectedIndex].value);
// f36_obj.ip.value=(f36_v/100).toFixed(2);
//f36_v=
f36_obj.ip.value=(f36_v/100).toFixed(2);
}
/*]]>*/
The HTML
<!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=utf-8" />
<title>George S May International Company</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript">
var f36_CAry=new Array();
f36_CAry[0]=['United States',1.0];
f36_CAry[1]=['Canada',.9768];
</script>
<script language="javascript" type="text/javascript" src="currency.js"></script>
<script language="JavaScript" type="text/javascript" src="validator.js"></script>
<Script Language="JavaScript">
function fnCopy(){
document.form.x_amount.value = parseInt (document.form.price.value);
}
</Script>
<style type="text/css">
<!--
/* classes for validator */
.tfvHighlight
{font-weight: bold; color: blue;}
.tfvNormal
{font-weight: normal; color: black;}
.style8 {
color: #FFFFFF;
vertical-align: 95%;
}
.style9 {
font-size: 1.5em;
font-weight: bold;
}
.style1 { font-size: 1.2em;
font-weight: bold;
}
.style10 {
color: #FF0000;
font-weight: bold;
}
.style12 {font-size: 1.2em}
-->
</style>
</head>
<body onload="f36_InitCurrency('x_amount','currency',f36_CAry);">
<div id="header">
<div align="left"><img src="images/green_logo.gif" /><span class="style8">
George S May International Company</span></div>
</div>
<form onsubmit="return v.exec()" name="form" action="charge.cfm" method="post">
<table width="65%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td colspan="3"><p class="style9">Enter your credit information.</p>
<p><img src="images/credit_card_logos_10.gif" width="336" height="50" /></p>
<p> </p></td>
</tr>
<tr>
<td width="18%" height="22" id="t_first_name"><div align="right">First Name<strong> </strong></div></td>
<td width="38%"><input type="text" name="x_First_Name" size="35" /></td>
<td width="44%">As it appears on the card</td>
</tr>
<tr>
<td height="25" id="t_last_name"><div align="right">Last Name </div></td>
<td><span class="style1">
<input type="text" name="x_Last_Name" size="35" />
</span></td>
<td>As it appears on the card</td>
</tr>
<tr>
<td height="25" id="t_card_num"><div align="right">Credit Card Number</div></td>
<td><span class="style1">
<input type="text" name="x_card_num" size="35" maxlength="16" />
</span></td>
<td>16 Digit number on the front of the card</td>
</tr>
<tr>
<td height="25" id="t_exp_date"><div align="right">Expiration Date</div></td>
<td><span class="style1">
<input type="text" name="x_exp_date" size="35" maxlength="4" />
</span></td>
<td>(Example : 0910)</td>
</tr>
<tr>
<td height="25" id="t_card_code"><div align="right">CCW Code</div></td>
<td><span class="style1">
<input type="text" name="x_card_code" size="35" maxlength="4" />
</span></td>
<td> 3 or 4 Digit pin located on the back of the card</td>
</tr>
<tr>
<td id="t_total2" height="25"><div align="right">Price</div></td>
<td><input type="text" name="price" onblur="javascript:fnCopy()"/></td>
<td>Price Charged</td>
</tr>
<tr>
<td id="t_total" height="25"><div align="right"></div></td>
<td><span class="style1">
<select name="currency" id="currency">
</select>
</span></td>
<td>Select Currency</td>
</tr>
<tr>
<td height="25" id="t_currency"><div align="right">Total</div> </td>
<td colspan="2"><span class="style1">
<input type="text" name="x_amount" id="x_amount" size="35"/>
Total
</span></td>
</tr>
<tr>
<td> </td>
<td><div align="right">
<input type="reset" value="Reset" name="B2" style="background-image:url(images/button_gradient.jpg)" />
<input type="submit" value="Submit" name="B1" style="background-image:url(images/button_gradient.jpg)" />
</div></td>
<td> </td>
</tr>
</table>
<br />
<script language="JavaScript" type="text/javascript" src="//smarticon.geotrust.com/si.js"></script>
<!-- Validation Code -->
<script language="javascript" type="text/javascript">
// form fields description structure
var a_fields = {
'x_First_Name':{'l':'First Name','r':true,'f':'alpha','t':'t_first_name'},
'x_Last_Name':{'l':'Last Name','r':true,'f':'alpha','t':'t_last_name'},
'x_card_num':{'l':'Credit Card Number','r':true,'f':'unsigned','t':'t_card_num'},
'x_exp_date':{'l':'Expiration Date','r':true,'f':'unsigned','t':'t_exp_date'},
'x_card_code':{'l':'Card Code','r':true,'f':'unsigned','t':'t_card_code'},
'currency':{'l':'Currency','r':true,'f':'unsigned','t':'t_currency'},
'x_amount':{'l':'Total','r':true,'t':'t_total'}
},
o_config = {
'to_disable' : ['Submit', 'Reset'],
'alert' : 1
}
// validator constructor call
var v = new validator('form', a_fields, o_config);
</script>
</body>
</html>
|