Javscript How To Make Link With New Browser Popup Window HTML Code Script



Javscript How To Make Link With New Browser Popup Window HTML Code Script
 (328) Domains for just $1.99 1751586
Javscript How To Make Link With New Browser Popup Window HTML Code Script
Post Description:
Post Tags: javscript, how, to, make, link, with, new, browser, popup, window, html, code, script
This Post Has Been Viewed 914 Times Since Tue Mar 06, 2007 6:06 pm Posted By edwino85 with 0 replies
Javscript How To Make Link With New Browser Popup Window HTML Code Script
if you wan to create a link where when clicked on, a brwoswer popup window will show when your visitors click on it with a specific demensions thatn this is your tutorial.

Thanks to the support team at www.webune.com for their support on this question

you will need to do two things,

1. firs put this code in between the <head> </head> tags in your HTML pages.

     Code:
<script type="text/javascript" language="JavaScript">
<!--
// http://www.wallpaperama.com
function openwindow(url, width, height) {
var win;
var windowName;
var params;
windowName = "features";
params = "toolbar=0,";
params += "location=0,";
params += "directories=0,";
params += "status=0,";
params += "menubar=0,";
params += "scrollbars=1,";
params += "resizable=1,";
params += "top=50,";
params += "left=50,";
params += "width="+width+",";
params += "height="+height;
win = window.open(url, windowName, params);
}
// -->

</script>


2. The second thing you would need to do is to put the HTML link. For example, i want to put a link so a popup window with a 480 Width and a 380 Legth, i would use the following code to make my link work with my javascript:
     Code:
<a href="javascript:openwindow('terms.html',480,380)" style="text-decoration:underline">Click Here To View Terms</a>


You can try it for yourself, if you have windows, open notepad, copy and past the code below, then save the file as: term.html and open it with your browser.


     Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Wallpaperama Javascript Tips and Tricks New Popup Window File</title>
<script type="text/javascript" language="JavaScript">
<!--
// http://www.wallpaperama.com
function openwindow(url, width, height) {
var win;
var windowName;
var params;
windowName = "features";
params = "toolbar=0,";
params += "location=0,";
params += "directories=0,";
params += "status=0,";
params += "menubar=0,";
params += "scrollbars=1,";
params += "resizable=1,";
params += "top=50,";
params += "left=50,";
params += "width="+width+",";
params += "height="+height;
win = window.open(url, windowName, params);
}
// -->

</script>

</head>

<body>
<h1>Wallpaperama Javascript Tips and Tricks New Popup Window File</h1>
<hr>
<p><a href="javascript:openwindow('terms.html',480,380)" style="text-decoration:underline">Click Here To View Terms</a></p>
<p>&nbsp;</p>
<p>&lt;&lt; Go Back </p>
<p>&nbsp;</p>
<p align="center"><a href="http://www.webune.com">Hosting By Webune.com </a></p>
</body>
</html>

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About Javscript How To Make Link With New Browser Popup Window HTML Code Script




(0) Comments