Link to home
Start Free TrialLog in
Avatar of skel
skel

asked on

How to avoid HTML to URLEncode a URL in HREF attribute

Hi all...

If I write <A HREF="ó"></A>, the browser interprets it as
<A HREF="%C3%B3"></A>.. that only happens with HREF attribute. How can I avoid this?

Thanks in advance
Jaime
ASKER CERTIFIED SOLUTION
Avatar of knightEknight
knightEknight
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
it doesn't matter what you put in the href as long as you return false in the onclick, so you could put something more friendly:

<A href="Click Me!" onClick='location="ó";return false;'>click</a>
ofcourse, in this example, the onclick will fail if there is no page called "ó"
Avatar of skel
skel

ASKER

hmm.. thanks.. but maybe I needed to give you the right example of my situation....

I needed
<A HREF="JavaScript:process('ó');">

but with no wanting, you helped me... I used onClick event and it worked

Jaime