[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[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.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

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!

8.4

Passing Values To A Popup Window

Asked by amateur_dave in JavaScript

Tags: javascript, dropdown1, parsefloat, pass, popup


Hello Experts,

I’d be very grateful if someone could help with the following:

I would like to have a script collect field information over 4 pages and pass them through to a pop-up window for display once the user clicks the submit button on Page 4. If possible, I’d like the layout of the passed values to appear in tabular format just like as they appeared when the user was entering the information. I would also like the pop-up window to contain print and submit functions. Any help with this would be greatly appreciated.

Thank you very much in advance.
____________________________________________________________________________________________________________________

I’d like the table, column title and the values from the below pages to pass through to the pop-up.

PAGE 1:
----------
NAME1:
NAME2:
NAME3:

   |
   |
   V

PAGE2:
---------
FIELD1:
DATE1:
TICK:

   |
   |
   V

PAGE3:
---------
FIELD2:
FIELD3:
DATE1:
DATE2:

   |
   |
   V

PAGE4:
---------
COLUMN1:
COLUMN2:
COLUMN3:
COLUMN4:
COLUMN5:
COLUMN6:
COLUMN7:
COLUMN8:
TOTAL CREDIT:

   |
   |
   V

POPUP WINDOW:
---------------------

==========================================================================================
HTML
==========================================================================================

PAGE1:
---------

<html>
<head>
<script type="text/javascript" src="password.js">
</script>


</head>


<body>

<form name="page1" action="page2.html" method="get" >

<br><br><br><br><br><br><br><br>

<DIV align="center">

    <table border="2" align="center" cellpadding="0" cellspacing="0"  rules="all" >
        <td><strong>NAME1:</strong></td>
        <td><select name="name1" id="name2">
              <option value="NAME1">NAME1</option></select></td></tr>
       <td><strong>NAME2:</strong></td>
        <td><input type="text" id="name2" name="name2" size="2" maxlength="2" value="0000" readonly></td></tr>      
        <td><strong>NAME3:</strong></td>
        <td><select name="name3" id="name3">
              <option selected value="--- PLEASE SELECT ---">--- PLEASE SELECT ---</option>
              <option value="Person1">Person1</option>              
              <option value="Person2">Person2</option>
              <option value="Person3">Person3</option>
              <option value="Person4">Person4</option>
              <option value="Person5">Person5</option></select></td></tr>                                                                                  
        <td><strong>PASSWORD:</strong></td>       
        <td><input type="password" id="password"></td></tr>            
    </table>

<br>

<div align="center">

  <table width="268" height="45" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td> <div align="center">
            <input type="button" name="login" value="Submit" onClick="Login();">
          </div></td>
    </tr>
  </table>

</div>

</form>
</body>
</html

PAGE2:
---------

<html>
<head>

     <script language="JavaScript" src="calendar.js"></script>

     <script language="JavaScript" src="cookies.js"></script>

     <script language="JavaScript">

  <!-- Calendar stuff -->

  var calfld = "";
  var cal = new CalendarPopup();
  cal.setReturnFunction("showDate");
 
  cal.setMonthNames("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
     cal.setDayHeaders("S","M","T","W","T","F","S");
     cal.setWeekStartDay(1);
     function showDate(y,m,d) {
       var dag = " ";
       var mnd = " ";
       if ( calfld == "" )  {
         calfld = "date1";
       }
       if ( d < 10 )  {
         dag = "0" + d;
       } else {
         dag = d;
       }
       if ( m < 10 )  {
         mnd = "0" + m;
       } else {
         mnd = m;
       }
       document.getElementById(calfld).value = dag + "/" + mnd + "/" + y;
     }
     function getCalDate(ifield)    {
       calfld = ifield;
       var today          = new Date;
       var defDate     = document.getElementById(ifield).value;
       if (defDate.length>0) {
         if (defDate.indexOf(".")==-1) {
           var dateArray     = defDate.split("/");
         } else {
           var dateArray     = defDate.split(".");
         }
         today.setFullYear(dateArray[2],dateArray[1]-1,dateArray[0]);
       }
       cal.defaultDate = today;
     }

     var fields = new Array();
     var required = new Array(); // ******* NEW *******

     // Push the ID for each element that you want to use the value of
     fields.push("field1");

     required.push("date1"); // ******* NEW *******

     function checkValues()
     {
          if(!document.getElementById) return true;

     
          var field, name, value;

          var cookieArray = new Array();

          var returnValue = true;

          var errMsg = "";

          for(var i = 0; i < fields.length; i++)
          {
               field = document.getElementById(fields[i]);
               name = field.name;
               value = field.value;

               if(value.replace(/^\s+|\s+$/, "") == "")
               {
                    errMsg =  "You may not omit this field.";
               }
               else if(!/^[\d\-/]*$/.test(value))
               {
                    errMsg = "Only these characters may be used:\n\n0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -, /";
               }
               else if(!addValue(name, value, cookieArray))
               {
                    errMsg = "(" + field.title + ") \"" + value + "\" has already been used. Please enter another value.";
               }

               if(errMsg != "")
               {
                    alert(errMsg);
                    returnValue = false;
                    field.select();
                    field.focus();
                    break;
               }
          }

          // ******* NEW *******
          for(var i = 0; i < required.length; i++)
          {
               field = document.getElementById(required[i]);
               name = field.name;
               value = field.value;

               if(value.replace(/^\s+|\s+$/, "") == "")
               {
                    errMsg = "You may not omit this field.";

               }
               else if(!/^[\d\-/]*$/.test(value))
               {
                    errMsg = "Only these characters may be used:\n\n0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -, /";
               }

               if(errMsg != "")
               {
                    alert(errMsg);
                    returnValue = false;
                    field.select();
                    field.focus();
                    break;
               }
          }

          if(!document.getElementById("tickpick").checked)
          {
               alertalert("You must click the checkbox.");
               returnValue = false;
          }


          // Wait until you know all fields are valid before setting the cookie
          if(returnValue)
          {
               for(var i = 0; i < cookieArray.length; i++)
               {
                    createCookie(cookieArray[i].name, cookieArray[i].value, cookieArray[i].expires);
               }
          }

          return returnValue;
     }

     function addValue(name, value, cookieArray)
     {
          var oldCookie = getCookie(name);

          var delimeter = "/:.|.:\\";

          var oldValues = oldCookie.split(delimeter);

          var newCookie = oldCookie;

          for(var i = 0; i < oldValues.length; i++)
          {
               if(value.toLowerCase() == oldValues[i].toLowerCase())
               {
                    return false;
               }
          }

          if(oldCookie.length > 0)
          {
               newCookie += delimeter;
          }

          newCookie += value;

          var date = new Date();

          date.setFullYear(date.getFullYear() + 10); // Expires in 10 years

          cookieArray.push(new cookieObject(name, newCookie, date.toGMTString()));

          return true;
     }
     
     function cookieObject(name, value, expires)
     {
          this.name = name;
          this.value = value;
          this.expires = expires;
     }

</script>

</head>

<body>

<form action="page3.html" method="GET" onSubmit="javascript:return checkValues();">

<br><br><br><br><br><br>

<div align="center">

    <table border="2" align="center" cellpadding="0" cellspacing="0"  rules="all" >
      <tr>
        <th align="left"><div align="center">FIELD1</div></th>
        <th align="left"><div align="center">DATE1</div></th>
      </tr>
      <tr>
        <td><div align="center">
            <input type="text" id="field1" name="field1" title="FIELD1" size="15" maxlength="15">
          </div></td>
        <td><div align="center">
            <input type="text" id="date1" name="date1" title="DATE1" size="8" maxlength="10" readonly="readonly">
            <img name="scal" src="show-calendar.gif" width=24 height=22 border=0  valign="center" onclick="getCalDate('date1');cal.showCalendar('scal');returnfalse;"></div></td>
      </tr>
    </table>

</div>

  <br><br><br>
  <div align="center">
    <table width="41%" height="55" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <TD width="63%"><INPUT type="checkbox" id="tickpick" name="tickpick">Tick</TD>
        <td width="37%"><div align="center">
            <input type="submit" value="Submit">
          </div></td>
      </tr>
    </table>
  </div>
</form>
</body>
</html>

PAGE3:
---------

<html>
<head>

     <script language="JavaScript" src="calendar.js"></script>

     <script language="JavaScript" src="cookies.js"></script>

     <script language="JavaScript">

  <!-- Calendar stuff -->

  var calfld = "";
  var cal = new CalendarPopup();
  cal.setReturnFunction("showDate");
 
  cal.setMonthNames("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
     cal.setDayHeaders("S","M","T","W","T","F","S");
     cal.setWeekStartDay(1);
     function showDate(y,m,d) {
       var dag = " ";
       var mnd = " ";
       if ( calfld == "" )  {
         calfld = "date2";
       }
       if ( d < 10 )  {
         dag = "0" + d;
       } else {
         dag = d;
       }
       if ( m < 10 )  {
         mnd = "0" + m;
       } else {
         mnd = m;
       }
       document.getElementById(calfld).value = dag + "/" + mnd + "/" + y;
     }
     function getCalDate(ifield)    {
       calfld = ifield;
       var today          = new Date;
       var defDate     = document.getElementById(ifield).value;
       if (defDate.length>0) {
         if (defDate.indexOf(".")==-1) {
           var dateArray     = defDate.split("/");
         } else {
           var dateArray     = defDate.split(".");
         }
         today.setFullYear(dateArray[2],dateArray[1]-1,dateArray[0]);
       }
       cal.defaultDate = today;
     }

     var fields = new Array();
     var required = new Array(); // ******* NEW *******

     // Push the ID for each element that you want to use the value of
     fields.push("field2");
     fields.push("field3");

     required.push("date2"); // ******* NEW *******
     required.push("date3"); // ******* NEW *******

     function checkValues()
     {
          if(!document.getElementById) return true;

     
          var field, name, value;

          var cookieArray = new Array();

          var returnValue = true;

          var errMsg = "";

          for(var i = 0; i < fields.length; i++)
          {
               field = document.getElementById(fields[i]);
               name = field.name;
               value = field.value;

               if(value.replace(/^\s+|\s+$/, "") == "")
               {
                    errMsg =  "You may not omit this field.";
               }
               else if(!/^[\d\-/]*$/.test(value))
               {
                    errMsg = "Only these characters may be used:\n\n0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -, /";
               }
               else if(!addValue(name, value, cookieArray))
               {
                    errMsg = "(" + field.title + ") \"" + value + "\" has already been used. Please enter another value.";
               }

               if(errMsg != "")
               {
                    alert(errMsg);
                    returnValue = false;
                    field.select();
                    field.focus();
                    break;
               }
          }

          // ******* NEW *******
          for(var i = 0; i < required.length; i++)
          {
               field = document.getElementById(required[i]);
               name = field.name;
               value = field.value;

               if(value.replace(/^\s+|\s+$/, "") == "")
               {
                    errMsg = "You may not omit this field.";
               }
               else if(!/^[\d\-/]*$/.test(value))
               {
                    errMsg = "Only these characters may be used:\n\n0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -, /";
               }

               if(errMsg != "")
               {
                    alert(errMsg);
                    returnValue = false;
                    field.select();
                    field.focus();
                    break;
               }
          }


          // Wait until you know all fields are valid before setting the cookie
          if(returnValue)
          {
               for(var i = 0; i < cookieArray.length; i++)
               {
                    createCookie(cookieArray[i].name, cookieArray[i].value, cookieArray[i].expires);
               }
          }

          return returnValue;
     }

     function addValue(name, value, cookieArray)
     {
          var oldCookie = getCookie(name);

          var delimeter = "/:.|.:\\";

          var oldValues = oldCookie.split(delimeter);

          var newCookie = oldCookie;

          for(var i = 0; i < oldValues.length; i++)
          {
               if(value.toLowerCase() == oldValues[i].toLowerCase())
               {
                    return false;
               }
          }

          if(oldCookie.length > 0)
          {
               newCookie += delimeter;
          }

          newCookie += value;

          var date = new Date();

          date.setFullYear(date.getFullYear() + 10); // Expires in 10 years

          cookieArray.push(new cookieObject(name, newCookie, date.toGMTString()));

          return true;
     }
     
     function cookieObject(name, value, expires)
     {
          this.name = name;
          this.value = value;
          this.expires = expires;
     }

</script>

</head>

<body>

<form action="page4.html" method="GET" onSubmit="javascript:return checkValues();">

<br><br><br><br><br><br>

<div align="center">

    <table border="2" align="center" cellpadding="0" cellspacing="0"  rules="all" >
      <tr>
        <th align="left"><div align="center">FIELD2</div></th>
        <th align="left"><div align="center">FIELD3</div></th>
        <th align="left"><div align="center">DATE2</div></th>
        <th align="left"><div align="center">DATE3</div></th>
      </tr>
      <tr>
        <td><div align="center">
            <input type="text" id="field2" name="field2"" title="FIELD2" size="2" maxlength="2">
          </div></td>
        <td><div align="center">
            <input type="text" id="field3" name="field3" title="FIELD3" size="13" maxlength="14">
          </div></td>
        <td><div align="center">
            <input type="text" id="bgdate" name="bgdate" title="Bank Giro Date" size="8" maxlength="10" readonly="readonly">
            <img name="scal" src="show-calendar.gif" width=24 height=22 border=0  valign="center" onclick="getCalDate('date2');cal.showCalendar('scal');returnfalse;"></div></td>
        <td><div align="center">
            <input type="text" id="sbdate" name="sbdate" title="Submission Date" size="8" maxlength="10" readonly="readonly">
            <img name="scal" src="show-calendar.gif" width=24 height=22 border=0  valign="center"  
              onclick="getCalDate('date3');cal.showCalendar('scal');return false;" ></div></td>
      </tr>
    </table>

</div>

  <br><br><br>
  <div align="center">
    <table width="41%" height="55" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="37%"><div align="center">
            <input type="submit" value="Submit">
          </div></td>
      </tr>
    </table>
  </div>
</form>
</body>
</html>

PAGE4:
---------

<html>
<head>
<script language="javascript">
function ShowAlert (theForm)
{
     var str  = "TOTAL DEBIT £ | " + theForm.totaldebit.value + "\n";
          str += "TOTAL CREDIT £ | " + theForm.totalcredit.value  + "\n";
          str += "THIS AMOUNT SHOULD =  £ 0.0 | (Current value is " + theForm.totalamount.value + ")\n";
     
     alert (str);
     if (parseFloat (theForm.totaldebit.value) != parseFloat (theForm.totalcredit.value)) {
          return false;
     }

     if (parseFloat (theForm.totalamount.value) == 0.0) {
          return true;
     }
     return false;
}

function perRound(num, precision) {
     var precision = 3;
     precision = parseInt(precision);
     var result1 = num * Math.pow(10, precision);
     var result2 = Math.round(result1);
     var result3 = result2 / Math.pow(10, precision);
     return zerosPad(result3, precision);
}

function zerosPad(rndVal, decPlaces) {
     var valStrg = rndVal.toString();
     var decLoc = valStrg.indexOf(".");
     if (decLoc == -1) {
          decPartLen = 0;
          valStrg += decPlaces > 0 ? "." : "";
     }
     else {
          decPartLen = valStrg.length - decLoc - 1;
     }
     var totalPad = decPlaces - decPartLen;    
     if (totalPad > 0) {
          // Pad the string with 0s
          for (var cntrVal = 1; cntrVal <= totalPad; cntrVal++)
               valStrg += "0";
     }
     return valStrg;
}

function calcRound(num) {
     result=Math.floor(num)+"."
     n = result.length

     var cents=100*(num-Math.floor(num))+0.5
     result += Math.floor(cents/10)
     result += Math.floor(cents%10)

     return(result)
}


function clear_field(field) {
     if (field.value==field.defaultValue) {
          field.value=''
     }
}

function calcTotal(theForm) {
  var tempvar1 = 0;
  var tempvar2 = 0;
  var tempvar3 = 0;
  //alert (theForm.name);
  tempvar1 = parseFloat(theForm.debit1.value);
  tempvar1 = (parseFloat(tempvar1) + parseFloat(theForm.debit2.value));
  tempvar1 = (parseFloat(tempvar1) + parseFloat(theForm.debit3.value));
  tempvar1 = (parseFloat(tempvar1) + parseFloat(theForm.debit4.value));
  tempvar1 = (parseFloat(tempvar1) + parseFloat(theForm.debit5.value));
  tempvar1 = (parseFloat(tempvar1) + parseFloat(theForm.debit6.value));
  tempvar1 = (parseFloat(tempvar1) + parseFloat(theForm.debit7.value));
  tempvar1 = (parseFloat(tempvar1) + parseFloat(theForm.debit8.value));
  tempvar1 = (parseFloat(tempvar1) + parseFloat(theForm.debit9.value));
  tempvar1 = (parseFloat(tempvar1) + parseFloat(theForm.debit10.value));
 
  //
  var rowCntFld = document.getElementById("row_count");
  if (rowCntFld != null) {
       //alert (rowCntFld.value);
       for (var fx=1; fx <= (rowCntFld.value); fx++) {
         var str = 'document.'+theForm.name+'.fact_'+fx;
          //alert (str);
              tempvar2 += parseFloat( eval(str).value);
       }
  }
  else {
       tempvar2 = parseFloat(document.members.fact_1.value);
  }
 

  tempvar3 = (parseFloat(tempvar1) - parseFloat(tempvar2));

  tempvar1 = (Math.round(tempvar1 * 100) /100);
  tempvar2 = (Math.round(tempvar2 * 100) /100);
  tempvar3 = (Math.round(tempvar3 * 100) /100);

  theForm.totaldebit.value = tempvar1.toFixed(2);
  document.members.totalcredit.value = tempvar2.toFixed(2);
  document.members.totalamount.value = tempvar3.toFixed(2);
  return false;
}


var params=new Array(4);
//showmem(document.members, 1);

function showmem(form, row) {
     var memFlds= new Array ("memname", "dropdown", "dropdown1", "dropdown2", "dropdown3");
     var listobj = eval("document."+form.name + ".memlist_" + row);
     var entryobj = eval("document."+ form.name + ".entry_" + row);
     document.members.num.value=listobj.length;
     var which=listobj.selectedIndex;
     splt(listobj[which].value);
     entryobj.value=which+1;
      for (var mx=0; mx < memFlds.length; mx++) {
           var fld = eval ('document.' + form.name + '.' + memFlds[mx] + '_' + row);
            if (fld) {
                 fld.value = params[mx];
            }
      }
     
      /*
     for (i=(row-1)*9+2;i<(row-1)*9+7;i++) {
          form.elements[i].value=params[i-((row-1)*9)-2];
     };
      */
}

function splt(choice) {
     p=0;
     for (i=0;i<6;i++) {
          a=choice.indexOf("|",p);
          params[i]=choice.substring(a,p);
          p=a+1;
     }
}

function validateNumber(fld) {
     if (fld.value.length > 0) {
          if(isNaN(fld.value)) {
               alert ('Invalid Characters');
               return false;
          }
          else {
               fld.value = parseFloat(fld.value).toFixed(2);
          }
     }
     else {
          fld.value = "0.00";
     }
     calcTotal(fld.form);
}

function validateForm(objForm){
     var strError="";
     var objInput="";
     /* Debug Loop
     for(x=1;x<=parseInt(objForm.row_count.value);x++){
          if(!document.getElementById("fact"+"memlist"+x).value){
               alert("Fact " + x +" is empty");
          }
     }*/
     if(!document.getElementById("fact_"+document.getElementById("row_count").value).value){
          alert("Please enter an amount or delete row");
          return false;
     }
}
     
function delRow(aTable){
     var rowCFld = document.getElementById("row_count");
     if (rowCFld.value < 2) { alert ('Can not delete row'); }

     var factFld= eval("document.members.fact_"+ document.getElementById("row_count").value);

     if(!factFld.value){
          if(aTable.rows.length > 1){
          aTable.deleteRow(aTable.rows.length-1);
          document.getElementById("row_count").value=parseInt(document.getElementById("row_count").value)-1;  
          }
     }
     else{
          if(confirm("There is information in this entry, by deleting you will have to start the transaction again")){
               aTable.deleteRow(aTable.rows.length-1);
               document.getElementById("row_count").value=parseInt(document.getElementById("row_count").value)-1;    
          }
     }
     calcTotal(rowCFld.form);
}
function addRow(aTable) {
     
var factFld= eval("document.members.fact_"+ document.getElementById("row_count").value);
     //alert (factFld.value);
     if(factFld.value >0){
          document.getElementById("row_count").value=parseInt(document.getElementById("row_count").value)+1;
          var iNumFacts = parseInt(document.getElementById("row_count").value)
          aRow = aTable.insertRow(aTable.rows.length);
          aCell0 = aRow.insertCell(0);
          aCell1 = aRow.insertCell(1);
          aCell2 = aRow.insertCell(2);
          aCell3 = aRow.insertCell(3);
          aCell4 = aRow.insertCell(4);
          aCell5 = aRow.insertCell(5);
          aCell6 = aRow.insertCell(6);
          aCell7 = aRow.insertCell(7);
          aCell0.innerHTML = " " + iNumFacts +"";
          aCell1.innerHTML = '<select name="memlist_' + iNumFacts + '" onChange="showmem(this.form, ' + iNumFacts + ')" id="tbHRCCInputFact" readonly="readonly"><option value="111111|         |111111|       |11|0.00|"<option>NAME 1<option value="222222|          |222222|       |22|0.00|" <option>NAME 2</option><option value="333333|           |      |3333333|33|0.00|" <option>NAME 3</option><option value="444444|          |444444|      |44|0.00|"<option>NAME 4</option></selectS</option></select>';
          aCell2.innerHTML = '<input type="hidden" name="entry_' + iNumFacts + '" value=""><input type="text" name="memname_' + iNumFacts + '" id="tbHRCCInputFact" size="10" value="" readonly="readonly"></input>';
          aCell3.innerHTML = '<input type="text" name="dropdown_' + iNumFacts + '" id="tbHRCCInputFact" size="10" value="" readonly="readonly"></input>';
          aCell4.innerHTML = '<input type="text" name="dropdown1_' + iNumFacts + '" id="tbHRCCInputFact" size="10" value="" readonly="readonly"></input>';
          aCell5.innerHTML = '<input type="text" name="dropdown2_' + iNumFacts + '" id="tbHRCCInputFact" size="10" value="" readonly="readonly"></input>';
          aCell6.innerHTML = '<input type="text" name="dropdown3_' + iNumFacts + '" id="tbHRCCInputFact" size="10" value="" readonly="readonly"></input>';
          aCell7.innerHTML = '<input type="text" name="fact_' + iNumFacts +'" id="tbHRCCInputFact" size="10" value="0.0" onBlur="validateNumber(this);" onfocus="clear_field(this);"><input type="hidden" value="" name="num"></input>';
     }
     else {
          alert("Cannot create another line until amount is entered in  this row");
     }
}
</script>
</head>
<body>

<br>

<form name="members">
<table border="2" align="center" cellpadding="0" cellspacing="0">
     <tr>
          <td width="150"><div align="left">Notes &pound;50</div></td>
          <td width="85"> <div align="left"><input name="debit1" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>
     </tr>
     <tr>
          <td><div align="left">Notes &pound;20</div></td>
          <td><div align="left"><input name="debit2" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>            
     </tr>
     <tr>
          <td><div align="left">Notes &pound;10</div></td>
          <td> <div align="left"><input name="debit3" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>            
     </tr>
     <tr>
          <td><div align="left">Notes &pound;5</div></td>
          <td><div align="left"><input name="debit4" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>
     </tr>
     <tr>
          <td><div align="left">Coins &pound;2</div></td>
          <td><div align="left"><input name="debit5" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>
     </tr>
     <tr>
          <td><div align="left">Coins &pound;1</div></td>
          <td><div align="left"><input name="debit6" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>                                
     </tr>
     <tr>
          <td><div align="left">50p</div></td>
          <td><div align="left"><input name="debit7" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>
     </tr>
     <tr>
          <td><div align="left">Silver</div></td>
          <td><div align="left"><input name="debit8" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>
     </tr>
     <tr>
          <td><div align="left">Bronze</div></td>
          <td><div align="left"><input name="debit9" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>
     </tr>
     <tr>
          <td><div align="left">Cheques</div></td>
          <td><div align="left"><input name="debit10" type="text" size="5" Value="0.00" onFocus="clear_field(this)" onBlur="validateNumber(this);"></div></td>
     </tr>
     <tr>
          <td align="center" colspan="2">
               <div align="right">
               <input name="submit" type="button" onclick="calcTotal(this.form); return false;" value="Calculate">
               <input name="reset" type="reset" value="Clear Values">
               </div>
          </td>
     </tr>
     <tr>
          <td><div align="center"><strong>TOTAL DEBIT £</strong></div></td>
          <td><div align="left"><input name="totaldebit" type="text" size="5" Value="0.00" readonly></div></td>
     </tr>
</table>
<table border="1" cellpadding="1" cellspacing="1" align="center" id="tbHRCCInputFact">
     <tr>
          <td align="center"><strong>COLUMN 1</strong></td>
          <td align="center"><strong>COLUMN 2</strong></td>
          <td align="center"><strong>COLUMN 3</strong></td>
          <td align="center"><strong>COLUMN 4</strong></td>
          <td align="center"><strong>COLUMN 5</strong></td>
          <td align="center"><strong>COLUMN 6</strong></td>
          <td align="center"><strong>COLUMN 7</strong></td>
          <td align="center"><strong>COLUMN 8</strong></td>
     </tr>
     <tr valign="top">    
          <td nowrap>1</td>
          <td><select name="memlist_1" onChange="showmem(this.form, 1)" id="tbHRCCInputFact" readonly="readonly"><option value="111111|         |111111|       |11|0.00|"<option>NAME 1<option value="222222|          |222222|       |22|0.00|" <option>NAME 2</option><option value="333333|           |      |3333333|33|0.00|" <option>NAME 3</option><option value="444444|          |444444|      |44|0.00|"<option>NAME 4</option></selectS></option></select></td>
          <td><input type="hidden" name="entry_1" value="">
             <input type="text" name="memname_1" id="tbHRCCInputFact" size="10" value="" readonly="readonly">
          </td>
          <td><input type="text" name="dropdown_1" id="tbHRCCInputFact" size="10" value="" readonly="readonly"></td>
          <td><input type="text" name="dropdown1_1" id="tbHRCCInputFact" size="10" value="" readonly="readonly"></td>
          <td><input type="text" name="dropdown2_1" id="tbHRCCInputFact" size="10" value="" readonly="readonly"></td>
          <td><input type="text" name="dropdown3_1" id="tbHRCCInputFact" size="10" value="" readonly="readonly"></td>
          <td><input type="text" name="fact_1" id="tbHRCCInputFact" size="10" value="0.00" onBlur="validateNumber(this);" onfocus="clear_field(this);"></input></td>
     </tr>
     <input type="hidden" value="" name="num">
</table>
     <p align="center">
     <input type="button" onClick="addRow(document.getElementById('tbHRCCInputFact'))" value="ADD ROW"></td>
     <input type="button" onClick="delRow(document.getElementById('tbHRCCInputFact'))" value="DELETE ROW"></td>
</tr>

<br><br>
<table width="627" border="1" align="center" cellpadding="1"  cellspacing="0" rules="0">
     <tr>
          <th width="546"><div align="center">TOTAL CREDIT &pound;</div></th>          
          <th width="75"><div align="center">
               <input name="totalcredit" type="text" size="5" value="0.00" onFocus="clear_field(this)"></div></th>
     </tr>
</table>

<BR>    

<table width="627" border="1" align="center" cellpadding="1"  cellspacing="0" rules="0">
     <tr>
          <th width="546"><div align="center">THIS AMOUNT SHOULD = 0</div></th>
          <th width="75"><div align="center">
               <input name="totalamount" type="text" size="5" value="0.00" onFocus="clear_field(this)"></div></th>
          </tr>
</table>


<table align="center">
     <tr>
          <td>
               <input type="hidden" name="topicid" value="#getCategoryInfo.TOPICID#">
               <input type="hidden" name="row_count"  id="row_count" value="1">
          </td>
     </tr>
     <tr>
          <td align="center"><input type="button" name="cancel" value="CANCEL" onClick="javascript:window.close()">
          <td align="center"><input type="submit" name="butSubmit" value="SUBMIT"></td>
     </tr>
</table>
</form>
<script language="javascript">
showmem(document.members, 1);
</script>
</body>
</html>




[+][-]11/04/05 12:50 PM, ID: 15227698Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/04/05 02:43 PM, ID: 15228551Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/05 02:44 PM, ID: 15228564Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/05 03:00 PM, ID: 15228671Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: JavaScript
Tags: javascript, dropdown1, parsefloat, pass, popup
Sign Up Now!
Solution Provided By: pravinasar
Participating Experts: 3
Solution Grade: A
 
[+][-]11/04/05 07:05 PM, ID: 15229541Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/05/05 06:05 AM, ID: 15230865Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/05/05 06:57 AM, ID: 15230954Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/07/05 06:59 AM, ID: 15239196Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/07/05 08:29 AM, ID: 15240088Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/07/05 12:04 PM, ID: 15242140Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89