Results 1 to 4 of 4

Thread: IE has a problem with the href attribute

  1. #1
    Join Date
    Feb 2009
    Posts
    71

    IE has a problem with the href attribute

    Hi friends,

    I load some content with the load function and this content has links, that are relative to the document of origin, after being loaded, the href attribute is changed into a wrong absolute value.

    and because of this I am getting some wrong values of MY href, because of which i could not go further.

    please help!!

  2. #2
    Join Date
    Dec 2008
    Posts
    183

    Re: IE has a problem with the href attribute

    you undo the damage for the second level be resetting it all .

    you use code that IE6 will have trouble with:
    .menu>li {...} This selector will only affect <li>s that are a direct child of somethign with a class="menu".

    I prefer this method as I know I will need something to fix the lack of :hover support in IE6 for drop down menus anyway and IE7.js fixes both in one go.

    you give the first level a class and target that:
    Code:
    <ul class="menu"> 
     <li class="firstlevel">primo   <ul>   
     <li>one</li>   
     <li>two</li>   
    </ul>  </li>  
    <li class="firstlevel">secundo   <ul>   
     <li>three</li>    
    <li>four</li>  
     </ul>  </li> </ul>
    and the CSS then becomes:
    .menu .firstlevel {...}
    ugly solution if you ask me.

    hope this clarifies things a bit

  3. #3
    Join Date
    Feb 2009
    Posts
    71

    Re: IE has a problem with the href attribute

    its the php interpretation of the parameters that you are passing in which is broken.

    Could you explain this a little more?

    But, there is more than one way to skin a cat. Instead, I edited up the CSS to perform the exact same functionality on any link that has the particular class...so, it does work globally now.

  4. #4
    Join Date
    Dec 2008
    Posts
    161

    Re: IE has a problem with the href attribute

    ok, here is the solution:
    for IE, put in the end of your redirecting script this line:

    window.event.returnValue=false;

    now it works perfect..

    it's documented here:
    http://support.microsoft.com/kb/190244/en-us

    edit: funny..they say it applies to IE 4.0 & 4.1.. I use 6.0..so this bug seems to come back..
    another thing is that I don't use 'href="#"' but 'href="javascript://"'..

    sometimes I just hate IE...

Similar Threads

  1. IE7 href + onclick - both happen
    By Ucchal in forum Software Development
    Replies: 5
    Last Post: 24-05-2010, 03:58 PM
  2. onClick - change href
    By Neutrals in forum Software Development
    Replies: 6
    Last Post: 12-05-2010, 09:25 AM
  3. A Href And OnClick Button
    By Endowed in forum Software Development
    Replies: 5
    Last Post: 11-05-2010, 10:24 PM
  4. Cancel href via an onclick
    By Doshi1 in forum Software Development
    Replies: 5
    Last Post: 11-05-2010, 10:04 AM
  5. Problem with color attribute in CSS
    By Carey in forum Software Development
    Replies: 5
    Last Post: 14-01-2010, 01:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,844,027.07631 seconds with 16 queries