Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 15-04-2009
Member
 
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!!
Reply With Quote
  #2  
Old 15-04-2009
Member
 
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
Reply With Quote
  #3  
Old 15-04-2009
Member
 
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.
Reply With Quote
  #4  
Old 15-04-2009
Member
 
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...
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "IE has a problem with the href attribute"
Thread Thread Starter Forum Replies Last Post
IE7 href + onclick - both happen Ucchal Software Development 5 24-05-2010 03:58 PM
onClick - change href Neutrals Software Development 6 12-05-2010 09:25 AM
A Href And OnClick Button Endowed Software Development 5 11-05-2010 10:24 PM
Cancel href via an onclick Doshi1 Software Development 5 11-05-2010 10:04 AM
Problem with color attribute in CSS Carey Software Development 5 14-01-2010 01:20 AM


All times are GMT +5.5. The time now is 06:37 PM.