Have you tried var path = this.pathname; ? That should do it. However, I think either FF or IE includes the beginning slash while the other doesn't, so you'll probably have to use a replace() in there too. Try this:

var path = this.pathname.replace(/^\//,'')


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jan 8, 2008, at 1:51 PM, x0nix wrote:


Exactly the same problem here ... any workarounds found?

On Jan 8, 1:11 pm, alexanmtz <[EMAIL PROTECTED]> wrote:
Hi everyone,

Im defeat a great problem to read the href attribute on IE.

If I had something like this:

$(".somelink").click(function(){

 var path = $(this).attr("href");

});

With this link: <a href="/test/">some test</a>

The both browsers return "/test/", but when the page is loaded via
ajax with the load method, on ie the result becomes "http://www.domain.com/test/ ".

Anyone know how to retrieve the same result even in a dom generated
page on ie?

Thaks...

Reply via email to