Firstly, it appears that you aren't closing the first <a> tag.
I would guess that this is creating the problem as the browser is attempting to start the second link definition before it has been told where first link defination ends causing a problematic overlap in the structure of the javascript instructions ('syntax error').
---
Fwiw,...
Try adding the destination url to the href attribute instead (replacing the javascript: void).
Replace the return true with return false
This should provide an error-free, 'belts and braces' link that will create a popup if javascript it enabled, but will simply forward the existing browser window to the destination url if javascript isn't enabled.
Also, it would be better for your markup if you were to wrap the guts of the popup code into a header/externalised function.
The destination url could remain as a variable which means you'd only need to call the function and mention the url, rather than repeat the entire window.open(…) procedure again.
e.g.
in the head of your current page (or in an 'external js file' linked to in the header of your current page*):
Code:
function popUp(url) {
window.open(url,'Template_Preview','toolbar=no,location=no,directories=no,menubar=no');
}
(* Note: If 'embedding' the javascript function in the head of a page you will need to use <script type="text/javascript"> ... </script> around the function.)
In the body:
Code:
<a href="destination.html" onclick="window.open(this.href,'Template_Preview','toolbar=no,location=no,directories=no,menubar=no');return false">link element</a>
I hope that helps.
Bookmarks