I will explain how you can make a pop up box using java script.
<script>
var newwindow;
function poptastic(url) {
newwindow = window.open(url, 'name', "scrollbars=1,resizable=1");
if (window.focus) {newwindow.focus()}
}
</script>
Insert the above function to the head section of your page .You can pass the url you want to open to this function.here is the code sample
<html>
<head>
<script>
var newwindow;
function poptastic(url) {
newwindow = window.open(url, 'name', "scrollbars=1,resizable=1");
if (window.focus) {newwindow.focus()}
}
</script>
</head>
<body>
<a href="javascript:poptastic('http://www.shefeekj.com');">Make Pop Up</a>
</body>
</html>
You can specify the properties of the new window which is opened like scrollbars=1,resizable=1 etc.The other properties
which can be mentioned are
status The status bar at the bottom of the window.
toolbar The standard browser toolbar, with buttons such as Back and Forward.
location The Location entry field where you enter the URL.
menubar The menu bar of the window
directories The standard browser directory buttons, such as What’s New and What’s Cool
resizable Allow/Disallow the user to resize the window.
scrollbars Enable the scrollbars if the document is bigger than the window
height Specifies the height of the window in pixels. (example: height=’350′)
width Specifies the width of the window in pixels.
No related posts.


Microsoft Chart For Visual Studio
Discussion
No comments for “Pop up using Java Script”