Invalid Mark-up

Discussion in 'PHP' started by lostdog, Jan 19, 2011.

  1. #1
    Hi,

    I am reciveing the following two errors:

    1. Attributes construct error

    2. Couldn't find end of Start Tag input

    In this line:
    <input type="image" style="cursor: pointer;border: 0px;"src="<?php echo $this->getSkinUrl('images/search_button.gif') ?>" alt="<?php echo $this->__(' ') ?>" />

    Please let me know how to fix this.

    Thanks
     
    lostdog, Jan 19, 2011 IP
  2. Alex Roxon

    Alex Roxon Active Member

    Messages:
    424
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    80
    #2
    Magento? There's no space between the style and src attribute. If that doesn't fix it, post the HTML output without the PHP code so we can see it all.
     
    Alex Roxon, Jan 19, 2011 IP
  3. lostdog

    lostdog Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your reply.

    Space made no difference. Here is html output:

    <div class="mini-search">
    <form id="search_mini_form" action="http://www.cabinetknobsandhardware.com/catalogsearch/result/" method="get">
    <fieldset><div class="search"></div>
    <input id="search" type="text" class="input-text" name="q" value="" />
    <input type="image" style="cursor: pointer;border: 0px;"src="http://www.cabinetknobsandhardware.com/skin/frontend/default/hellopress/images/search_button.gif" alt=" " />
    <div id="search_autocomplete" class="search-autocomplete"></div>
     
    lostdog, Jan 19, 2011 IP
  4. Alex Roxon

    Alex Roxon Active Member

    Messages:
    424
    Likes Received:
    11
    Best Answers:
    7
    Trophy Points:
    80
    #4
    In that block of HTML alone there are numerous errors;

    1. No space between style and src. That will result in a validation error.
    2. You're missing a closing tag </fieldset>
    3. You're missing a closing tag </form> (search_mini_form)
    4. You're missing a closing tag </div> (for mini-search)

    This is valid:
    <div class="mini-search">
    <form id="search_mini_form" action="http://www.cabinetknobsandhardware.com/catalogsearch/result/" method="get">
    <fieldset><div class="search"></div>
    <input id="search" type="text" class="input-text" name="q" value="" />
    <input type="image" style="cursor: pointer;border: 0px;" src="http://www.cabinetknobsandhardware.com/skin/frontend/default/hellopress/images/search_button.gif" alt=" " />
    <div id="search_autocomplete" class="search-autocomplete"></div> 
    </fieldset>
    </form>
    </div>
    
    HTML:
     
    Alex Roxon, Jan 19, 2011 IP
  5. solidsoul2010

    solidsoul2010 Member

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    post the rest of the script, were missing information on bottom and top
     
    solidsoul2010, Jan 19, 2011 IP