5
Hi
Followed the links and this generated code works much better than popups currently using xoops.js.
The problem being that the site name was generated before any code that I entered resulting in a error page
My work around was to add to the xoops.js the following:
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
Then I called it from any location, ie template.html or from any block I created using: put a < before the code!!!! and closing a> after
Quote:
a href="http://www.mysite.com/yournewhtml.html" onclick="NewWindow(this.href,'name','400','400','yes');return false">Yournewhtml
Works a treat and much easier than the orgininal.
Thanks for all who posted help and pointed me in the right direction.
Hope this helps others
Thanks again
Voddie
To ask the hard question is simple