ftp popup

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Infinity
Forum Commoner
Posts: 44
Joined: Mon Feb 02, 2004 12:48 pm

ftp popup

Post by Infinity »

what i need to do is link to a php page called redirect.php and when this page loads i want to redirect it to my ftp server in a popup or new browser window without having to click a link
thanx
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

a redirect within a redirect wich leeds to the ftp server in a new browser?

my best guess is -> java


the redirecting part you could do with php, the popup -> java

Correct me if i am wrong ;-)
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

try making a JS function to open a page in a new window, and then in your redirect.php(it doesn't even have to be a php file) you can put
<body onLoad="newWin()"> where newWin() is the name of your JS function taht open a new window.
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Actually, it wouldn't even have to be a different page. you could put that JS function in your main page that has the link to redirect.php, and then on your link just do something like:
<a href="#" onClick="newWin()">FTP</a>
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

in case you do not know how to write the function, using the above info it might look something like this:

Code: Select all

<script language=javascript>
function newWin() {
  window.open("your ftp site address", "Ftp","width=#,height=#");
}
</script>
you can set your own sizes in place of the #'s.

/ edit, cheers for the correction ill.
Last edited by tim on Fri Feb 27, 2004 7:00 pm, edited 1 time in total.
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

not a new window to redirect.php, but the new window to your FTP site
Infinity
Forum Commoner
Posts: 44
Joined: Mon Feb 02, 2004 12:48 pm

Post by Infinity »

Code: Select all

<?php<script language=javascript> 
function newWin() { 
  window.open("your ftp site address", "Ftp","width=#,height=#"); 
} 
</script>


?>
Ah yes thats what im looking for
thanx guys
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Suggestion: When posting code other than PHP don't use the PHP tags, use the CODE tags
Infinity
Forum Commoner
Posts: 44
Joined: Mon Feb 02, 2004 12:48 pm

Post by Infinity »

sorry force of habit
Post Reply