I have code that generates SVG that was developed for IE and the Adobe SVG Viewer. The Adobe SVG Viewer has a custom function called browserEval
(see http://www.xml.com/lpt/a/994) that is being used to cause the browser to eval a window.open() call. This doesn't work in Chrome's native SVG renderer (and I haven't tried Firefox).
How can I rewrite this popup function to work properly in all modern SVG-supporting browsers? This original one works in IE but not Chrome:
function popUp(loc) {
browserEval("window.open('"+loc+"','_blank',
'width=1000,height=780,scrollbars=yes,resizable=yes,
status=no,toolbar=no,menubar=no,location=no')");
}
I tried this which works in Chrome but causes an error about number of arguments in IE:
var browserEvalCrossBrowser = (typeof(browserEval)=='undefined') ?
function(x) { eval(x); } : browserEval;
function popUp(loc) {
browserEvalCrossBrowser("window.open('"+loc+"','_blank',
'width=1000,height=780,scrollbars=yes,resizable=yes,
status=no,toolbar=no,menubar=no,location=no')");
}