| Paxton 2006-02-27, 7:55 am |
|
isaac2004 wrote:
> hi i am creating a basic asp site that uses cookies to manage a cart
> for an online store. whenever i open this page without adding anything
> to the cart. i get an error message.
>
> here is my code
>
Some more advice for you to help with development/debugging:
1. Remove ALL tables and presentational markup from your page until
you know that the ASP code is working properly.
2. Don't include adovbs.inc unless you use it. So far you've only used
default cursors, so it's not needed in the examples you've given.
3. Test the values of your variables thoughout the code using
response.write var & "<br>". That way you'll know whether the code is
working correctly.
4. When you do put the presentational html in, make use of the css file
you've included.
This sort of thing:
><FONT face=arial,verdana,helvetica><B>List Price:
> <font color=#990000><strike><% =dblPrice %></strike></font>
is terrible. It should be put in the css file:
..strike {
text-decoration: line-through;
font family: arial,verdana,helvetica;
font-weight: bold;
}
Then you use it like so: <span class="strike"><% =dblPrice %></span>.
This will greatly reduce the amount of html code in your page and make
it much easier to tell what's what.
5. Check your html. Currently, you have no <body> tag in your document
at all. You have opened a table in another table, without putting the
second table in a td. Some browsers may display this as you intend,
but some others may not display it at all. You also have some divs
that overlap and unclosed tags.
HTH
/P.
|