0

I have a web site with this element:

<a id="ProPayHyperLink" href="javascript:$ProPay.playIntro('ProPay');" target="_blank">ProPay Payment Center</a>

In Chrome, it successfully runs the $ProPay.playIntro script. However, when I run the site in FireFox or IE, I get a new blank tab. Using debugger, I can see that it never gets to the javascript code.

I am running IE 11 and Firefox 30.0

What am I doing wrong?

UPDATE I use target="_blank" because the javascript href is temporary and only for specific situations, and because it didn't cause issues in Chrome. I can always add and remove it as needed though.

8
  • Why dont you remove the target blank? Commented Jul 22, 2014 at 11:57
  • 1
    javascript URI Scheme is unofficial but common used URI scheme. So browsers can support it differently. Commented Jul 22, 2014 at 11:58
  • @doniyor that fixed it for me jsfiddle.net/4T63p Commented Jul 22, 2014 at 11:59
  • @andrew in ff and ie also? Commented Jul 22, 2014 at 12:01
  • @doniyor, see my update for an explanation. Removing it also fixed it for me in both. I guess I will just add it as needed. I wish the browsers were consistent. Commented Jul 22, 2014 at 12:01

1 Answer 1

1

Try to remove target blank, as Pinal says, browsers support it differently.

<a id="ProPayHyperLink" href="javascript:$ProPay.playIntro('ProPay');" >ProPay Payment Center</a>

I am in train, sorry for not full answer.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.