Help - Search - Members - Calendar
Full Version: Removing extra "rows" in HTML table
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
lauren
Hi, everyone ~

I know next to nothing about HTML; mostly I can figure out how to make direct swaps (such as shown below, where I have replaced various colors with Item No. 1, Item No. 2, etc.). What I am trying to do is to actually remove some of these extra colors and the rows they create on the table -- because I only have five items that need to be displayed in the table. I can do this and make the table look as it should, but whatever I am doing is affecting the pricing.

For instance, if i deleted the coding for Lite Pink and then went back to my table and starting entering quantities, the pricing function would be gone. I have studied it and see that each color has a tabIndex, but even when I remove a color and renumber the tabIndex for the remaining colors, I have still lost my pricing function.

If someone could educate me as to what I'm doing wrong and the correct way to fix this, I'd appreciate it very much!

Thank you....

Lauren

**************************************



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<!-- Created with the CoffeeCup HTML Editor 2007 -->
<!-- http://www.coffeecup.com/ -->
<!-- Brewed on 4/16/2009 1:02:52 PM -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
<title></title>


<!-- START FAVICON CALL -->
<link rel="shortcut icon" href="b_favicon.ico">
<!-- END FAVICON CALL -->

<style type="text/css">
<!--
/* Add Hover with color to links */
a:hover {text-decoration: none; color:#FF0000;}
-->
</style>


<!-- Call External Script -->

<script language="JavaScript" type="text/javascript" src="price3.js"></script>



</head>


<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000" background="picts/paper.gif">

<!-- Start of Order Form -->

<form name="order_sheet">
<input type="hidden" name="xxx" value="0">
<font face=Arial>
<TABLE style="BORDER-COLLAPSE: collapse" cellPadding=3 bgColor=white border=1>

<TBODY style=arial>

<TR>
<TD bgColor=#003366><font color=EEEEEE><B>Sticker</B></font></TD>
<TD bgColor=#003366><font color=EEEEEE ><B>Description</B></font></TD>
<TD align=center bgColor=#003366><font color=EEEEEE ><B>Quantity</B></font></TD>
<TD align=center bgColor=#003366><font color=EEEEEE ><B>Price</B></font></TD></TR>

<TR>
<TD>Item No. 1<br>
<TD >Description</TD>
<TD align=center><input id=blk_qty onblur=onblur_calc() tabIndex=1 size=5 name=blk_qty></TD>
<TD><input id=blk_price onblur=onblur_calc() readOnly size=10 value=0.00 name=blk_price></TD></TR>

<TR>
<TD>Item No. 2<br>
<TD >Description</TD>
<TD align=center><input id=blu_qty onblur=onblur_calc() tabIndex=2 size=5 name=blu_qty></TD>
<TD><input id=blu_price onblur=onblur_calc() readOnly size=10 value=0.00 name=blu_price></TD></TR>

<TR>
<TD>Item No. 3<br>
<TD >Description</TD>
<TD align=center><input id=grn_qty onblur=onblur_calc() tabIndex=3 size=5 name=grn_qty></TD>
<TD><input id=grn_price onblur=onblur_calc() readOnly size=10 value=0.00 name=grn_price></TD></TR>

<TR>
<TD>Item No. 4<br>
<TD >Description</TD>
<TD align=center><input id=gld_qty onblur=onblur_calc() tabIndex=4 size=5 name=gld_qty></TD>
<TD><input id=gld_price onblur=onblur_calc() readOnly size=10 value=0.00 name=gld_price></TD></TR>

<TR>
<TD>Item No. 5<br>
<TD >Description</TD>
<TD align=center><input id=htpnk_qty onblur=onblur_calc() tabIndex=5 size=5 name=htpnk_qty></TD>
<TD><input id=htpnk_price onblur=onblur_calc() readOnly size=10 value=0.00 name=htpnk_price></TD></TR>

<TR>
<TD>Lite Pink<br>
<TD >Description</TD>
<TD align=center><input id=ltpnk_qty onblur=onblur_calc() tabIndex=6 size=5 name=ltpnk_qty></TD>
<TD><input id=ltpnk_price onblur=onblur_calc() readOnly size=10 value=0.00 name=ltpnk_price></TD></TR>

<TR>
<TD>Maroon<br>
<TD >Description</TD>
<TD align=center><input id=mrn_qty onblur=onblur_calc() tabIndex=7 size=5 name=mrn_qty></TD>
<TD><input id=mrn_price onblur=onblur_calc() readOnly size=10 value=0.00 name=mrn_price></TD></TR>

<TR>
<TD>Natural<br>
<TD >Description</TD>
<TD align=center><input id=ntrl_qty onblur=onblur_calc() tabIndex=8 size=5 name=ntrl_qty></TD>

<TD><input id=ntrl_price onblur=onblur_calc() readOnly size=10 value=0.00 name=ntrl_price></TD></TR>

<TR>
<TD>Orange<br>
<TD >Description</TD>
<TD align=center><input id=orng_qty onblur=onblur_calc() tabIndex=9 size=5 name=orng_qty></TD>
<TD><input id=orng_price onblur=onblur_calc() readOnly size=10 value=0.00 name=orng_price></TD></TR>
<TR>

<TD>Purple<br>
<TD>Description</TD>
<TD align=center><input id=prpl_qty onblur=onblur_calc() tabIndex=10 size=5 name=prpl_qty></TD>
<TD><input id=prpl_price onblur=onblur_calc() readOnly size=10 value=0.00 name=prpl_price></TD></TR>

<TR>
<TD>Red<br>
<TD>Description</TD>
<TD align=center><input id=red_qty onblur=onblur_calc() tabIndex=10 size=5 name=red_qty></TD>
<TD><input id=red_price onblur=onblur_calc() readOnly size=10 value=0.00 name=red_price></TD></TR>

<TR>
<TD>Lime<br>
<TD >Description</TD>
<TD align=center><input id=lime_qty onblur=onblur_calc() tabIndex=12 size=5 name=lime_qty></TD>
<TD><input id=lime_price onblur=onblur_calc() readOnly size=10 value=0.00 name=lime_price></TD></TR>

<TR>
<TD colSpan=3></TD></TR>

<TR>
<TD colspan=2>Sub-Total:</TD>
<TD align=center><input id=total_qty readOnly size=5 value="0" name=total_qty></TD>
<td align=right><input id=total_price readOnly size=10 value=0.00 name=total_price></td>
</TR>
<tr>
<td colspan=3 >5% Discount for quantities 10 and above</td>
<td><input type=text readonly name=number_discount size=10 value=0.00></td>
</tr>
<tr>
<td colspan=3>Total</td>
<TD><input id=int_total_price readOnly size=10 value=0.00 name=int_total_price></TD></tr>
<TR>
<TD colSpan=4>Price per Sticker $5.00</TD>
<!--<TD><input id=price_per_roll readOnly size=10 value=0.00 name=price_per_widget></TD>-->
</TR>

<TR>
<TD align=middle colSpan=4>
<input type="hidden" name="amount">
</form>
<!-- End of Order Form -->



<!-- Start of form -->
<form id="paypal" name="paypal" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="youremail@youremail.com">
<input type="hidden" name="item_name" value="Widgets">
<input type="hidden" name="item_number" value="W-1001">
<input type="hidden" name="quantity">
<input type="hidden" name="on0" value="">
<input type="hidden" name="os0">
<input type="hidden" name="amount">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="return" value="http://www.yourwebsite.com/successorder.html">
<input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/cancel.html">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-BuyNowBF:fjienterprise">
<br>
<input onclick="buildlist()" tabIndex="14" type="image" alt="Make payments with payPal - it's fast, free and secure!" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" name="submit">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<br><br>
</TD>
</TR>
</TBODY>
</TABLE></font>
</form>



</BODY>
</HTML>
Darin McGrew
Can you provide the URL (address) of a document that demonstrates the problem?
lauren
Thank you for replying, Darin.

I don't have a URL to demonstrate this. I am working off the html file, and when I go in and try to remove some of these extra rows -- for instance, if removed this:

<TR>
<TD>Lite Pink<br>
<TD >Description</TD>
<TD align=center><input id=ltpnk_qty onblur=onblur_calc() tabIndex=6 size=5 name=ltpnk_qty></TD>
<TD><input id=ltpnk_price onblur=onblur_calc() readOnly size=10 value=0.00 name=ltpnk_price></TD></TR>

the table would look the way it should, in that this color would no longer display, but when I enter a number in the "quantity" box, the appropriate pricing would not carry over into the "price" box. So somehow my removing a row is affecting the calculations, but I don't know where/how.

Sorry, I thought this would be an easy problem to be diagnosed and fixed!
Christian J
QUOTE(lauren @ May 10 2009, 05:51 AM) *

So somehow my removing a row is affecting the calculations, but I don't know where/how.

The onblur events in the form fields call a function "onblur_calc()", which should be located in the javascript file "price3.js". Possibly that needs to be edited too.
lauren
Thanks, Christian ~ I see what you are saying about the onblur_calc. I will go back and take a look at that.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.