|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
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?
|
|
#2
|
|||
|
|||
|
RE: New Window??
Use the Javascript window.open() function. It allows you to specify what options the window has when it is opened.
|
|
#3
|
|||
|
|||
|
RE: New Window??
Here is a link that explains it.
http://www.devguru.com/technologies/ecmascript/quickref/win_open.html |
|
#4
|
|||
|
|||
|
RE: New Window??
Thank you for your information. How do I disable the minmize and maximise option of that new window.
|
|
#5
|
|||
|
|||
|
RE: New Window??
I don't think that is possible, at least I have never been able to find any information on it.
|
|
#6
|
|||||
|
|||||
|
RE: New Window??
I don't think you can disable minimize but aximize is disabled by resizable=0 in this function:
php Code:
the link code looks like this: <a href="javascript:popUp('h01.htm','h01')">link</a> the first parameter is the URL and the second is the window name, if you use the same window name then all your popups will open in the same window, and if you change the name on each link you'll get a new window each time. In the function you can position where the new window opens, and define how large the window is. This turns off, toolbars, locationbar, status bar, scrollbars, menu and resize. |
|
#7
|
|||
|
|||
|
RE: New Window??
he following code is for clicking a button to open a new window but I would like to click a link so that I can have a new window according to my design and feature. Any help?
Code:
<html>
<head>
<script type="text/javascript">
function open_win()
{
window.open("http://www.hotmail.com","my_new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=400, height=400")
}
</script>
</head>
<body>
<form>
<input type="button" value="Open Window" onclick="open_win()">
</form>
</body>
</html>
|
|
#8
|
|||
|
|||
|
RE: New Window??
do you mean that you want to click a link and have the new window open the link?
|
|
#9
|
|||
|
|||
|
RE: New Window??
yes exactly.
|
|
#10
|
|||
|
|||
|
RE: New Window??
here is your example modified a bit.
<html> <head> <script type="text/javascript"> function open_win(href,height,width) { window.open(href,"my_new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width="+width+", height="+height) } </script> </head> <body> <form> <a href="http://www.php.net" onClick="open_win(this.href,400,600);return false;">Open PHP</a> </form> </body> </html> by passing the href property of the link and the height and width, you can control what url the new window opens as well as the height and width of the window. you could also add other arguments to the function to give you even greater control over the window. |
|
#11
|
|||
|
|||
|
RE: New Window??
I would like to chage the function parameter as open_win(this.href,menubar,width,height) and want to pass the
following values: open_win(this.href,yes,400,600) But having an error for not getting the proper value for the variables. Is this the right way to do it? 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+" ") |
|
#12
|
|||
|
|||
|
RE: New Window??
here is the modified code.
<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> <form> <a href="http://www.php.net" onClick="open_win(this.href,'yes',400,600);return false;">Open PHP</a> </form> </body> </html> when passing the argument for the menubar, you must enclose it in single quotes. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > New Window?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|