Hi,
I am trying to launching a centered browser window via a form-button using the following code…
<button type=’button’
onClick=”window.open(‘http://www.bbc.co.uk’,’testwin’,’width=400, height=400, left=(screen.availWidth-400)/2, top=(screen.availHeight-400)/2′); return false”>
Test button</button>
The new browser appears the correct height and width, but the left and top clauses are ignored.
Am I being too ambitious trying to make this code in-line? Is there any other syntax I should use or should I give-up and call a function instead (I would rather not if I can avoid it)?
I am using Firefox 3.0.17 (latest), but the same effect happens in IE7.
TIA,
Alan Harris-Reid