Validation Issue with jscript within page template (2 posts)

  1. greenpeas
    Posted 7 years ago #

    I am having a validation issue (13 to be precise) when adding a jscript on my site. The code I'm using is:

    // inserts image rotator to only home page
    $post_name = $post->post_name;
    if($post_name == 'home'){
    $use_image_array = 'yes'; // if not "yes" script will pull image from directory (see script for directory)
    #--- IMAGE ARRAY ---#
    $image_array[] = array('image_path' => '/images/rotate1.jpg', 'image_link' => '');
    $image_array[] = array('image_path' => '/images/rotate2.jpg', 'image_link' => '');
    #--- END IMAGE ARRAY ---#

    What's the best means of validating this?

  2. greenpeas
    Posted 6 years ago #

    all righty... I'll give this another try.
    Validator shows this in tidy cleanup:

    <div id="image_rotate" class="c2">
    <p class="c1"><a href="http://clifton.greenpeas.us/value-engineering/"><img src="/images/rotate1.jpg" border="0" alt="** PLEASE DESCRIBE THIS IMAGE **" /></a>
    <p class="c1"><a href="http://clifton.greenpeas.us/portfolio/"><img src="/images/rotate2.jpg" border="0" alt="** PLEASE DESCRIBE THIS IMAGE **" /></a>
    <p class="c1"><a href="http://clifton.greenpeas.us/profile/"><img src="/images/rotate3.jpg" border="0" alt="** PLEASE DESCRIBE THIS IMAGE **" /></a>

    jquery_image_rotate.php uses this line:
    $image_rotation .= '<p style="border: 0px;"><img src="'.$image_relative_path.'/'.$file.'" border=0></p>';

    which the page template pulls from - markup is as follows:

    $image_array[] = array('image_path' => '/images/rotate1.jpg', 'image_link' => 'http://clifton.greenpeas.us/value-engineering/');
    $image_array[] = array('image_path' => '/images/rotate2.jpg', 'image_link' => 'http://clifton.greenpeas.us/portfolio/');
    $image_array[] = array('image_path' => '/images/rotate3.jpg', 'image_link' => 'http://clifton.greenpeas.us/profile/');

    Where exactly do I need to add the
    "border="0" alt="** PLEASE DESCRIBE THIS IMAGE **" /></a>"

Topic Closed

This topic has been closed to new replies.

About this Topic