Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute problem in tep_image_submit, according to W3C Validator


kru

Recommended Posts

Posted

I'm using the W3C Validator (located at validator.w3.org) to examine the code on our osC website for errors. It gave me a host of them, all of which I was able to resolve except for this one:

 

there is no attribute "BORDER"

 

This occurs at the point in the program (on our main page) where the catalog/includes/boxes/search.php file (from column_right) is being executed. I have further tracked it to a tep_image_submit command (located in admin/includes/functions/html_ouput.php). It has an attribute of 'border="0"', but I don't know what to do about it.

 

It is my understanding that tep_image_submit renders buttons. I'm not sure what the purpose of border="0" is and it is invalid according to W3C, so can I just delete that attribute from the code in html_output.php?

 

Here is the exact code from html_output.php:

 

 

function tep_image_submit($image, $alt = '', $parameters = '') {
global $language;

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

$image_submit .= '>';

return $image_submit;
}

 

Your help is appreciated.

Add-Ons personally installed:

Step by Step Manual Order -- Request Reviews -- Reviews in Product Listing -- Reviews in Product Display -- Review Approval System -- Leverage Browser Cache --
Header Tag Controller -- Multilayer SEO Pop Out Menu -- Follow Us Box -- View All Products -- USPS Shipping Labels -- UPS Shipping Labels -- Monthly Sales/Tax Report --
htacess Optimisation -- Remove Unused Images -- Master Password -- Admin Change Customer Password -- Database Backup Manager -- Zero Stock Report --
Searchbox Search In Descriptions -- Easy Populate 2.76i -- Barcode Rendering -- Admin Sort By Model -- Products Purchased Report

Add-Ons personally developed:

Search for email address, etc in Orders -- Discontinue Product

Add-Ons installed by others:

View Counter -- Site Monitor -- Image Thumbnailer -- Database Optimizer -- Recaptcha -- Discount Coupons -- Add More Fields

Posted

border="0" is "old school" HTML, to suppress the default blue border around an image. Nowadays it is supposed to be done with CSS (border: 0;), but border="0" will still work in any browser. If you want to clean up the validator reports, you can remove border="0" from the PHP code and find the appropriate place in CSS to do the same thing, possibly

input, img { border: 0; }

(I have not tried this, but it should be close). Try removing border="0", see if you get a blue border around images, add the CSS code above, see if the border goes away.

Posted

FYI - I indicated the wrong path in my previous message. The correct path is catalog/includes/functions/html_output.php. Not admin...

 

I removed the border="0" attribute, as you suggested. No border appeared around that image (or any image, for that matter), so I think it was some old code that was just hanging out there. Evidently the border is already being removed in the css stylesheet we are using. I was hoping it was as simple as removing it but, since I didn't know what it did or didn't do, I thought I should ask first...

 

Thanks.

Add-Ons personally installed:

Step by Step Manual Order -- Request Reviews -- Reviews in Product Listing -- Reviews in Product Display -- Review Approval System -- Leverage Browser Cache --
Header Tag Controller -- Multilayer SEO Pop Out Menu -- Follow Us Box -- View All Products -- USPS Shipping Labels -- UPS Shipping Labels -- Monthly Sales/Tax Report --
htacess Optimisation -- Remove Unused Images -- Master Password -- Admin Change Customer Password -- Database Backup Manager -- Zero Stock Report --
Searchbox Search In Descriptions -- Easy Populate 2.76i -- Barcode Rendering -- Admin Sort By Model -- Products Purchased Report

Add-Ons personally developed:

Search for email address, etc in Orders -- Discontinue Product

Add-Ons installed by others:

View Counter -- Site Monitor -- Image Thumbnailer -- Database Optimizer -- Recaptcha -- Discount Coupons -- Add More Fields

Archived

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

×
×
  • Create New...