3 Replies - 282 Views - Last Post: 30 May 2012 - 01:42 PM

#1 ekenn123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 19-January 12

Problem when making table!

Posted 29 May 2012 - 01:10 PM

Hello, I got a problem. I'm making a webshop and I got it to work but the problem is with the table. Obviously I want the customer to be able to have many things in his shopcart so how can I fix this?

Posted Image

The part with T-shirt and 2 and 8598 and the button should align with the other. But it doesn't.. why is that?+

Thank you!

Is This A Good Question/Topic? 0
  • +

Replies To: Problem when making table!

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4337
  • View blog
  • Posts: 12,137
  • Joined: 18-April 07

Re: Problem when making table!

Posted 29 May 2012 - 01:21 PM

You have defined a row as having 3 columns... vara, antal, pris. So all rows after that should also have three <td> pairs unless you use colspan etc to change that (which you don't). Next all info should be inside a column so things like your <form> tags should not be inside <tr> and not inside a <td>. Lastly, any information that is not in a table cell but inside the <table> tags is going to be shown at the bottom after the table.

I suggest you take a look the basics of table structure again and make sure that you put all form elements inside table cells and that you have the correct number of table cells to match each column. If you have three columns defined, you should have three columns per <tr> row... again unless you use colspan etc.

:)
Was This Post Helpful? 0
  • +
  • -

#3 ekenn123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 19-January 12

Re: Problem when making table!

Posted 29 May 2012 - 02:00 PM

I didn't understand so much of what you wrote, what you mean with all rows should have three td pairs? Please give an example.

I will for sure.
Was This Post Helpful? 0
  • +
  • -

#4 ekenn123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 19-January 12

Re: Problem when making table!

Posted 30 May 2012 - 01:42 PM

Okey I tried everything.

<table border=0 width=450>
<tr>
<td>Vara</td>
<td>Antal</td>
<td>Pris</td>
</tr> 
                                         
<% 
Do Until rs.EOF
amt = rs("Amount")
pre = rs("Price")
tot = amt * pre
%>

<form method="get" action="Shopcart_delete.asp">
<td><% =rs("Info") %></td>
<td><% =rs("Amount") %></td>
<td><% =tot %> kr</td>
<td><Input type = "hidden" value = "<% =rs("Info") %>" name = "Info"></td>
<td><Input type = "hidden" value = "delete" name = "del"></td>
<td><input name="deleted" type="submit" value="Tabort"></td>
</form></table>   


It is in a rs.EOF loop. So if there is another object in the shopcart it will show it aswell, the problem is what you see on the picture is that it doesn't put the next "item" in the table, but it puts it under the table.


It's mindf*** :(
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1