6 Replies - 385 Views - Last Post: 13 March 2012 - 03:14 PM

#1 admjhosef  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 42
  • Joined: 02-October 10

Question in my program

Posted 13 March 2012 - 08:23 AM

i am thinking how can i do in my program when i click the add button for pencil the item will be show in the listbox then when i click again the button in pencil will be show or popup the item is in the order or in the listbox and it will clickable again when i remove the item in the listbox

can you help me please... thanks in advance

<html>
		<head>
			<link rel="stylesheet" type="text/css" href="external.css"/>
			<title>
				AMF / Aldric's
			</title>
				<script language="javascript" style = "text/javascript">
						var add = new Array;
		var sub = new Array;
		var bilang=0;
		
		
		function compute(ope, element)
		{
			document.oform.quantity.value=bilang;
			var bilang=element.value;
			
			if(ope == "add")
			{
				bilang++;
				element.value=bilang;
			}
			else if(ope == "sub")
			{
				if (bilang == 0)
				{
					element.value=0;
				}
				else{
					bilang--;
					element.value=bilang;
				}
			}
		}
		
		var frm;
		var field1;
		var field2;
		var x =0;
		var Ftotal = 0;


		function isNumberKey(evt)
		{
			var charCode = (evt.which) ? evt.which : event.keyCode
			if (charCode > 31 && (charCode < 48 || charCode > 57))
			return false;
			return true;
		}


		function UnPopulate() {
		  var t = field2.length-1;
		  for(i=t; i>=0; i--) {
			if (field2.options[i].selected) {
			  field2.options[i] = null;
			  x--;
			}
		  }
		}

		function AddItem(N) 
		{
			if(document.oform.quantity[N].value == 0)
			{
			  alert("Please Put some Quantity in " + document.oform.NEWITEM[N].value);
			}
			else
			{
			  var l = field2.length;
			  var total;
			  newOpt=document.oform.NEWITEM[N].value;
			  newOpt1=document.oform.quantity[N].value;
			  newOpt2=document.oform.NEWITEM3[N].value;
			  total = newOpt1 * newOpt2;
			  Ftotal += total;
			  field2.options[l] = new Option(newOpt+" X " + newOpt1+ " = " +  total);
			  document.oform.Total.value = Ftotal;
			  x++;
			}
		}

		window.onload = function() {
		  frm=document.oform;
		  field1=frm.SelectBox1;
		  field2=frm.SelectBox2;
		}
		function able_disable()
		{
			var val = 0;
			for( i = 0; i < document.oform.ModePayment.length; i++ )
			{
				if( document.oform.ModePayment[i].checked == true )
				{
					val = document.oform.ModePayment[i].value;
					if(val=='Deliver')
					{
						document.oform.CustomerAddress.disabled=false;
						document.oform.Refnum.disabled=false;
						document.oform.CustomerAddress.focus();
					}
					else
					{
						document.oform.CustomerAddress.disabled=true;
						document.oform.Refnum.disabled=true;
					}
				}
			}
		}
		
		function selectall() {
			for( i = 0; i <= document.oform.SelectBox2.length; i++ ){
				field2.options[i].selected = true;
				}
			}
			
		
		function show_toys()
		{
				document.getElementById('Toys').style.visibility = "visible";
				document.getElementById('SchoolSupplies').style.visibility = "hidden";
				document.getElementById('FassionAccessories').style.visibility = "hidden";
				document.getElementById('CellphoneAccessories').style.visibility = "hidden";
				document.getElementById('gamecards').style.visibility = "hidden"; 
		}
		
		function show_SchoolSupplies()
		{
				document.getElementById('Toys').style.visibility = "hidden";
				document.getElementById('SchoolSupplies').style.visibility = "visible";
				document.getElementById('FassionAccessories').style.visibility = "hidden";
				document.getElementById('CellphoneAccessories').style.visibility = "hidden";
				document.getElementById('gamecards').style.visibility = "hidden";
		}

		function show_FashionAccessories()
		{
				document.getElementById('Toys').style.visibility = "hidden";
				document.getElementById('SchoolSupplies').style.visibility = "hidden";
				document.getElementById('FassionAccessories').style.visibility = "visible";
				document.getElementById('CellphoneAccessories').style.visibility = "hidden";
				document.getElementById('gamecards').style.visibility = "hidden";
		}

		function show_CPAccessories()
		{
				
				document.getElementById('Toys').style.visibility = "hidden";
				document.getElementById('SchoolSupplies').style.visibility = "hidden";
				document.getElementById('FassionAccessories').style.visibility = "hidden";
				document.getElementById('CellphoneAccessories').style.visibility = "visible";
				document.getElementById('gamecards').style.visibility = "hidden";
		}

		function show_GameCards()
		{
				document.getElementById('Toys').style.visibility = "hidden";
				document.getElementById('SchoolSupplies').style.visibility = "hidden";
				document.getElementById('FassionAccessories').style.visibility = "hidden";
				document.getElementById('CellphoneAccessories').style.visibility = "hidden";
				document.getElementById('gamecards').style.visibility = "visible";
		}
	

				</SCRIPT>
		</head>


<BODY>
<center>
<table width=980>
				<tr>
					<td id="header"></td>
				</tr>
				
				<tr><td>
						<table width=100% align="center">
							<tr>
								<td class=navi height=35 width=190><p class="navigation"><a href="home.htm">HOME</a></p></td>
								<td class=navi height=35 width=190><p class="navigation"><a href="products.htm">PRODUCTS</a></p></td>
								<td class=navi height=35 width=190><p class="navigation"><a href="whatsnew.htm">WHAT'S NEW?</a></p></td>
								<td class=navi height=35 width=190><p class="navigation"><a href="aboutus.htm">ABOUT US</a></p></td>
								<td class=navi height=35 width=190><p class="navigation"><a href="developers.htm">DEVELOPERS</a></p></td>
							</tr>
						
						</table>
					</td>
				</tr>
</table>

<FORM name=oform ACTION = "mailto:john_joseph_paragua@yahoo.com" method = "post" enctype="text/plain">
<table width=980 height=600 >
								<td height=590 width=140>
									
										PRODUCTS: <br>
										<a href = " #" onclick = "show_SchoolSupplies()">School Supplies</a> <br>
										<a href = " #" onclick = "show_toys()">Toys</a><br>
										<a href = " #" onclick ="show_FashionAccessories()">Fashion Accessories</a><br>
										<a href = " #" onclick = "show_CPAccessories()">Cellphone Accessories</a> <br>
										<a href = " #" onclick = "show_GameCards()">Game Cards</a> <br>				 
									
								</td>
								<td width=480>
									<div id="SchoolSupplies">
									<table cellpadding="3" height=590 class=prod_table>
										
											<tr>
											<h1>School Supplies</h1>											
												<td><p>Pencil/box</p>
													<INPUT TYPE="TEST" name="NEWITEM" value = "Pencil/box" disabled = "disabled" style="WIDTH: 1px; HEIGHT: 0px; text-align:center; visibility:hidden"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value1" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value1'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value1'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" value = "55" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(0)" VALUE="Add Item">
												</td>											
												
												<td><p>Intermediate Pad/Bundle</p>
													<INPUT TYPE="TEST" name="NEWITEM" value = "Intermediate Pad/Bundle" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center; visibility:hidden"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value2" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value2'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value2'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(1)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value3" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value3'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value3'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(2)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value4" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value4'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value4'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(3)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value5" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value5'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value5'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(4)" VALUE="Add Item">
												</td>								
											</tr>
										</div>
									</table>
								
									
									<div id="Toys">	
										<table cellpadding="3" height=590 class=prod_table>
											
											<tr>
											<h1>Toys</h1>
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value6" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value6'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value6'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(5)" VALUE="Add Item">
												</td>											
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value7" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value7'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value7'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(6)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value8" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value8'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value8'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(7)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value9" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value9'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value9'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(8)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value10" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value10'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value10'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(9)" VALUE="Add Item">
												</td>								
											</tr>
										</table>
									</div>
										
									<div id ="FassionAccessories">
										<table cellpadding="3" height=590 class=prod_table>
											<h1>Fashion Accessories</h1>
											<tr>
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value11" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value11'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value11'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(10)" VALUE="Add Item">
												</td>											
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value12" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value12'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value12'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(11)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value13" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value13'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value13'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(12)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value14" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value14'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value14'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(13)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value15" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value15'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value15'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(14)" VALUE="Add Item">
												</td>								
											</tr>
										</table>
									
									</div>	
									<div id ="CellphoneAccessories">
										<table cellpadding="3" height=590 class=prod_table>
											<h1>Cellphone Accessories</h1>
											<tr>
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value16" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value16'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value16'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(15)" VALUE="Add Item">
												</td>											
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value17" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value17'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value17'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(16)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value18" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value18'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value18'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(17)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value19" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value19'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value19'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(18)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value20" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value20'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value20'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(19)" VALUE="Add Item">
												</td>								
											</tr>
										</table>
									</div>
									<div  id="gamecards">
										
										
										<table cellpadding="3" height=590 class=prod_table>
											<h1>Game Cards</h1>
											<tr>
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value21" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value21'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value21'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(20)" VALUE="Add Item">
												</td>											
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value22" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value22'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value22'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(21)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value23" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value23'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value23'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(22)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value24" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value24'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value24'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(23)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value25" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value25'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value25'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(24)" VALUE="Add Item">
												</td>								
											</tr>
										</table>
									</div>			
								</td>

	
								<td width=280 height=590><form name=pass >
								
								<SELECT NAME="SelectBox2" MULTIPLE  STYLE="width:100%; height:250px;text-align:center"></SELECT>
									
									<INPUT TYPE=button onclick="UnPopulate()" VALUE="Remove" ><br>
									TOTAL: <input type="text" name=Total>  
								<fieldset>
								<legend>Personal Form:</legend>
									<center>Name: <input type = "text" name = "CustomerName" STYLE = "	width: 300px"><br>
									Email Address:<br> <input type = "text" name = "CustomerEAdd" STYLE = "	width: 300px"><br>
									Contact Number:<br> <input type = "text" name = "ContactNumber" STYLE = "	width: 300px"><br>
									Mode of Payment: <br>
									<input type = "radio" name = "ModePayment" Value = "PickUp" onclick = "able_disable()" checked>Pick Up <br>
									<input type = "radio" name = "ModePayment" Value = "Deliver" onclick = "able_disable()">Delivery <br>
									Address: <input type = "text" name = "CustomerAddress" disabled = "disabled" STYLE = "	width: 300px"><br>
									Smart Money ref#: <input type = "text" name = "Refnum" disabled = "disabled" STYLE = "	width: 300px"></center>
									<br>
									<input type="submit" name="submit" value="Submit" onclick="selectall()"></form>
									</fieldset>
									 
									

								</td>
							</table>
</FORM>
</center>
</BODY>
</html>




Is This A Good Question/Topic? 0
  • +

Replies To: Question in my program

#2 admjhosef  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 42
  • Joined: 02-October 10

Re: Question in my program

Posted 13 March 2012 - 09:13 AM

and when i remove the item in the list box the total is not decreasing

like

in the list box

pencil 55
ballpen 22

total is 77

when i remove the ballpen

its still 77 that suppose to be 55 only
Was This Post Helpful? 0
  • +
  • -

#3 chinchang  Icon User is offline

  • Indie Game Developer
  • member icon

Reputation: 192
  • View blog
  • Posts: 725
  • Joined: 22-December 08

Re: Question in my program

Posted 13 March 2012 - 09:58 AM

Did you try debugging your code through browser console? Does your code that updates the count even gets called?
Was This Post Helpful? 0
  • +
  • -

#4 admjhosef  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 42
  • Joined: 02-October 10

Re: Question in my program

Posted 13 March 2012 - 10:05 AM

yeah i try it but it not working ....

can you please help me... i cannot think the solution
Was This Post Helpful? 0
  • +
  • -

#5 admjhosef  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 42
  • Joined: 02-October 10

Re: Question in my program

Posted 13 March 2012 - 11:32 AM

here is the updated code but not working


<html>
		<head>
			<link rel="stylesheet" type="text/css" href="external.css"/>
			<title>
				AMF / Aldric's
			</title>
				<script language="javascript" style = "text/javascript">
						var add = new Array;
		var sub = new Array;
		var bilang=0;
		
		
		function compute(ope, element)
		{
			document.oform.quantity.value=bilang;
			var bilang=element.value;
			
			if(ope == "add")
			{
				bilang++;
				element.value=bilang;
			}
			else if(ope == "sub")
			{
				if (bilang == 0)
				{
					element.value=0;
				}
				else{
					bilang--;
					element.value=bilang;
				}
			}
		}
		
		var frm;
		var field1;
		var field2;
		var x =0;
		var Ftotal = 0;


		function isNumberKey(evt)
		{
			var charCode = (evt.which) ? evt.which : event.keyCode
			if (charCode > 31 && (charCode < 48 || charCode > 57))
			return false;
			return true;
		}

                var Mtotal;

		function UnPopulate() {
		  var t = field2.length-1;
		  for(i=t; i>=0; i--) {
			if (field2.options[i].selected) {
			  field2.options[i] = null;
			  Mtotal -= total;
       			  document.oform.Total.value = Mtotal;
			  x--;
			}
		  }
		}

		function AddItem(N) 
		{
			if(document.oform.quantity[N].value == 0)
			{
			  alert("Please Put some Quantity in " + document.oform.NEWITEM[N].value);
			}
			else
			{
			  var l = field2.length;
			  var total;
			  newOpt=document.oform.NEWITEM[N].value;
			  newOpt1=document.oform.quantity[N].value;
			  newOpt2=document.oform.NEWITEM3[N].value;
			  total = newOpt1 * newOpt2;
			  Ftotal += total;
			  field2.options[l] = new Option(newOpt+" X " + newOpt1+ " = " +  total);
			  document.oform.Total.value = Ftotal;
			  x++;
			}
		}

		window.onload = function() {
		  frm=document.oform;
		  field1=frm.SelectBox1;
		  field2=frm.SelectBox2;
		}
		function able_disable()
		{
			var val = 0;
			for( i = 0; i < document.oform.ModePayment.length; i++ )
			{
				if( document.oform.ModePayment[i].checked == true )
				{
					val = document.oform.ModePayment[i].value;
					if(val=='Deliver')
					{
						document.oform.CustomerAddress.disabled=false;
						document.oform.Refnum.disabled=false;
						document.oform.CustomerAddress.focus();
					}
					else
					{
						document.oform.CustomerAddress.disabled=true;
						document.oform.Refnum.disabled=true;
					}
				}
			}
		}
		
		function selectall() {
			for( i = 0; i <= document.oform.SelectBox2.length; i++ ){
				field2.options[i].selected = true;
				}
			}
			
		
		function show_toys()
		{
				document.getElementById('Toys').style.visibility = "visible";
				document.getElementById('SchoolSupplies').style.visibility = "hidden";
				document.getElementById('FassionAccessories').style.visibility = "hidden";
				document.getElementById('CellphoneAccessories').style.visibility = "hidden";
				document.getElementById('gamecards').style.visibility = "hidden"; 
		}
		
		function show_SchoolSupplies()
		{
				document.getElementById('Toys').style.visibility = "hidden";
				document.getElementById('SchoolSupplies').style.visibility = "visible";
				document.getElementById('FassionAccessories').style.visibility = "hidden";
				document.getElementById('CellphoneAccessories').style.visibility = "hidden";
				document.getElementById('gamecards').style.visibility = "hidden";
		}

		function show_FashionAccessories()
		{
				document.getElementById('Toys').style.visibility = "hidden";
				document.getElementById('SchoolSupplies').style.visibility = "hidden";
				document.getElementById('FassionAccessories').style.visibility = "visible";
				document.getElementById('CellphoneAccessories').style.visibility = "hidden";
				document.getElementById('gamecards').style.visibility = "hidden";
		}

		function show_CPAccessories()
		{
				
				document.getElementById('Toys').style.visibility = "hidden";
				document.getElementById('SchoolSupplies').style.visibility = "hidden";
				document.getElementById('FassionAccessories').style.visibility = "hidden";
				document.getElementById('CellphoneAccessories').style.visibility = "visible";
				document.getElementById('gamecards').style.visibility = "hidden";
		}

		function show_GameCards()
		{
				document.getElementById('Toys').style.visibility = "hidden";
				document.getElementById('SchoolSupplies').style.visibility = "hidden";
				document.getElementById('FassionAccessories').style.visibility = "hidden";
				document.getElementById('CellphoneAccessories').style.visibility = "hidden";
				document.getElementById('gamecards').style.visibility = "visible";
		}
	

				</SCRIPT>
		</head>


<BODY>
<center>
<table width=980>
				<tr>
					<td id="header"></td>
				</tr>
				
				<tr><td>
						<table width=100% align="center">
							<tr>
								<td class=navi height=35 width=190><p class="navigation"><a href="home.htm">HOME</a></p></td>
								<td class=navi height=35 width=190><p class="navigation"><a href="products.htm">PRODUCTS</a></p></td>
								<td class=navi height=35 width=190><p class="navigation"><a href="whatsnew.htm">WHAT'S NEW?</a></p></td>
								<td class=navi height=35 width=190><p class="navigation"><a href="aboutus.htm">ABOUT US</a></p></td>
								<td class=navi height=35 width=190><p class="navigation"><a href="developers.htm">DEVELOPERS</a></p></td>
							</tr>
						
						</table>
					</td>
				</tr>
</table>

<FORM name=oform ACTION = "mailto:john_joseph_paragua@yahoo.com" method = "post" enctype="text/plain">
<table width=980 height=600 >
								<td height=590 width=140>
									
										PRODUCTS: <br>
										<a href = " #" onclick = "show_SchoolSupplies()">School Supplies</a> <br>
										<a href = " #" onclick = "show_toys()">Toys</a><br>
										<a href = " #" onclick ="show_FashionAccessories()">Fashion Accessories</a><br>
										<a href = " #" onclick = "show_CPAccessories()">Cellphone Accessories</a> <br>
										<a href = " #" onclick = "show_GameCards()">Game Cards</a> <br>				 
									
								</td>
								<td width=480>
									<div id="SchoolSupplies">
									<table cellpadding="3" height=590 class=prod_table>
										
											<tr>
											<h1>School Supplies</h1>											
												<td><p>Pencil/box</p>
													<INPUT TYPE="TEST" name="NEWITEM" value = "Pencil/box" disabled = "disabled" style="WIDTH: 1px; HEIGHT: 0px; text-align:center; visibility:hidden"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value1" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value1'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value1'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" value = "55" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(0)" VALUE="Add Item">
												</td>											
												
												<td><p>Intermediate Pad/Bundle</p>
													<INPUT TYPE="TEST" name="NEWITEM" value = "Intermediate Pad/Bundle" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center; visibility:hidden"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value2" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value2'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value2'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(1)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value3" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value3'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value3'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(2)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value4" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value4'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value4'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(3)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value5" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value5'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value5'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(4)" VALUE="Add Item">
												</td>								
											</tr>
										</div>
									</table>
								
									
									<div id="Toys">	
										<table cellpadding="3" height=590 class=prod_table>
											
											<tr>
											<h1>Toys</h1>
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value6" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value6'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value6'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(5)" VALUE="Add Item">
												</td>											
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value7" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value7'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value7'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(6)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value8" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value8'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value8'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(7)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value9" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value9'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value9'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(8)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value10" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value10'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value10'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(9)" VALUE="Add Item">
												</td>								
											</tr>
										</table>
									</div>
										
									<div id ="FassionAccessories">
										<table cellpadding="3" height=590 class=prod_table>
											<h1>Fashion Accessories</h1>
											<tr>
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value11" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value11'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value11'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(10)" VALUE="Add Item">
												</td>											
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value12" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value12'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value12'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(11)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value13" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value13'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value13'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(12)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value14" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value14'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value14'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(13)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value15" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value15'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value15'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(14)" VALUE="Add Item">
												</td>								
											</tr>
										</table>
									
									</div>	
									<div id ="CellphoneAccessories">
										<table cellpadding="3" height=590 class=prod_table>
											<h1>Cellphone Accessories</h1>
											<tr>
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value16" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value16'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value16'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(15)" VALUE="Add Item">
												</td>											
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value17" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value17'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value17'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(16)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value18" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value18'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value18'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(17)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value19" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value19'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value19'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(18)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value20" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value20'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value20'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(19)" VALUE="Add Item">
												</td>								
											</tr>
										</table>
									</div>
									<div  id="gamecards">
										
										
										<table cellpadding="3" height=590 class=prod_table>
											<h1>Game Cards</h1>
											<tr>
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value21" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value21'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value21'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(20)" VALUE="Add Item">
												</td>											
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value22" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value22'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value22'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(21)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value23" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value23'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value23'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(22)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value24" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value24'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value24'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(23)" VALUE="Add Item">
												</td>								
												
												<td>
													<INPUT TYPE="TEST" name="NEWITEM" value = "pencil" disabled = "disabled" style="WIDTH: 80px; HEIGHT: 22px; text-align:center"><br>
													Quantity
													<INPUT TYPE="TEST" name="quantity" id="value25" value="0" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled"><br>
													<input type = "button" value = "+" onclick = "compute('add', document.getElementById('value25'))">
													<input type = "button" value = "-" onclick = "compute('sub', document.getElementById('value25'))"><br>
													Price
													<INPUT TYPE="TEST" name="NEWITEM3" style="WIDTH: 60px; HEIGHT: 22px; text-align:center" disabled = "disabled">
													<INPUT TYPE=button onclick="AddItem(24)" VALUE="Add Item">
												</td>								
											</tr>
										</table>
									</div>			
								</td>

	
								<td width=280 height=590><form name=pass >
								
								<SELECT NAME="SelectBox2" MULTIPLE  STYLE="width:100%; height:250px;text-align:center"></SELECT>
									
									<INPUT TYPE=button onclick="UnPopulate()" VALUE="Remove" ><br>
									TOTAL: <input type="text" name=Total>  
								<fieldset>
								<legend>Personal Form:</legend>
									<center>Name: <input type = "text" name = "CustomerName" STYLE = "	width: 300px"><br>
									Email Address:<br> <input type = "text" name = "CustomerEAdd" STYLE = "	width: 300px"><br>
									Contact Number:<br> <input type = "text" name = "ContactNumber" STYLE = "	width: 300px"><br>
									Mode of Payment: <br>
									<input type = "radio" name = "ModePayment" Value = "PickUp" onclick = "able_disable()" checked>Pick Up <br>
									<input type = "radio" name = "ModePayment" Value = "Deliver" onclick = "able_disable()">Delivery <br>
									Address: <input type = "text" name = "CustomerAddress" disabled = "disabled" STYLE = "	width: 300px"><br>
									Smart Money ref#: <input type = "text" name = "Refnum" disabled = "disabled" STYLE = "	width: 300px"></center>
									<br>
									<input type="submit" name="submit" value="Submit" onclick="selectall()"></form>
									</fieldset>
									 
									

								</td>
							</table>
</FORM>
</center>
</BODY>
</html>



Was This Post Helpful? 0
  • +
  • -

#6 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3521
  • View blog
  • Posts: 10,162
  • Joined: 08-June 10

Re: Question in my program

Posted 13 March 2012 - 02:55 PM

"not working" is not a proper error description. check the Error Console first.
Was This Post Helpful? 0
  • +
  • -

#7 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Question in my program

Posted 13 March 2012 - 03:14 PM

adm, you're going to need to learn to do two things, or people will stop trying to help you.

1. explain in the header to your post something about the problem you're having. "Question in my program" gives no information that we don't already know. "how to show item in listbox when I click button" would be better, assuming I understand your problem description.

2. DO YOUR OWN WORK, DON'T ASK OTHERS TO DO IT FOR YOU. Nothing will cause people to stop helping you more quickly than saying "here is my code it isn't working". Again, if it were working I assume that you wouldn't be asking for help. Explain where the error is, what the error is, and what you have tried to correct it. If you just say "please help me, I cannot think of a solution", we ask ourselves why you are trying to write programs when clearly you are unable to do so; we then ask ourselves if you are trying to get us to write your program for free.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1