Page 1 of 1
New Window??
Posted: Mon Aug 25, 2003 9:22 am
by szms
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?
Posted: Mon Aug 25, 2003 9:32 am
by trollll
You could just use javascript's
window.open() function and specify the property list to have it not include the address bar.
Posted: Mon Aug 16, 2004 9:04 am
by szms
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>
Posted: Mon Aug 16, 2004 9:11 am
by Draco_03
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");
}
that's the way to write it
Then it'll be
Code: Select all
<a href="javascript:name_of_function();"> some link </a>
there you go
Posted: Mon Aug 16, 2004 9:16 am
by szms
well I am trying to manipulate the function by passing variables. I think you didn't get what I am looking for. Thank you anyway. Further suggestion will be more appritiated.
Posted: Mon Aug 16, 2004 10:05 am
by markl999
onClick="open_win(this.href,yes,400,600); <-- you need to quote yes, eg 'yes'