Page 1 of 1

php page wth no menubar and toolbar in explorer

Posted: Wed Feb 12, 2003 4:51 pm
by hakiki_dolphin
Hi,

I want to open the php page in explorer with no menubar and toolbar. What can I do this?
If you can help me, I will be very happy.
Sincerely.
Ahmet Kara

ahmet_k_2002@yahoo.com :?:

Posted: Wed Feb 12, 2003 4:59 pm
by hurkle
The only way I've found to do this is with client side scripting, i.e. Javascript. When you use the window.open command, you can set a variety of parameters to 'no', which will give you the effect you're looking for.

This effect is usually referred to as a 'chromeless' browser window, you might want to do some searches to see if anyone has found a way to do this with php.

best of luck.

Posted: Wed Feb 12, 2003 5:28 pm
by patrikG
PHP is serverside and by its very nature only prepares information to be dished out.

Think of the internet as a restaurant.

1. You order a meal (click on a link or type in a URL etc.)
2. The waiter takes your order and tells the cook what you have ordered.
3. The cook prepares your meal.
4. The waiter takes the meal from the kitchen to you - he serves you.

PHP is only involved in step 2. and 3.

What you want is like trying to change the way the waiter serves the meal, e.g. standing on one leg, singing "I'm a lumberjack", whatever.

PHP can't do this. Use Javascript. Check the window-object in the DOM. You'll see all the options available 8)

Website with Javascript tutorials:
http://www.devshed.com/
http://www.javascriptkit.com/
http://www.webmonkey.com/

Posted: Wed Feb 12, 2003 7:00 pm
by Kriek
See window.open documentation.

Posted: Wed Feb 12, 2003 7:20 pm
by patrikG
That one won't work. Try

Code: Select all

<SCRIPT LANGUAGE="JavaScript">
function launch() &#123;
	win0=window.open("test.html","","width='400',height='400',menubar=no location=no,toolbar=no,status=no,scrollbars=yes,resizable=yes");
&#125;
// write link
document.write('<A HREF="javascript:launch()">open window</A>')
</SCRIPT>

Posted: Wed Feb 12, 2003 7:53 pm
by Kriek
Patrik's method is correct.

Now I remeber why I hate JavaScript =)

Posted: Wed Feb 12, 2003 10:11 pm
by fractalvibes
See: http://www.javascriptkit.com/ for some really good info on javascript info. As was previously stated, PHP cannot do this, as it is a client-side operation.

However - do not forget that the PHP can write out the javascript before it is sent to the browser, so if you need to build the js stuff conditionally, you can do so.

Also - did you know that you can put all your javascript into a file, save as
a php file, and include as you wish?
i.e.

<!-- new code to replace all inline javascript -->
<?php
include ("Cooljs.php");
?>

That included file is 100% javascript, all the functions within callable within the main page.

Phil J.

Posted: Mon Feb 17, 2003 12:45 pm
by hakiki_dolphin
Hi,
Thanks for your reply. I tried to do but I think I had some mistakes.
In login.php I take the username and password in a form from the user and send them into enter1.php. I want to enter1.php in the explorer with no menubar and toolbar. I try to add some java codes into it. There are the codes below. Where must I put the javascript codes in php codes for this? Or is there a different way to make a page with no menubar and toolbar?
If you can help me, I will very happy.

<HEAD>...</HEAD>


<script language="javascript">
function windowopen() { open ("sayfa_ismi.htm","","height=300,width=250,scrollbars=no,resizable=no,status=no,menubar=no,toolbar=no,location=no") }
</script>

<body>... </body>
OnLoad="javascript:windowopen()


Sincerely.

Ahmet Kara

ahmet_k_2002@yahoo.com

Posted: Mon Feb 17, 2003 1:18 pm
by patrikG
Where must I put the javascript codes in php codes for this? Or is there a different way to make a page with no menubar and toolbar?
No, javascript is the way to go to have a window open with no menubar and toolbar.

PHP will output HTML and in HTML javascript-code can be located anywhere. However, it is recommended to keep javascript-code between the
<head> and </head>-tags.

Btw: note that the onload-event must be located in the <body>-tag.
Your code above should read:

Code: Select all

...
<body onLoad="windowopen();">