Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Validating WordPress dropdown

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #26040
    leehughes
    Member

    Hi,

    Am having trouble getting my drop down menu to work in IE.. am trying to validate it and I have 2 errors on the drop down..

    Line 112, Column 100: Attribute "onMouseOver" is not a valid attribute. Did you mean "onmouseover"?

    Line 112, Column 139: Attribute "onClick" is not a valid attribute. Did you mean "onclick"?

    only problem is is that I can’t find this is the code.. am using wordpress and it uses different files like header, sidebar etc i have looked and it’s not in any of them..

    Also, could this be the reason why it’s not working in ie? It was made to work in IE and did before I added the flash fade..

    Thanks

    #63635
    blue642
    Member

    Do you have a link so we can help diagnose the problem?

    #63636
    leehughes
    Member

    Ahhh sorry..

    http://www.leehughes.co.uk

    It should be in m header code right ?

    This is my header code…

    Code:

    >

    ” rel=”stylesheet” type=”text/css” />

    Many thanks

    #63627
    blue642
    Member
    Code:

    This code is what generates your menu, specifically <?php wp_list_pages(‘sort_column=menu_order&title_li=’); ?>
    In firebug, I see that each link that has child pages has some javascript attributes "onclick" and "onmouseover" like the two in your error message, but they are all lowercase as the error suggests. I also don;t get the error you do in IE7 here at work, the dropdown does not work and when I check the log I get a syntax error about line 2, characters 1 and 3 ( I can’t copy and paste sadly…)

    From the code you posted, I don’t see what is injecting the javascript attributes into the navigation links.
    the only onmouseover function I see in the header file is in the suckerfish JS

    Code:
    #63646
    leehughes
    Member

    Hi mate..

    I think I know what is causing javascript to be inserted into the navigation links.. Am using a plugin called page list plus which uses javascript to be able to unlink my parent pages. I couldn’t figure out a way to disable them using wordpress so I used this plugin which also is the reason for my extra home parent cat on the right.. :(

    The drop down doesn’t work in any I.E since I added the flash fade so am looking to move that down below the header image now.. av spent too long doing that drop down menu and getting it to work in IE. I did it, then added the flash fade now it doesn’t work again so am gonna move that below the header image now

    thanks for helping :)

    #63652
    leehughes
    Member

    Ahhh… figured it out..

    I just disabled the plugin and checked my validation again and those two errors where now fixed..

    So I need to figure out a way of disabling the parent links without using that plugin now :)

    #63686
    blue642
    Member

    Hey!

    I got home and took a look at this again, glad you got it solved, for the most part.

    since you are using jquery, this should work…

    Code:

    I am not in any capacity great at Jquery, but decided I’d try to tackle this as it seemed simple enough.
    It looks for the user to hover over a list item that contains an unordered list (your drop-down markup is built this way)

    Then when it finds that this happens, and the user clicks the anchor link associated with the list item it returns false, (same thing the plug-in did to deactivate the link)

    Let me know if there’s any problems with it, my quick and dirty test worked well.

    EDIT: I also noticed the rollovers/dropdown don’t work for me in Firefox…. any clue why?

    #63706
    leehughes
    Member

    Hi,

    Thanks for you help.. Does this mean that i can disable my parent links now?

    Is there any way of me picking which ones I could do?

    The drop down doesn’t work for anything on a windows based browser.. Works fine on mac… It’s since I added the flashfade to it.. am in the process of trying to move the drop down under the header image now so there is no conflict.. it’s givin me too much a of headache

    #63705
    blue642
    Member

    The script I posted will disable your parent links, as far as choosing which ones, I’d have to rethink the code.

    If you can tell me which ones you don;t want disabled I can take a shot.

    #63707
    leehughes
    Member

    Hi,

    Multimedia, expeditions, charity, miscellaneous all need to have their links disabled..

    Where would I place this code? In the header?

    Many thanks

    #63709
    blue642
    Member
    Code:

    >

    ” rel=”stylesheet” type=”text/css” />

    You could post it as in the above example, after

    Code:
    wp_head();

    and before the

    Code:

    tag.

    I’ll work on disabling only those links. May take a bit as I am new to jQuery

    #63711
    leehughes
    Member

    Hi,

    Thanks for this.. I added the code where you said but my parent links are still linking.. Not to sure if am doing something wrong or what..

    #63712
    leehughes
    Member

    website has the code in it…

    http://www.leehughes.co.uk

    :)

    #63587
    blue642
    Member

    jQuery is conflicting, I’ll be right back, with a fix….

    Code:

    try that instead.

    #63717
    leehughes
    Member

    Wow.. i don’t know if that’s for the custom one for Multimedia, etc from what i can see it works for all choosen buttons except multimedia..

    have a look :)

    http://www.leehughes.co.uk :)

    Thanks spud :)

Viewing 15 posts - 1 through 15 (of 27 total)
  • The forum ‘CSS’ is closed to new topics and replies.