Tracker
02-01-2008, 05:10 AM
Hi guys
i'm setting up a popup window for my weathernews but dose not want to work at all
<a href="stormnews.php"><img src="images/read3.jpg" border="0" onClick="MM_openBrWindow('','','')"></a>i'm not sure what size to use for the popup window i have the code but where dose it go.
codeexploiter
02-01-2008, 07:53 AM
If you are looking for creating a new browser (popup) window then you need JavaScript.
window.open("http://www.dynamicdrive.com/","my_window_name","height=300,width=500,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes");
if you look at the open function you can see that 3 parameters are passing into the function
1. The url which you want to open.
2. New window name
3. Window configuration values (optional)
For more details about the configuration items you can visit the following
http://developer.mozilla.org/en/docs/DOM:window.open
Probable Solution
<a href="#" onclick="javascript: loadPage('stormnews.php');"><img src="images/read3.jpg" border="0" /></a>
<script type="text/javascript">
function loadPage(url){ window.open(url,"my_window","height=300,width=500,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes");
}
</script>
You can change the window configuration parameter based on your requirement.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.