Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HTML validation


muskokee

Recommended Posts

I have one validation error on my heavily modified site:

 

the "buy now" link from my featured sets.

 

4.01 transitional does not want the <form> element to be within a some other element!

 

Here is the translated code for the section. If anyone has any knowledge in this dept. I would love to pick your brain :lol:

 

<tr>
<td><!-- Featured_Sets_bof -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
 <td valign="top" align="center" width="100%">
	 <div class="out image">
		 <div class="in ltin tpin">
				<table border="0" width="100%" cellspacing="0" cellpadding="0">
					<tr >
					   <td width="100%"align="center" valign="middle" class="featuredProducts">
							   <a class="enhance" href="my site"><img src="my image"><br><img src="images/pixel_trans.gif" width="1" height="1" border="0" alt="">
			   <br>Product Name
		   </a>
			   <br>$0.00
			   <br>
								   <form name="buy_now" method="post" action="my site?action=buy_now">
					<input type="hidden" name="products_id" value="29">
				   <input type="image" src="includes/languages/english/images/buttons/button_buy_now.gif" alt="Buy Now" title=" Buy Now ">
				  </form>
			</td>
		</tr>
			 </table>
		 </div>
	 </div>
 </td>
 </tr>
  <tr>
	<td colspan="1" class="featuredProducts"><img src="images/pixel_trans.gif" width="1" height="1" border="0" alt="">
	</td>
  </tr>
</table>
<!-- Featured_Sets_eof -->
</td>
</tr>

 

Thanks! :thumbsup: :thumbsup:

 

Sheri

Link to comment
Share on other sites

I have one validation error on my heavily modified site:

 

the "buy now" link from my featured sets.

 

4.01 transitional does not want the <form> element to be within a some other element!

 

Here is the translated code for the section. If anyone has any knowledge in this dept. I would love to pick your brain :lol:

 

<tr>
<td><!-- Featured_Sets_bof -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
 <td valign="top" align="center" width="100%">
	 <div class="out image">
		 <div class="in ltin tpin">
				<table border="0" width="100%" cellspacing="0" cellpadding="0">
					<tr >
					   <td width="100%"align="center" valign="middle" class="featuredProducts">
							   <a class="enhance" href="my site"><img src="my image"><br><img src="images/pixel_trans.gif" width="1" height="1" border="0" alt="">
			   <br>Product Name
		   </a>
			   <br>$0.00
			   <br>
								   <form name="buy_now" method="post" action="my site?action=buy_now">
					<input type="hidden" name="products_id" value="29">
				   <input type="image" src="includes/languages/english/images/buttons/button_buy_now.gif" alt="Buy Now" title=" Buy Now ">
				  </form>
			</td>
		</tr>
			 </table>
		 </div>
	 </div>
 </td>
 </tr>
  <tr>
	<td colspan="1" class="featuredProducts"><img src="images/pixel_trans.gif" width="1" height="1" border="0" alt="">
	</td>
  </tr>
</table>
<!-- Featured_Sets_eof -->
</td>
</tr>

 

Thanks! :thumbsup: :thumbsup:

 

Sheri

 

I think it is because the form element is inside two div tags it is ok to have it in a td tag not a div tag.

Link to comment
Share on other sites

Thanks! :thumbsup: :thumbsup:

 

Sheri

 

I should have included this code in the first post. My sidkiller buy now featured sets link:

 

 $buy_now_link = '<br><form name="buy_now" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL') . '"><input type="hidden" name="products_id" value="' . $featured_products_array[$i]['id'] . '">' . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</form>';

Link to comment
Share on other sites

Where's the 'alt' tag for the image? That'll create an error.

 

Vger

 

Thanks Vger...no idea what happened between cut and paste and reformat but the alt tag for the product image is there. The only image that doesn't have an alt tag value is the pixel.gif

 

I've taken out the <br>s and cut the output up into rows and cells but without a change in the error.

 

w3c says the error was detected here:

 

.../catalog/wishlist.php?action=buy_now"><input type="hidden" name="products_id"

 

How can the > cause an error?

 

Sheri

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...