I have the following HTML that pops up a window when I click the ‘Open Sesame’ link:
<a href="/about-us/" title="Find out About Us" onclick="javascript:void window.open('/about-us/','1329304840803','width=1050,height=500,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;">Open Sesame</a></li>
However, I was wondering is it possible I could remove the ‘onClick’ part and just have the javascript within the href & still get the same new window effect. Is this possible?
Many thanks for any pointers
Yes you can:
http://jsfiddle.net/Curt/NqfMX/
However, I would recommend an event listener for this. It makes your HTML code much tidier and seperates the function from the HTML design:
http://jsfiddle.net/Curt/NqfMX/1/