WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to have a link open in a new pop-up browser window. In non-WordPress with JavaScript I would do it some like this (but I would add some underlink/color to make it look like a link).

<span 
onClick="myRef = window.open('/Paid_Videos/AudioGenerator01.html','mywin',
'left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
myRef.focus()">My Video Blah Blah Blah</span>

In WordPress, this shows up on my page like this:

onClick="myRef = window.open('/Paid_Videos/AudioGenerator01.html','mywin',
'left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
myRef.focus()">My Video Blah Blah Blah 

What can I do to make it work in WordPress?

share|improve this question

Remove the line breaks from your input. wpautop() will insert a <br /> otherwise.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.