New Window??
Moderator: General Moderators
New Window??
I have a link. I want to implement this link in that way so that when I will click it, it will creat a new window without any address bar or any other bar. Suppose that window just contain a picture of a Building. How to do that?
- trollll
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 10, 2003 11:56 pm
- Location: Round Rock, TX
- Contact:
You could just use javascript's window.open() function and specify the property list to have it not include the address bar.
Well I am trying the following code using a function so that I can resize the window without modifying the original function. But it's giving me an error. Any suggestion?
Code: Select all
<html>
<head>
<script type="text/javascript">
function open_win(href,menubar,height,width)
{
window.open(href,"my_new_window","toolbar=no, location=no, directories=no, status=no, menubar="+menubar+", scrollbars=yes, resizable=no, copyhistory=no, width="+width+", height="+height+" ")
}
</script>
</head>
<body>
<a target="_blank" href="http://www.php.net" onClick="open_win(this.href,yes,400,600);return false;">Open PHP</a>
</body>
</html>Code: Select all
function name_of_function() {
window.open("path_to_file.php", "", "width=523,height=425,toolbars=no,menubar=no,statusbar=no,resizable=no,scrollbars=no,history=no");
}Then it'll be
Code: Select all
<a href="javascript:name_of_function();"> some link </a>