Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 6th, 2001, 05:15 AM
bbjeff bbjeff is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: Münster (Germany)
Posts: 44 bbjeff User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Question

Is it possible to read the URL from another frame?

All I know is this:
$domain = $ENV{'HTTP_HOST'};
$file = $ENV{'REQUEST_URI'};

This gives me the URL of the perl script itself, but I need the URL from another frame. I know I could load the script from that frame and pass the URL via CGI but maybe its possible the other way round.

I need it for some some kind of rating script. I want my users to be able to rate the quality of each site so it would be cool if I could use the location of the site loaded in the mainframe as an ID for perlscript.

Thanks in advance.

Reply With Quote
  #2  
Old April 6th, 2001, 10:20 AM
unobserved unobserved is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Posts: 11 unobserved User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to unobserved
you can use javascript to do it, and pass the variable along to your script

Code:
var otherFrameLocation = parent.frames[1].document.URL;

play around with the frames[1], and change it to the frame you need the url from, frames[0], frames[2], etc.

then something like:

Code:
parent.window.location = "/cgi-bin/script.pl?action=rate&page="+otherFrameLocation;

will send the page to your script

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Getting the URL from another frame


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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 not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT