Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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.