replace that whole javascript in your script tag with the openUrl function, and replace the url currently in the function with the one you would like to open....in your body tag you can do a
Code:
<body onLoad="openUrl()">
you could also send in an argument to the function that can act as the url:
Code:
function openUrl(url){
window.location.href=(url)
window.resizeTo(screen.availWidth,screen.availHeight);
window.moveTo(0,0)
}
then your body tag would look like this:
Code:
<body onLoad="openUrl('http://whatever.url')">
if you change the function call in your old code to reference this function it will still work:
Code:
<a href="javascript:popupWindow('myUrl.html')">Click Here</a>
becomes
Code:
<a href="javascript:openUrl('myUrl.html')">Click Here</a>
you could also send in a second argument to define if you want to open the new link in the current window or in a new one:
Code:
function openUrl(url,newWindow){
if(!newWindow){
window.location.href=(url)
window.resizeTo(screen.availWidth,screen.availHeight);
window.moveTo(0,0)
}else{
newWindow = window.open(win,'newWin','fullscreen=yes,titlebar=no,toolbar=no,location=no,addressbar=no, statusbar= no, scrollbars=yes, resizable= no,left=0,top=0');
newWindow.focus();
}
}
now when you call the function you can send in a second argument to tell it to open in a new window:
Code:
openUrl('http://myUrl.com',true)
will now open your popup window
Bookmarks