Link to home
Start Free TrialLog in
Avatar of mds332200
mds332200

asked on

Split a table in my online store that uses java script

Hi, I am editing my html in my store, and adding a java script so instead of just showing the products and the customer clicking on the product and adding it to the cart, they add the item to the cart  from the "products" page. Easier to take a look at it- www.drcelly.com/store/c92 
As you can see the first three items have the drop down menu. I am editing all the items to have this menu. (I know if you press "add" it doesnt work right now- thats because I have not added the tag to referance it yet). Before I add the referance tags, I need to solve a table problem.

In my editing, (im a beguinner) I was finally able to get the tables looking and running good, just I must have lost a tag because my table is messed up- the products are showing up all in one line. Here is how it should look (the table setup) www.drcelly.com/store/c91

Any advice? Note: the code below isnt the entire html code, the entire code is real long, I didnt change any of the upper code, just this section has the table in it. I have worked on this all last night and a few hours today- I cant figure it out!
</script></td></tr></table></center></p></td>
              </tr>
            </table>            
            </td>
          <td bgcolor="#ffffff" width="100%"> 
            <table border="0" width="100%">
              <tr>
                <td colspan="3"><IMG height=1 src="spac.gif" width=80 border=0></td>
              </tr>
              <tr>
                <td><IMG height=71 src="spac.gif" width=4 border=0></td>
                <td width="100%" valign="top"><script language="JavaScript"> 
<!-- 
if (location.search.length > 1) 
document.write('<b>Results:</b><br><br>\n'); 
 
for (n=0; n<menu.length; n++) {
  var _a  = '';
      _a += '<b><a href="'+menu[n][LOC]+'">'+menu[n][TITLE]+'</a></b><BR>';
      _a += menu[n][DESCRIPTION]+'';
     _a += ''+menu[n][KEYWORDS]+'';
  document.write(_a);
}
if ((menu.length == 0) && (location.search.length > 1)) 
  document.write('Keyword "'+string+'" not found!\n'); 
// --> 
</script><br><a href='#'><img src='arrows_left.gif' OnClick='history.go(-1)' border='0'></a><br>
<table border='0' cellspacing='0' cellpadding='0'><tr>
<td valign='top'>
<!--Start Product-->
<table border="0" cellpadding="5" width="180">
  <tr>
    <td width="100%">
<table border="1" cellspacing="0" cellpadding="0" width="100%" height="160">
  <tr>
    <td valign="middle" align="center" background="orderline0.gif"><a href='1555.html'><img border='0' src='vx3200_phone_phone_g.jpg'width='226'height='226'></a></td>
  </tr>
</table>
<table border="0" width="100%">
  <tr>
    <td width="100%"><a href='1555.html'><img src='moreinfo.gif' border='0'></a><br><font face="Verdana" size="2"><br>
      Cell Phone (VX3200)</font><br>
      <font face="Arial" size="2" color="#000080"> <strike></strike></font><br>
<font face="Arial" size="2" color="#FF0000">Sales Price: $35.00</font></td>
  </tr>
</table>
    </td>
  </tr>
</table>
<!--End Product-->
</td>
<td valign='top'>
<!--Start Product-->
<table border="0" cellpadding="5" width="180">
  <tr>
    <td width="100%">
<table border="1" cellspacing="0" cellpadding="0" width="100%" height="160">
  <tr>
    <td valign="middle" align="center" background="orderline0.gif"><a href='759.html'><img border='0' src='6000_phone_phone_g.jpg'width='226'height='226'></a></td>
  </tr>
</table>
<table border="0" width="100%">
  <tr>
    <td width="100%"><a href='759.html'><img src='moreinfo.gif' border='0'></a><br><font face="Verdana" size="2"><br>
      Cell Phone (VX6000)</font><br>
      <font face="Arial" size="2" color="#000080"> <strike></strike></font><br>
<font face="Arial" size="2" color="#FF0000">Sales Price: $55.00</font></td>
  </tr>
</table>
    </td>
  </tr>
</table>
<!--End Product-->
</td>
<td valign='top'>
<!--Start Product-->
<table border="0" cellpadding="5" width="180">
  <tr>
    <td width="100%">
<table border="1" cellspacing="0" cellpadding="0" width="100%" height="160">
  <tr>
    <td valign="middle" align="center" background="orderline0.gif"><a href='757.html'><img border='0' src='6100_phone_g.jpg'width='226'height='226'></a></td>
  </tr>
</table>
<table border="0" width="100%">
  <tr>
    <td width="100%"><a href='757.html'><img src='moreinfo.gif' border='0'></a><br><font face="Verdana" size="2"><br>
      Cell Phone (VX6100)</font><br>
      <font face="Arial" size="2" color="#000080"> <strike></strike></font><br>
<font face="Arial" size="2" color="#FF0000">Sales Price: $60.00</font></td>
  </tr>
</table>
    </td>
  </tr>
</table>
<!--End Product-->
</td>
</tr></table>
 
<table border='0' cellspacing='0' cellpadding='0'><tr>
<td valign='top'>
<!--Start Product-->
<table border="0" cellpadding="5" width="180">
  <tr>
    <td width="100%">
<table border="1" cellspacing="0" cellpadding="0" width="100%" height="160">
  <tr>
    <td valign="middle" align="center" background="orderline0.gif"><a href='1556.html'><img border='0' src='7000 black_phone_phone_g.jpg'width='226'height='226'></a></td>
  </tr>
</table>
<table border="0" width="100%">
  <tr>
    <td width="100%"><a href='1556.html'><img src='moreinfo.gif' border='0'></a><br><font face="Verdana" size="2"><br>
      Cell Phone (VX7000 BLACK)</font><br>
      <font face="Arial" size="2" color="#000080"> <strike></strike></font><br>
<font face="Arial" size="2" color="#FF0000">Sales Price: $65.00</font></td>
  </tr>
</table>
    </td>
  </tr>
</table>
<!--End Product-->
</td>
<td valign='top'>
<!--Start Product-->
<table border="0" cellpadding="5" width="180">
  <tr>
    <td width="100%">
<table border="1" cellspacing="0" cellpadding="0" width="100%" height="160">
  <tr>
    <td valign="middle" align="center" background="orderline0.gif"><a href='755.html'><img border='0' src='7000 blue _phone_phone_g.jpg'width='226'height='226'></a></td>
  </tr>
</table>
<table border="0" width="100%">
  <tr>
    <td width="100%"><a href='755.html'><img src='moreinfo.gif' border='0'></a><br><font face="Verdana" size="2"><br>
      Cell Phone (VX7000 BLUE)</font><br>
      <font face="Arial" size="2" color="#000080"> <strike></strike></font><br>
<font face="Arial" size="2" color="#FF0000">Sales Price: $65.00</font></td>
  </tr>
</table>
    </td>
  </tr>
</table>
<!--End Product-->
</td>
<td valign='top'>
<!--Start Product-->
<table border="0" cellpadding="5" width="180">
  <tr>
    <td width="100%">
<table border="1" cellspacing="0" cellpadding="0" width="100%" height="160">
  <tr>
    <td valign="middle" align="center" background="orderline0.gif"><a href='753.html'><img border='0' src='9800_phone_phone_g.jpg'width='226'height='226'></a></td>
  </tr>
</table>
<table border="0" width="100%">
  <tr>
    <td width="100%"><a href='753.html'><img src='moreinfo.gif' border='0'></a><br><font face="Verdana" size="2"><br>
      Cell Phone (VX9800)</font><br>
      <font face="Arial" size="2" color="#000080"> <strike></strike></font><br>
<font face="Arial" size="2" color="#FF0000">Sales Price: $170.00</font></td>
  </tr>
</table>
    </td>
  </tr>
</table>
<!--End Product-->
</td>
</tr></table>
<a href='#'><img src='arrows_left.gif' OnClick='history.go(-1)' border='0'></a><p></td>
                <td><IMG height=71 src="spac.gif" width=4 border=0></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td bgcolor="#0099cc"><IMG height=23 src="spac.gif" width=175></td>
          <td bgcolor="#ffffff" class="forTexts" width="100%"> 
            <hr width="90%" size="1">
          </td>
        </tr>
        <tr bgcolor="#ffffff" valign="top"> 
          <td bgcolor="#006699"><IMG height=23 src="spac.gif" width=175></td>
          <td bgcolor="#ffffff" class="forTexts" width="100%"> 
            <p align="center">
            <font face="Arial" size="2">
            <A href="aboutus.html">About us</A>&nbsp; 
            | <A href="contact.html">Contact</A> 
            | <A href="products.html"><br>
            </A></font><IMG height=16 src="spac.gif" width=161 border=0></p>
          </td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="19" background="top_row_bg.gif"><div align="center" class="forCopyright"> <font face="Arial" size="2" color="#ffffff">©
        EM Auctions. All rights reserved.</font></div></td>
  </tr>
</table>
</body>
</html>

Open in new window

Avatar of scrathcyboy
scrathcyboy
Flag of United States of America image

Nice presentation, but problems with this webpage are as follows --

YOu need some HTML in the page, you can't do it all by javascript, when you want to click on an item to add it to the cart, simple HTML FORM does that just fine.

Second, don't use FRAMES -- they are antique, the do not index very well in search engines, and you do not need them on this page.

YOu can do your entire layout with either TABLES or CSS style sheets.

Follow this layout for all tables --

<TABLE>
 <TBODY>
   <TR>
     <TD> here is where you put images, data, text and even more tables </TD>
    </TR>
     <TR>
        <TD>  next line of images and links will go here, on next row </TD>
      </TR>
   </TBODY>
</TABLE>

stick to that and use regular html in your pages.   You are off to a GREAT start.
ASKER CERTIFIED SOLUTION
Avatar of mds332200
mds332200

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial