icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » PHP Code Help

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old August 10th, 2004, 7:34 PM   #1 (permalink)
Registered User
Comfy Contributor
 
andymaung's Avatar
 
Joined in Apr 2004
Lives in Asia
Hosted on Sky
123 posts
Gave thanks: 0
Thanked 0 times
PHP Code Help

I made the index.php with the following code, so that when I go there this will redirect to another place...

Code:
<?php

header("Location:../anotherplace.php");

?>
This is very simple one. But I want to redirect to open "anotherplace.php" with defined width, height, no toolbar, no location bar, no status bar, no menubar, and no scrollbars, with un-resizable.

So how should I do?
andymaung is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 10th, 2004, 7:55 PM   #2 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
Quote:
Originally Posted by andymaung
I made the index.php with the following code, so that when I go there this will redirect to another place...

Code:
<?php

header("Location:../anotherplace.php");

?>
This is very simple one. But I want to redirect to open "anotherplace.php" with defined width, height, no toolbar, no location bar, no status bar, no menubar, and no scrollbars, with un-resizable.

So how should I do?
So you want it to bring up a new window with pretty well just your content with no extras..
First off, if I have this right it would be done by using code which is blocked by pop-up blocker, generally speaking, you want them to see it. The best way to bring up a new window is to have them click a link.

If you're not wanting to bring up a new window and display that page, you could use in include.
Code:
include("document.ext");
But knowing me I may not be understanding what you're wanting, so correct me if I'm wrong.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 10th, 2004, 8:05 PM   #3 (permalink)
Registered User
Comfy Contributor
 
andymaung's Avatar
 
Joined in Apr 2004
Lives in Asia
Hosted on Sky
123 posts
Gave thanks: 0
Thanked 0 times
I want to bring up a new window like a popup.
andymaung is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 10th, 2004, 8:35 PM   #4 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
Best to use javascript then.
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 12th, 2004, 12:36 PM   #5 (permalink)
Registered User
Seasoned Poster
 
Joined in Jul 2004
31 posts
Gave thanks: 0
Thanked 0 times
For completeness only ...

The javascript for opening a pop-up window as you have described is:

Code:
window.open("mypage.htm", "myWindow", "height=320, width=280, location=no, menubar=no, resizable=no, status=no, toolbar=no);
The code can be made to execute immediately upon visiting a page by using the onLoad attribute of the BODY tag like so:

Code:
<body onload="window.open('mypage.htm', 'myWindow', 'height=320, width=280, location=no, menubar=no, resizable=no, status=no, toolbar=no');">
Though many browsers automatically block pop-up windows that are not specificially opened by the user. For those browsers it's courteous to provide alternative text explaining the problem and a link to get them started.

Code:
<p>Sorry, user.  I don't trust you to control your own browser and feel like breaking the one window one page metaphor.  The creators of your browser gave you the ability to block pop-ups because they, like Wolfy, agree that you should control your browsing experience - unfortunately that breaks my site.  You can bow to my superior design ethic by <a href="#" onClick="window.open('mypage.htm', 'myWindow', 'height=320, width=280, location=no, menubar=no, resizable=no, status=no, toolbar=no'); return false;">clicking here</a>.</p>
<p>PS.  Vote for Kerry, not Bush.</p>
Adjust text, attitude and politics to suit.

-wolf

Last edited by Wolfy; August 12th, 2004 at 12:39 PM.. Reason: Code corrected.
Wolfy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 12th, 2004, 4:38 PM   #6 (permalink)
Registered User
Comfy Contributor
 
andymaung's Avatar
 
Joined in Apr 2004
Lives in Asia
Hosted on Sky
123 posts
Gave thanks: 0
Thanked 0 times
Thank you very much Wolfy.
I am very happy to receive your post, I will try them now. Thanks again.
andymaung is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 12th, 2004, 6:29 PM   #7 (permalink)
I own you!
Excelling Contributor
 
Joined in Apr 2004
563 posts
Gave thanks: 0
Thanked 3 times
Wolfy,

I like the "PS. Vote for Kerry, not Bush" thing

lol
AJPayne is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 12th, 2004, 11:25 PM   #8 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
Sure.. vote for a man who wants to socialize the country.. then we can be as sucessful as, say, france.. or russia. OH, they hate us... why? they say we're arogant... I say "they're jealous!"

Keep the war on terror OVER THERE.. not in my kids school yard. Vote GWBush 2004! Go W!

John
http://stegenga.net
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 13th, 2004, 1:57 PM   #9 (permalink)
Registered User
Comfy Contributor
 
andymaung's Avatar
 
Joined in Apr 2004
Lives in Asia
Hosted on Sky
123 posts
Gave thanks: 0
Thanked 0 times
Hello BigJohn,
I think we should ask admin to open a new forum for Election Polls. By the way, I am not from USA, but I also like Bush.
------------------
However I still have question for PHP... lol
I wish to use only php to redirect to another page as I mentioned in earlier post.
Possible?
andymaung is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On