![]() |
|
|
| Subject:
Need a JavaScript onClick Popup Function the HTML link can pass window size to
Category: Computers > Internet Asked by: etpro-ga List Price: $15.00 |
Posted:
10 Jul 2005 20:00 PDT
Expires: 09 Aug 2005 20:00 PDT Question ID: 542000 |
I have a number of Image/text windows I need to popup within a single document. Rather that use a separate popup function for each, I would like to use a generic popup function and have the various triggering link's onClick event handlers pass the function not only the URL but the window size required for that content. |
|
| There is no answer at this time. |
|
| Subject:
Re: Need a JavaScript onClick Popup Function the HTML link can pass window size
From: fell_aj-ga on 11 Jul 2005 11:56 PDT |
<html>
<head>
<title>Popup</title>
<script language="javascript">
function NewWin (url, w, h, name)
{
var winopts = "toolbar=no,location=no,directories=no,status=no,";
winopts = winopts + "menubar=no,scrollbars=yes,resizable=no,";
winopts = winopts + "width=" + w + ",height=" + h;
remote = window.open(url,name,winopts);
}
</script>
</head>
<body>
<a href="javascript:NewWin('images/1.jpg', 400, 400, 'one');"
alt="one" title="one">One</a>
<a href="javascript:NewWin('images/2.jpg', 200, 200, 'two');"
alt="two" title="two">Two</a>
<a href="javascript:NewWin('images/3.jpg', 400, 600, 'three');"
alt="three" title="three">Three</a>
<a href="javascript:NewWin('images/4.jpg', 600, 400, 'four');"
alt="four" title="four">Four</a>
</body>
</html> |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
| Search Google Answers for |
| Google Home - Answers FAQ - Terms of Service - Privacy Policy |