Help cant validate site just 1 error

Discussion in 'PHP' started by ging999, Dec 23, 2012.

  1. #1
    Why is this not valid ?
    "data-rt-menu-mobile" is not a member of a group specified for any attribute



    <div class="rt-menu-mobile">
    <select data-rt-menu-mobile>
    <?php foreach ($menu->getChildren() as $item) : ?>
    <?php $this->renderMobileItem($item, $menu); ?>
    <?php endforeach; ?>
    </select>
    </div>
     
    ging999, Dec 23, 2012 IP
  2. Rising_Star

    Rising_Star Active Member

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #2
    Do you mean this??

    <div class="rt-menu-mobile">
    <select class="data-rt-menu-mobile">
    <?php foreach ($menu->getChildren() as $item) : ?>
    <?php $this->renderMobileItem($item, $menu); ?>
    <?php endforeach; ?>
    </select>
    </div>
     
    Rising_Star, Dec 23, 2012 IP
  3. ging999

    ging999 Well-Known Member

    Messages:
    146
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    103
    #3
    It now validates but doesnt work properly, the menu comes up on the iphone but it wont go to the page?
     
    ging999, Dec 23, 2012 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    1) STOP opening and closing PHP on every blasted line for no good reason.

    2) if that 'data-rt' garbage needs to be an attribute, it will NEVER validate as there is no such attribute in the HTML specification.

    Without seeing the rest of your code we're guessing wildly as to what that nonsense even is, but I suspect whatever it is is going about it all wrong.
     
    deathshadow, Dec 23, 2012 IP