Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Markup Validation


nvbenterprises

Recommended Posts

I'm almost to the point of completion of my store. Someone ran Markup Validation Service v0.7.4 and it produced two errors. I can not seem to figure out where these errors are coming from.

 

Error Line 34, column 525: there is no attribute "BORDER" .

 

...es/buttons/button_search.jpg" border="0" alt="Quick Find" title=" Quick Find

 

Error Line 75, column 122: there is no attribute "COLOR" .

 

...rders, Ramps, Surfacing</a><hr COLOR="cccccc"><a href="http://www.aaastateofp

 

For the first error I checked many resources, but all of them led me in a circle. For the second error I checked the categories.php file, but manipulation must come from elsewhere. Does anyone have an idea as to what files I could look under for different results? I thought I might be able to just change the stylesheet, but I wouldn't know how.

 

Thanks

Link to comment
Share on other sites

Would this be what I need for the stylesheet? And if so does it matter where?

 

hr {

color: #cccccc;

}

 

 

i think you'll want something like this:

hr {

color: #cccccc;

background-color: #cccccc;

}

 

 

as not all browsers implement the CSS in the same way for horizontal rules. do a google search, as there are some good tutorials regarding this out there, and be sure to check the results in every browser possible.

 

and no, it doesn't matter where in the stylesheet it is.

 

rj

Link to comment
Share on other sites

I'm almost to the point of completion of my store. Someone ran Markup Validation Service v0.7.4 and it produced two errors ... (snip) ... Does anyone have an idea as to what files I could look under for different results? I thought I might be able to just change the stylesheet, but I wouldn't know how.

 

Thanks

 

 

by the way, you can (should) style the <hr> using CSS, but it won't get rid of your invalid HTML, which is generated by the code somewhere, which means you have to go through the code to find it.

 

first step, what's the page that's generating the invalid HTML? post a link.

 

rj

Link to comment
Share on other sites

The border error comes from this code:

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr class="header">

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'aaalogo.jpg', 'AAA State of Play') . '</a>'; ?>

<td valign="middle"><?php echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . ' ' . tep_hide_session_id() .tep_image_submit('button_search.jpg', BOX_HEADING_SEARCH, 'align="middle"') . '</form>'; ?></td>

 

It derives from the fact I have a search box in the header.

 

I am still looking for the other error source.

Link to comment
Share on other sites

The border error comes from this code:

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr class="header">

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'aaalogo.jpg', 'AAA State of Play') . '</a>'; ?>

<td valign="middle"><?php echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . ' ' . tep_hide_session_id() .tep_image_submit('button_search.jpg', BOX_HEADING_SEARCH, 'align="middle"') . '</form>'; ?></td>

 

It derives from the fact I have a search box in the header.

 

I am still looking for the other error source.

 

 

i believe the culprit is in catalog/includes/functions/html_output.php, in the function tep_image_submit

 

// The HTML form submit button wrapper function

// Outputs a button in the selected language

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;

}

 

delete the stuff in red, and i think you'll have a page to be proud of, without a bit of invalid html.

 

cheers,

rj

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...