How to get full URL in Frame

How to get full URL in Frame

am 03.08.2007 17:20:52 von GTS

My client has an odd setup where his web site is hosted on an external
server but to enable access to it using his servers domain name/url a frame
is used pointing to the IP address of the external server. This works fine
for the top level (first link) with the HTML code below. However, a sub
page cannot be accessed directly this way. I'm looking for a way to get the
full URL passed to the frame and putting it into a variable that I can then
use with the src. This is on a Linux server running Apache.
I'd appreciate any ideas on this.

http://mywebsite.com/
http://mywebsite.com/susiepage







This page uses frames, but your browser doesn't support them.



http-equiv="refresh" content="0; URL=http://99.99.999.99">

Re: How to get full URL in Frame

am 03.08.2007 17:42:29 von dorward

On Aug 3, 4:20 pm, "GTS" wrote:
> My client has an odd setup where his web site is hosted on an external
> server but to enable access to it using his servers domain name/url a frame
> is used pointing to the IP address of the external server.

Sounds like typical check-and-nasty frames based DNS hosting. He
really should get proper hosting instead.

> This works fine
> for the top level (first link) with the HTML code below. However, a sub
> page cannot be accessed directly this way. I'm looking for a way to get the
> full URL passed to the frame and putting it into a variable that I can then
> use with the src.

Do you control the server that generates the frame source code? If so,
fix the syntax errors (starting with the missing doctype), then
dynamically generate the src attribute based on the URL of the page
reqested.

Otherwise, you can't do anything about it.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Re: How to get full URL in Frame

am 03.08.2007 17:58:00 von GTS

"David Dorward" wrote in message
news:1186155749.358731.217850@o61g2000hsh.googlegroups.com.. .
> On Aug 3, 4:20 pm, "GTS" wrote:
>> My client has an odd setup where his web site is hosted on an external
>> server but to enable access to it using his servers domain name/url a
>> frame
>> is used pointing to the IP address of the external server.
>
> Sounds like typical check-and-nasty frames based DNS hosting. He
> really should get proper hosting instead.
>

I agree and hope to change this in the futher. However, I need a fix for
the interim.

>> This works fine
>> for the top level (first link) with the HTML code below. However, a sub
>> page cannot be accessed directly this way. I'm looking for a way to get
>> the
>> full URL passed to the frame and putting it into a variable that I can
>> then
>> use with the src.
>
> Do you control the server that generates the frame source code? If so,
> fix the syntax errors (starting with the missing doctype), then
> dynamically generate the src attribute based on the URL of the page
> reqested.
>

Yes. I do now control the server. I appreciate the reply but advising me
to dynamically generate the src attribute doesn't help. That was my
question - How can I dynamically generate the src attribute based on the
URL of the page reqested? More specifically, how can I determine the full
URL?
Thanks.
>
> --
> David Dorward
> http://dorward.me.uk/
> http://blog.dorward.me.uk/
>

Re: How to get full URL in Frame

am 04.08.2007 00:03:36 von dorward

On Aug 3, 4:58 pm, "GTS" wrote:
> Yes. I do now control the server. I appreciate the reply but advising me
> to dynamically generate the src attribute doesn't help. That was my
> question - How can I dynamically generate the src attribute based on the
> URL of the page reqested? More specifically, how can I determine the full
> URL?

That depends on the server and what you run on it.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Re: How to get full URL in Frame

am 04.08.2007 04:42:44 von GTS

"David Dorward" wrote in message
news:1186178616.189226.117350@19g2000hsx.googlegroups.com...
> On Aug 3, 4:58 pm, "GTS" wrote:
>> Yes. I do now control the server. I appreciate the reply but advising
>> me
>> to dynamically generate the src attribute doesn't help. That was my
>> question - How can I dynamically generate the src attribute based on
>> the
>> URL of the page reqested? More specifically, how can I determine the
>> full
>> URL?
>
> That depends on the server and what you run on it.
>
> --
> David Dorward
> http://dorward.me.uk/
> http://blog.dorward.me.uk/
>

No kidding? :)

Re: How to get full URL in Frame

am 04.08.2007 05:36:34 von John Hosking

GTS wrote:
>
> "David Dorward" wrote in message
> news:1186178616.189226.117350@19g2000hsx.googlegroups.com...
>> On Aug 3, 4:58 pm, "GTS" wrote:
>>> Yes. I do now control the server. I appreciate the reply but
>>> advising me to dynamically generate the src attribute doesn't
>>> help. That was my question - How can I dynamically generate
>>> the src attribute based on the URL of the page reqested? More
>>> specifically, how can I determine the full URL?
>>>
>>
>> That depends on the server and what you run on it.
>
> No kidding? :)

I guess the smiley means you're satisfied with the answers and don't
need any more help, for example with how you determine the full URL.

HAND!

--
John
Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html

Re: How to get full URL in Frame

am 04.08.2007 16:33:34 von GTS

>>>>
>>>
>>> That depends on the server and what you run on it.
>>
>> No kidding? :)
>
> I guess the smiley means you're satisfied with the answers and don't need
> any more help, for example with how you determine the full URL.
>
> HAND!
>
> --
> John
> Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html

No, it was meant as a nice way of saying 'What's the point of posts that
state the obvious, impart no information, and just tell me you don't know
the answer either?". I already stated the type of server (OS and web
server). I'm a system and networking professional, admittedly rusty on web
development, and frequently help others especially in the Microsoft news
groups. I don't play games with people.

Is your post meant to imply you have a possible solution? If so, I'd
appreciate it.

Re: How to get full URL in Frame

am 04.08.2007 18:23:21 von John Hosking

GTS wrote:
>
> No, it was meant as a nice way of saying 'What's the point of posts that
> state the obvious, impart no information, and just tell me you don't
> know the answer either?". I already stated the type of server (OS and
> web server). [...]
>
> Is your post meant to imply you have a possible solution? If so, I'd
> appreciate it.

No, it was meant to imply that you should have provided the info about
OS and web server when David asked for it. I wasn't trying to be
especially nice. I thought you were being a jerk. I was hoping that that
would filter through, in a slow and subtle way.

Turns out I'm the jerk. I've looked back through your posts again, this
time for the third time, and finally located the sentence "This is on a
Linux server running Apache." It actually appears in two posts, in clear
black letters. Nevertheless, I missed it before. Twice.

By way of apology, I'd *love* to provide a possible solution, but (a)
I'm only just starting with Apache (what little expertise I have is MS
IIS), and (b) I don't completely understand your situation. I've been
monitoring the thread so I can figure out the problem. (I still don't
see what doesn't work. I also don't do frames, so that's my third
strike, and I go down swinging.)

Good luck.

--
John
Putting down my bat and looking for my harikiri knife...

Re: How to get full URL in Frame

am 04.08.2007 20:16:20 von GTS

> By way of apology, I'd *love* to provide a possible solution, but (a) I'm
> only just starting with Apache (what little expertise I have is MS IIS),
> and (b) I don't completely understand your situation. I've been monitoring
> the thread so I can figure out the problem. (I still don't see what
> doesn't work. I also don't do frames, so that's my third strike, and I go
> down swinging.)
>
> Good luck.
>
> --
> John
> Putting down my bat and looking for my harikiri knife...

Thanks for the thought and good wishes. I'm more well versed in IIS and
Windows also. I think I have a lead on a solution using a PHP script, not
my forte, but something I may be able to work with by a little study having
done some scripting with similar tools in the past.

Re: How to get full URL in Frame

am 05.08.2007 00:23:13 von Blinky the Shark

John Hosking wrote:

> -- John Pondering the value of the UIP:
> http://blinkynet.net/comp/uip5.html

Oh, c'mon. :) It's the best thing since sliced...uh...Google Groupers.


--
Blinky RLU 297263
Killing all posts from Google Groups.
Except in Thunderbird, which can't filter that well.
The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html

Re: How to get full URL in Frame

am 05.08.2007 02:09:05 von John Hosking

Blinky the Shark wrote:
> John Hosking wrote:
>
>> -- John Pondering the value of the UIP:
>> http://blinkynet.net/comp/uip5.html
>
> Oh, c'mon. :) It's the best thing since sliced...uh...Google Groupers.

Well, I'm still "pondering" because (a) I'm not sure that there aren't
some good souls out there who, nevertheless, make worthwhile posts via
GG, and (b) I haven't completed my slow-motion migration to Dialog, and
TB doesn't do scoring. I can picture myself at "killing" (if not
"slicing") sometime soon, though. In the meantime, my sig (potentially)
points ponder-prone people to the UIP (promotionally).

--
John
Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html

Re: How to get full URL in Frame

am 05.08.2007 02:46:51 von Blinky the Shark

John Hosking wrote:
> Blinky the Shark wrote:
>> John Hosking wrote:
>>
>>> -- John Pondering the value of the UIP:
>>> http://blinkynet.net/comp/uip5.html
>>
>> Oh, c'mon. :) It's the best thing since sliced...uh...Google
>> Groupers.
>
> Well, I'm still "pondering" because (a) I'm not sure that there aren't
> some good souls out there who, nevertheless, make worthwhile posts via
> GG, and (b) I haven't completed my slow-motion migration to Dialog,
> and

I rather like Dialog, althought not its proprietary scoring. I can
share score files between other clients (even between Win and Linux).
So I use Dialog only for email only on my Win laptop. My favorite of
the Windows clients is Xnews. It's one that can share my main score
file with others.

> TB doesn't do scoring. I can picture myself at "killing" (if not

Note the third text line in my sig. :)

> "slicing") sometime soon, though. In the meantime, my sig
> (potentially) points ponder-prone people to the UIP (promotionally).

And I was just about to thank you for having it there. So...hey, thanks
for having it there. :)


--
Blinky RLU 297263
Killing all posts from Google Groups.
Except in Thunderbird, which can't filter that well.
The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html

Re: How to get full URL in Frame

am 05.08.2007 09:03:27 von dorward

On Aug 4, 3:33 pm, "GTS" wrote:
> I already stated the type of server (OS and web server).

... but not if it supports CGI (Perl, python, ruby), mod_perl,
mod_mono, PHP, etc, etc.

(And I'll confess I overlooked the mention of the OS and HTTPD in the
initial post, "No kidding" doesn't do a very good job of pointing out
"Well I did already mention".)

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Re: How to get full URL in Frame

am 05.08.2007 19:35:30 von Adrienne Boswell

Gazing into my crystal ball I observed "GTS" writing in
news:Un3ti.2517$dD3.222@trnddc07:

>> By way of apology, I'd *love* to provide a possible solution, but (a)
>> I'm only just starting with Apache (what little expertise I have is
>> MS IIS), and (b) I don't completely understand your situation. I've
>> been monitoring the thread so I can figure out the problem. (I still
>> don't see what doesn't work. I also don't do frames, so that's my
>> third strike, and I go down swinging.)
>>
>> Good luck.
>>
>> --
>> John
>> Putting down my bat and looking for my harikiri knife...
>
> Thanks for the thought and good wishes. I'm more well versed in IIS
> and Windows also. I think I have a lead on a solution using a PHP
> script, not my forte, but something I may be able to work with by a
> little study having done some scripting with similar tools in the
> past.
>

My suggestion is to loop through the server properties, and one of them
should tell you what the full URL is, IIRC SCRIPT_NAME is the one that
will do it. Check http://us2.php.net/reserved.variables for some more
server variables and http://koivi.com/apache-iis-php-server-array.php
gives a comparisson between IIS and Apache.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Re: How to get full URL in Frame

am 05.08.2007 19:45:17 von GTS

>> little study having done some scripting with similar tools in the
>> past.
>>
>
> My suggestion is to loop through the server properties, and one of them
> should tell you what the full URL is, IIRC SCRIPT_NAME is the one that
> will do it. Check http://us2.php.net/reserved.variables for some more
> server variables and http://koivi.com/apache-iis-php-server-array.php
> gives a comparisson between IIS and Apache.
>
> --
> Adrienne Boswell at Home
> Arbpen Web Site Design Services
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share
>
Thanks! That looks promising.