Avatar of willnjen
willnjen asked on

getURL Javascript not working

Hi Experts

I am embarrassed to ask this question because I am so lost, I don't know where to start.

I have a web page sent to me by support team at Paymate which is a credit card processing company similar to PayPal.  The page is an example of a form to collect details then send those to Paymate.  it concatenates the entries from the form into an address similar to this...

https://www.paymate.com/PayMate/ExpressPayment?mid=demonstration&amt=100.00¤cy=USD

Paymate will not help me fix the page.  I think there is a problem with the getURL function which gathers the details from the form.  Or there might be a problem with the form.

Normally I would try to track down the specific problem and ask a more focused question.  But I stuck with this one.  Can you look over the code and point out any major floors.  I presume this page works somewhere on the web otherwise why would the support team send it to me.

Attached is the code which can also be seen on http://www.willnjen.com/5hit/sample3.html 

Many thanks

Will
<!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"><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Sample Page for Paymate Integration</title>
<!-- InstanceEndEditable -->
<link href="00css/text.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="head" -->
<script type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
 
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
 
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
 
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script language="javascript">
<!--
// framebuster
 if (top.location != self.location) {
   top.location = self.location
 }
 
function gsPopUp(URL, w, h) {
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=" + w + ",height=" + h + "');");
}
 
function focus_amt_other() {
  document.DonateNowForm.idonate_amts[(document.DonateNowForm.idonate_amts.length - 1)].checked = "0";
}
 
function blank_amt_other() {
  if (document.DonateNowForm.other_amt == null) return; // other_amt field not present; do nothing
  
  document.DonateNowForm.other_amt.value = "";
}
 
//-->
</script>
<script type="text/javascript">
//<![CDATA[
 
function rdo_OnClick(r){
	var ctlAmount=document.getElementById('PC635_txtAmount');
	var ctlAthon=document.getElementById('PC635_chkIsAthon');
	var ctlAmountReqVal=document.getElementById('PC635_ReqFldValidatorAmount');
	var ctlAmountCmpVal=document.getElementById('PC635_CmpValidatorAmount');
	var ctlAmountRegExVal=document.getElementById('PC635_RegExValidatorAmount');
	var ctlRequired=document.getElementById('PC635_lblAmtRequiredMarker');
      
      if (setGivingLevel(r) == -1) {
		ctlAmount.disabled=false;
		if (ctlAthon != null) {ctlAthon.disabled=false;}
		try {
			ctlAmountReqVal.enabled=true;
			ctlAmountCmpVal.enabled=true;
			ctlAmountRegExVal.enabled=true;
		} catch(e) {}
		ctlRequired.style.visibility='visible';
	} else {
		if (ctlAmount != null) {
			ctlAmount.disabled=true;
			ctlAmount.value='';
		}
		if (ctlAthon != null) {ctlAthon.disabled=true;}
		try {
			ctlAmountReqVal.enabled=false;
			ctlAmountCmpVal.enabled=false;
			ctlAmountRegExVal.enabled=false;
		} catch(e) {}
		if (ctlRequired != null) {ctlRequired.style.visibility='hidden';}
	}
}
 
function setGivingLevel(r){
	var ctlHidden=document.getElementById('PC635_HiddenID');
	var level=r.parentNode.attributes.getNamedItem('itemIndex').nodeValue
      ctlHidden.value=level
      return level
}
 
function DonationGiftAidHelp(){var sFeatures='WIDTH=510px,HEIGHT=425px,RESIZABLE=YES,SCROLLBARS=NO,TOOLBAR=NO,LEFT=5,TOP=20,location=No;status=No';var oPopUp=new PopUpDialogBB('~/Admin/DonationHelp.ascx', '_blank', sFeatures, '&mode=4');oPopUp.Show();}
 
 
function getURL()
{
   var targeturl="https://www.paymate.com/PayMate/ExpressPayment?mid=testuser";
   targeturl=targeturl+"&pmt_sender_email="+document._xclick.pmt_sender_email.value;
   targeturl=targeturl+"&pmt_contact_firstname="+document._xclick.pmt_contact_firstname.value;
   targeturl=targeturl+"&pmt_contact_surname="+document._xclick.pmt_contact_surname.value;
   targeturl=targeturl+"&pmt_contact_phone="+document._xclick.pmt_contact_phone.value;
   targeturl=targeturl+"&regindi_pcode="+document._xclick.regindi_pcode.value;
   targeturl=targeturl+"&pmt_country="+document._xclick.pmt_country.value;
   targeturl=targeturl+"&regindi_address1="+document._xclick.regindi_address1.value;
   targeturl=targeturl+"&regindi_address2="+document._xclick.regindi_address2.value;
   targeturl=targeturl+"&regindi_sub="+document._xclick.regindi_sub.value;
   targeturl=targeturl+"&regindi_county="+document._xclick.account_ccard_city.value;
   targeturl=targeturl+"&amt_editable="+document._xclick.amt_editable.value;
   targeturl=targeturl+"&return="+document._xclick.return.value;
   targeturl=targeturl+"&back="+document._xclick.back.value;
 
   if(document.getElementById('PC635_txtAmount').disabled==false)
   {
          targeturl=targeturl+"&amt="+document.getElementById('PC635_txtAmount').value;
   }
   else
   {
       for(var i=0;i<document._xclick.amt.length;i++)
       {
          if(document._xclick.amt[i].checked)
          {
              targeturl=targeturl+"&amt="+document._xclick.amt[i].value;
          }
       } 
   }
   window.open(targeturl, "", "", "");
   return false;
}
//]]>
</script>
 
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style3 {color: #FFFFFF}
-->
</style>
</head>
 
<body> 
<form name="form1" method="post" action="" onsubmit="">                       
<table border="0" cellspacing="1" width="100%" height="107">
  <tr>
    <td width="100%" align="left" height="21" bgcolor="#FFFFFF" colspan="2">
 
      <hr size="0" color="#C0C0C0">
    </td>
 
  </tr>
  <tr>
    <td width="100%" align="left" height="21" bgcolor="#FFFFFF" colspan="2"><b><font face="Arial" size="3"><a name="Sample Page for Paymate Integration">Sample Page of Paymate Integration</a></font></b></td>
 
 
    <td width="100%" align="left" height="1" bgcolor="#FFFFFF" colspan="2"><img border="0" src="images/3x3.gif" width="3" height="3"></td>
  </tr>
  <tr>
    <td width="100%" align="right" height="21" bgcolor="#8CB8E3" colspan="2">&nbsp;</td>
 
  </tr>
  <tr>
    <td width="30%" align="left" height="21"><font face="Arial" size="2" color="#003366">Shopping Cart Amount Payable</font></td>
    <td width="70%" height="21"></td>
 
  </tr>
  <tr>
                <td id="PC635_thCaptionAmount" class="BBFieldCaption DonationFieldCaption" valign="top">
                    <font face="Arial" size="2">
 
                    Amount:</font></td>
		
                <td class="BBFieldControlCell DonationFieldControlCell">
                    <table id="PC635_tblAmount" class="taLeft" border="0" cellspacing="1">
			<tr>
 
				<td class="BBFieldControlCell DonationFieldControlCell"><span class="vaTop" itemIndex="11"><input id="PC635_rdo_11_5" type="radio" name="amt" value="25.00" onclick="rdo_OnClick(this);" checked /></span></td><td class="vaBottom BBFieldControlCell DonationFieldControlCell"><span><font size="2" face="Arial">$25.00</font></span></td>
			</tr><tr>
				<td class="BBFieldControlCell DonationFieldControlCell"><span class="vaTop" itemIndex="12"><input id="PC635_rdo_12_5" type="radio" name="amt" value="50.00" onclick="rdo_OnClick(this);" /></span></td><td class="vaBottom BBFieldControlCell DonationFieldControlCell"><span><font size="2" face="Arial">$50.00</font></span></td>
 
			</tr><tr>
				<td class="BBFieldControlCell DonationFieldControlCell"><span class="vaTop" itemIndex="13"><input id="PC635_rdo_13_5" type="radio" name="amt" value="75.00" onclick="rdo_OnClick(this);" /></span></td><td class="vaBottom BBFieldControlCell DonationFieldControlCell"><span><font face="Arial" size="2">$75.00</font></span></td>
			</tr><tr>
				<td class="BBFieldControlCell DonationFieldControlCell"><span class="vaTop" itemIndex="14"><input id="PC635_rdo_14_5" type="radio" name="amt" value="100.00" onclick="rdo_OnClick(this);" /></span></td><td class="vaBottom BBFieldControlCell DonationFieldControlCell"><span><font face="Arial" size="2">$100.00</font></span></td>
 
			</tr><tr>
				<td class="BBFieldControlCell DonationFieldControlCell"><span class="vaTop" itemIndex="15"><input id="PC635_rdo_15_5" type="radio" name="amt" value="150.00" onclick="rdo_OnClick(this);" /></span></td><td class="vaBottom BBFieldControlCell DonationFieldControlCell"><span><font face="Arial" size="2">$150.00</font></span></td>
			</tr><tr id="PC635_trOther" style="display:;">
 
				<td id="PC635_tdOther" class="BBFieldControlCell DonationFieldControlCell"><span itemIndex="-1"><input id="PC635_rdoOther" type="radio" name="amt" value="0.00" onclick="rdo_OnClick(this);" /><label for="PC635_rdoOther"><font face="Arial" size="2">Other</font></label></span></td><td class="wsNowrap BBFieldControlCell DonationFieldControlCell">
                                <table style="margin-left: -3px" cellspacing="1">
                                    <tr>
                                        <td>
                                            <span id="PC635_lblSymbol"><font face="Arial" size="2">$</font></span>
 
                                        </td>
                                        <td>
 
                                            <input name="amt" type="text" maxlength="10" id="PC635_txtAmount" disabled="disabled" class="BBFormTextbox DonationTextboxNarrow" size="20" />&nbsp;</td>
				
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <span id="PC635_lblAmtRequiredMarker" class="BBFormRequiredFieldMarker DonationRequiredFieldMarker" style="visibility:hidden;"><b><font face="Arial" color="#FF0000" size="3">*</font></b></span>
 
                                        </td>
                                    </tr>
 
                </table>
        </table>
  </tr>
  <tr>
    <td width="100%" align="right" height="21" colspan="2">
      <hr size="0" color="#C0C0C0">
    </td>
 
  </tr>
 
  <tr>
    <td width="30%" align="left" height="21"><font face="Arial" size="2" color="#003366">Personal
      Details</font></td>
    <td width="70%" height="21"></td>
  </tr>
  <tr>
    <td width="30%" align="right" height="21"><font face="Arial" size="2">First
      Name:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font></font></td>
 
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="25" size="30" name="pmt_contact_firstname"></span></font></td>
 
         
  </tr>
  <tr>
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Surname:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font></font></td>
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="25" size="30" name="pmt_contact_surname"></span></font></td>
  </tr>
  <tr>
    <td width="30%" align="right" height="25"><font face="Arial" size="2">Address
      1:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font></font></td>
 
    <td width="70%" height="25"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="40" size="30" name="regindi_address1"></span></font></td>
  </tr>
  <tr>
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Address
      2:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font></font></td>
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="40" size="30" name="regindi_address2"></span></font></td>
  </tr>
  <tr>
 
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Suburb:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font></font></td>
 
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="50" size="30" name="regindi_sub"></span></font></td>
  </tr>
  <tr>
    <td width="30%" align="right" height="21"><font size="2" face="Arial">City:&nbsp;&nbsp;&nbsp;</font></td>
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="50" size="30" name="account_ccard_city"></span></font></td>
  </tr>
 
  <tr>
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Postal
      Code / Zip:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font></font></td>
 
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="10" size="10" name="regindi_pcode"></span></font></td>
  </tr>
  <tr>
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Country:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font></font></td>
 
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><select name="pmt_country" size="1">
        <option value="AF">Afghanistan
        <option value="AL">Albania
        <option value="DZ">Algeria
        <option value="AS">American Samoa
        <option value="AD">Andorra
        <option value="AO">Angola
        <option value="AI">Anguilla
        <option value="AQ">Antarctica
        <option value="AG">Antigua/Barbuda
        <option value="AR">Argentina
        <option value="AM">Armenia
        <option value="AW">Aruba
        <option value="AU" selected>Australia
        <option value="AT">Austria
        <option value="AZ">Azerbaijan
        <option value="BS">Bahamas
        <option value="BH">Bahrain
        <option value="BD">Bangladesh
        <option value="BB">Barbados
        <option value="BY">Belarus
        <option value="BE">Belgium
        <option value="BZ">Belize
        <option value="BJ">Benin
        <option value="BM">Bermuda
        <option value="BT">Bhutan
        <option value="BO">Bolivia
        <option value="BA">Bosnia/Herz
        <option value="BW">Botswana
        <option value="BV">Bouvet Is
        <option value="BR">Brazil
        <option value="IO">Brit Indian Ter
        <option value="BN">Brunei
        <option value="BG">Bulgaria
        <option value="BF">Burkina Faso
        <option value="BI">Burundi
        <option value="KH">Cambodia
        <option value="CM">Cameroon
        <option value="CA">Canada
        <option value="CV">Cape Verde
        <option value="KY">Cayman Islands
        <option value="CF">Central Afr Rep
        <option value="TD">Chad
        <option value="CL">Chile
        <option value="CN">China
        <option value="CX">Christmas Is
        <option value="CC">Cocos/Keeling Is
        <option value="CO">Colombia
        <option value="KM">Comoros
        <option value="CG">Congo
        <option value="CD">Zaire
        <option value="CK">Cook Islands
        <option value="CI">Cote D'Ivoire
        <option value="CR">Costa Rica
        <option value="HR">Croatia
        <option value="CU">Cuba
        <option value="CY">Cyprus
        <option value="CZ">Czech Republic
        <option value="DK">Denmark
        <option value="DJ">Djibouti
        <option value="DM">Dominica
        <option value="DO">Dominican Rep
        <option value="EC">Ecuador
        <option value="EG">Egypt
        <option value="SV">El Salvador
        <option value="GQ">Equatorl Guinea
        <option value="ER">Eritrea
        <option value="EE">Estonia
        <option value="ET">Ethiopia
        <option value="FK">Falkland Is
        <option value="FO">Faroe Is
        <option value="FJ">Fiji
        <option value="FI">Finland
        <option value="FR">France
        <option value="GF">French Guiana
        <option value="PF">French Polynesia
        <option value="TF">French So Ter
        <option value="GA">Gabon
        <option value="GM">Gambia
        <option value="GE">Georgia
        <option value="DE">Germany
        <option value="GH">Ghana
        <option value="GI">Gibraltar
        <option value="GR">Greece
        <option value="GL">Greenland
        <option value="GD">Grenada
        <option value="GP">Guadeloupe
        <option value="GU">Guam
        <option value="GT">Guatemala
        <option value="GN">Guinea
        <option value="GW">Guinea-Bissau
        <option value="GY">Guyana
        <option value="HT">Haiti
        <option value="HM">Heard/Mcdonald
        <option value="HN">Honduras
        <option value="HK">Hong Kong
        <option value="HU">Hungary
        <option value="IS">Iceland
        <option value="IN">India
        <option value="ID">Indonesia
        <option value="IR">Iran
        <option value="IQ">Iraq
        <option value="IE">Ireland
        <option value="IL">Israel
        <option value="IT">Italy
        <option value="JM">Jamaica
        <option value="JP">Japan
        <option value="JO">Jordan
        <option value="KZ">Kazakhstan
        <option value="KE">Kenya
        <option value="KI">Kiribati
        <option value="KP">Korea, DPRK
        <option value="KR">Korea, Rep Of
        <option value="KW">Kuwait
        <option value="KG">Kyrgyzstan
        <option value="LA">Laos
        <option value="LV">Latvia
        <option value="LB">Lebanon
        <option value="LS">Lesotho
        <option value="LR">Liberia
        <option value="LY">Libya
        <option value="LI">Liechtenstein
        <option value="LT">Lithuania
        <option value="LU">Luxembourg
        <option value="MO">Macao
        <option value="MK">Macedonia
        <option value="MG">Madagascar
        <option value="MW">Malawi
        <option value="MY">Malaysia
        <option value="MV">Maldives
        <option value="ML">Mali
        <option value="MT">Malta
        <option value="MH">Marshall Is
        <option value="MQ">Martinique
        <option value="MR">Mauritania
        <option value="MU">Mauritius
        <option value="YT">Mayotte
        <option value="MX">Mexico
        <option value="FM">Micronesia
        <option value="MD">Moldova
        <option value="MC">Monaco
        <option value="MN">Mongolia
        <option value="MS">Montserrat
        <option value="MA">Morocco
        <option value="MZ">Mozambique
        <option value="MM">Myanmar
        <option value="NA">Namibia
        <option value="NR">Nauru
        <option value="NP">Nepal
        <option value="NL">Netherlands
        <option value="AN">Neth Antilles
        <option value="NC">New Caledonia
        <option value="NZ">New Zealand
        <option value="NI">Nicaragua
        <option value="NE">Niger
        <option value="NG">Nigeria
        <option value="NU">Niue
        <option value="NF">Norfolk Island
        <option value="MP">North Mariana Is
        <option value="NO">Norway
        <option value="OM">Oman
        <option value="PK">Pakistan
        <option value="PW">Palau
        <option value="PS">Palestinian Ter
        <option value="PA">Panama
        <option value="PG">Papua New Guinea
        <option value="PY">Paraguay
        <option value="PE">Peru
        <option value="PH">Philippines
        <option value="PN">Pitcairn
        <option value="PL">Poland
        <option value="PT">Portugal
        <option value="PR">Puerto Rico
        <option value="QA">Qatar
        <option value="RE">R Union
        <option value="RO">Romania
        <option value="RU">Russia
        <option value="RW">Rwanda
        <option value="SH">St Helena
        <option value="KN">St Kitts/Nevis
        <option value="LC">St Lucia
        <option value="PM">St Pierre/Miq
        <option value="VC">St Vincent
        <option value="WS">Samoa
        <option value="SM">San Marino
        <option value="ST">SaoTome/Principe
        <option value="SA">Saudi Arabia
        <option value="SN">Senegal
        <option value="SC">Seychelles
        <option value="SL">Sierra Leone
        <option value="SG">Singapore
        <option value="SK">Slovakia
        <option value="SI">Slovenia
        <option value="SB">Solomon Is
        <option value="SO">Somalia
        <option value="ZA">South Africa
        <option value="GS">S.Georgia/Sndwch
        <option value="ES">Spain
        <option value="LK">Sri Lanka
        <option value="SD">Sudan
        <option value="SR">Suriname
        <option value="SJ">Svalbard-JanMay
        <option value="SZ">Swaziland
        <option value="SE">Sweden
        <option value="CH">Switzerland
        <option value="SY">Syrian Arab Rep
        <option value="TW">Taiwan
        <option value="TJ">Tajikistan
        <option value="TZ">Tanzania
        <option value="TH">Thailand
        <option value="TL">Timor-Leste
        <option value="TG">Togo
        <option value="TK">Tokelau
        <option value="TO">Tonga
        <option value="TT">Trinidad/Tobago
        <option value="TN">Tunisia
        <option value="TR">Turkey
        <option value="TM">Turkmenistan
        <option value="TC">Turks/Caicos
        <option value="TV">Tuvalu
        <option value="UG">Uganda
        <option value="UA">Ukraine
        <option value="AE">United Arab Emir
        <option value="GB">United Kingdom
        <option value="US">United States
        <option value="UM">US Minor Out Is
        <option value="UY">Uruguay
        <option value="UZ">Uzbekistan
        <option value="VU">Vanuatu
        <option value="VA">Vatican City
        <option value="VE">Venezuela
        <option value="VN">Viet Nam
        <option value="VG">Virgin Is, Brit
        <option value="VI">Virgin Is, US
        <option value="WF">Wallis/Futuna
        <option value="EH">Western Sahara
        <option value="YE">Yemen
        <option value="YU">Yugoslavia
        <option value="ZM">Zambia
        <option value="ZW">Zimbabwe</option>
 
      </select></span></font></td>
  </tr>
  <tr>
    <td width="30%" align="right" height="21">
      <p class="MsoNormal" style="TEXT-ALIGN: right" align="right"><font face="Arial" size="2">Phone:&nbsp;
      </font></p>
    </td>
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="15" size="12" name="pmt_contact_phone"></span></font></td>
 
  </tr>
  <tr>
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Email:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font></font></td>
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="50" size="30" name="pmt_sender_email"></span></font></td>
  </tr>
  <tr>
    <td width="100%" align="right" height="21" colspan="2">
 
      <hr size="0" color="#C0C0C0">
 
    </td>
  </tr>
  <tr>
    <td width="30%" align="left" height="21"><font face="Arial" size="2" color="#003366">Credit
      Card Details</font></td>
    <td width="70%" height="21"></td>
  </tr>
  <tr>
 
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Name
      on Card:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font> </font></td>
 
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="50" size="30" name="account_ccard_name"></span></font></td>
  </tr>
  <tr>
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Credit
      Card Type:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font> </font></td>
 
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><select name="account_ccard_type">
        <option value="VISA" selected>Visa
        <option value="MC">MasterCard
        <option value="AMEX">American Express</option>
 
      </select></span></font></td>
  </tr>
  <tr>
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Credit
      Card Number:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font> </font></td>
 
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><input maxLength="22" size="18" name="account_ccard_number"></span></font></td>
  </tr>
  <tr>
 
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Card
      Security Code:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font> </font></td>
    <td width="70%" height="21"><span style="FONT-SIZE: 12pt"><font face="Times New Roman" size="3"><input maxLength="6" size="4" name="account_ccard_csc"></font></span><font face="Arial" size="1">&nbsp;<u><font color="#003366"><a href="javascript:gsPopUp('creditcard.html', 600, 325)"><span class="gsSML2">What's this?</span></a></u></font></font></td>
  </tr>
 
  <tr>
    <td width="30%" align="right" height="21"><font face="Arial" size="2">Expiration:&nbsp;<font color="#FF0000">*&nbsp;&nbsp;</font>
      </font></td>
 
    <td width="70%" height="21"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><select name="account_ccard_exp_date[M]">
        <option value="1">Jan
        <option value="2">Feb
        <option value="3">Mar
        <option value="4">Apr
        <option value="5" selected>May
        <option value="6">Jun
        <option value="7">Jul
        <option value="8">Aug
        <option value="9">Sep
        <option value="10">Oct
        <option value="11">Nov
        <option value="12">Dec</option>
 
      </select><select name="account_ccard_exp_date[Y]">
 
        <option value="2006">2006
        <option value="2007">2007
        <option value="2008" selected>2008
        <option value="2009">2009
        <option value="2010">2010
        <option value="2011">2011
        <option value="2012">2012
        <option value="2013">2013
        <option value="2014">2014</option>
      </select></span></font></td>
  </tr>
 
  <tr>
 
    <td width="30%" align="right" height="21"></td>
    <td width="70%" height="21"></td>
  </tr>
   <tr>
    <td width="30%" align="left" height="21"><div align="center">
    
</div></td>
    <td width="70%" height="21" align="right">
 
<p>
         <input type="button" id="express" value="Pay Now" onclick="javascript:return getURL();">
    </p>
 
    </td>
 
  </tr>
  <tr>
    <td width="100%" align="right" height="21" bgcolor="#8CB8E3" colspan="2">&nbsp;</td>
  </tr>
 
</table>
</form>
                          
                      </td>
                      <td width="136" valign="top">
                        <table border="0" cellpadding="0" cellspacing="0" width="138">
                          <tr>
 
                            <td width="9"><img border="0" src="images/10x10.gif" width="10" height="10"></td>
                            <td width="125"></td>
                          </tr>
 
                          <tr>
                            <td width="9"></td>
                            <td width="125" height="15"></td>
                          </tr>
                          <tr>
                            <td width="9"></td>
 
                           
                  </table>
                <!-- InstanceEndEditable --></td>
 
              </tr>
          </table></td>
 
        </tr>
        <tr>
          <td height="29" background="images/footer_background.gif" bgcolor="#163A94"><table width="900" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="18" height="25">&nbsp;</td>
              
 
              <td width="77" class="navtext"><a href="links.htm" class="navtext"></a></td>
 
        
</body>
<!-- InstanceEnd -->

Open in new window

Web Languages and StandardsHTMLJavaScript

Avatar of undefined
Last Comment
carlyblack

8/22/2022 - Mon
ASKER
willnjen

I'm still looking at it and maybe the tag <form name="form1" method="post" action="" onsubmit=""> is generic and not correct to activate the JavaScript.  Does that sound correct?

Cheers

Will
hielo

>>Paymate will not help me fix the page
What's there to fix? What's the expected behaviour? You did not specify what is NOT working, nor how the page is supposed to work or what it should do.
hielo

You also have a lot of references to:
document._xclick

but there is not element named _xclick. For that statement to be valid you need to change this:
<form name="form1"

to this:
<form name="_xclick"

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER
willnjen

Hi Hielo

Sorry about not being clear.  When the user clicks the 'Pay Now' button at the bottom of the page, they should be redirected to https://www.paymate.com/PayMate/GenExpressPayment?mid=willcroxford¤cy=NZD&isCart=Y&popup=false&amt=765.00&amt_editable=&proditems=2008%20Season%20Pass%28765%29%20%3D1x765.00%20Plus%20total%20shipping%20charge%20%3D%200&return=http%253A//www.willnjen.com
or something similar depending on the entries made in the form.  

The address is created by the code

function getURL()
{
   var targeturl="https://www.paymate.com/PayMate/ExpressPayment?mid=willcroxford";
   targeturl=targeturl+"&pmt_sender_email="+document._xclick.pmt_sender_email.value;
   targeturl=targeturl+"&pmt_contact_firstname="+document._xclick.pmt_contact_firstname.value;
   targeturl=targeturl+"&pmt_contact_surname="+document._xclick.pmt_contact_surname.value;
   targeturl=targeturl+"&pmt_contact_phone="+document._xclick.pmt_contact_phone.value;
   targeturl=targeturl+"&regindi_pcode="+document._xclick.regindi_pcode.value;
   targeturl=targeturl+"&pmt_country="+document._xclick.pmt_country.value;
   targeturl=targeturl+"&regindi_address1="+document._xclick.regindi_address1.value;
   targeturl=targeturl+"&regindi_address2="+document._xclick.regindi_address2.value;
   targeturl=targeturl+"&regindi_sub="+document._xclick.regindi_sub.value;
   targeturl=targeturl+"&regindi_county="+document._xclick.account_ccard_city.value;
   targeturl=targeturl+"&amt_editable="+document._xclick.amt_editable.value;
   targeturl=targeturl+"&return="+document._xclick.return.value;
   targeturl=targeturl+"&back="+document._xclick.back.value;

At least I guess that's how the address is being created.  So basically a web address is created by merging the entries made in the form.

Problem is, nothing happens when you click the 'Pay Now' button.  It's dead.

Cheers

Will
ASKER CERTIFIED SOLUTION
hielo

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
olaraak

This page has plenty of errors :-)
Try to run it through HTML validator, f.ex http://onlinewebcheck.com/check.php

It'll give a glue what to fix.
ASKER
willnjen

Hielo

Your version is working and can be seen at http://www.willnjen.com/5hit/sample4.html 
Thanks so much!!  So what was the problem?  Was is the combination of the form name and the non existent form fields?

Once again, many thanks, the points are your!

Cheers

Will
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
hielo

>>Was is the combination of the form name and the non existent form fields?
Yes

>>Once again, many thanks
You are welcome!
carlyblack

thank you so much for this info.  you guys have helped so much on a thing that has taken me days!

Another tip you could use if you want to add extra fields such as amt_editable is put them in the form as a hidden field, that helps also.

double thumbs up!!