|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Getting the URL from another frame |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|