Re: [PHP] Checking a frames url..

2001-12-17 Thread Charles Williams

Necro,

inline below

- Original Message -
From: "Necro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 17, 2001 9:58 AM
Subject: [PHP] Checking a frames url..


> Lo all,
>
> I am trying to write a script that will output to a frame the current
> location within a site..
> like Home :: Contact
> I need PHP to be able to check the url of the frame "main" and then parse
> out anything after the domain to decide what to output as the location.
> e.g. http://domain.com/contact/index.html
> (http://domain.com) <<-- forgotten
> (contact/index.html)
> If URL = contact/index.html {
> echo('Home :: Contact'); }
> If URL = business/index.html {
> echo('Home :: Business'); }
>
> Am I on the correct track with most of it?? I just cant work out how to
grab
> the URL of a single frame.
>
> Thanx
>
> Andrew

you basically have it right there.  You can do it easier by passing the $loc
(location) per the url (&loc=contact) or per session.  either way you have
the page that is being called and can then use the following to output the
location

echo strtoupper($loc);

all done.

chuck



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Checking a frames url..

2001-12-17 Thread Fred

This will not work.  JavaScript is a client side language and will not have
the frame information until the browser has the web page, at which time all
parsing of the php code (done on the server side) is already complete.

Fred

Richard Black <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You can get the URL of a frame using JavaScript - maybe you could pass
this in somehow to the PHP script???
>
> -Original Message-
> From: Necro [SMTP:[EMAIL PROTECTED]]
> Sent: 17 December 2001 08:59
> To: [EMAIL PROTECTED]
> Subject: [PHP] Checking a frames url..
>
> Lo all,
>
> I am trying to write a script that will output to a frame the current
> location within a site..
> like Home :: Contact
> I need PHP to be able to check the url of the frame "main" and then parse
> out anything after the domain to decide what to output as the location.
> e.g. http://domain.com/contact/index.html
> (http://domain.com) <<-- forgotten
> (contact/index.html)
> If URL = contact/index.html {
> echo('Home :: Contact'); }
> If URL = business/index.html {
> echo('Home :: Business'); }
>
> Am I on the correct track with most of it?? I just cant work out how to
grab
> the URL of a single frame.
>
> Thanx
>
> Andrew
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Checking a frames url..

2001-12-17 Thread Richard Black

You can get the URL of a frame using JavaScript - maybe you could pass this in somehow 
to the PHP script???

-Original Message-
From:   Necro [SMTP:[EMAIL PROTECTED]]
Sent:   17 December 2001 08:59
To: [EMAIL PROTECTED]
Subject:[PHP] Checking a frames url..

Lo all,

I am trying to write a script that will output to a frame the current
location within a site..
like Home :: Contact
I need PHP to be able to check the url of the frame "main" and then parse
out anything after the domain to decide what to output as the location.
e.g. http://domain.com/contact/index.html
(http://domain.com) <<-- forgotten
(contact/index.html)
If URL = contact/index.html {
echo('Home :: Contact'); }
If URL = business/index.html {
echo('Home :: Business'); }

Am I on the correct track with most of it?? I just cant work out how to grab
the URL of a single frame.

Thanx

Andrew


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]