SunQuest
 
           PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old June 4th, 2004, 10:01 AM
anthea anthea is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 anthea User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Determining path + filename of actual file and pass it on as link-variable

Hi,

I've got a problem that doesn't look too complicated to me, yet I can't seem to solve it on my own since I'm real PHP dummy ...

I have a "file_A" containing a link like this:

<a href="http://www.myhomepage.com/mypath/FILE_B.php?action=popup&url=[...]">linkname</a>

This link is calling file_B (url is known and thus static) and supposed to pass on the URL of file_A with $url. Path and filename of file_A is varying since I have a whole lot of files_A, so I need a little function or whatever determining the url of the actual/calling file_A.

Is this difficult to do? I'm really grateful for any help,

Angela


Reply With Quote
  #2  
Old June 4th, 2004, 10:59 AM
Pheifel Pheifel is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: Denmark
Posts: 174 Pheifel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 46 sec
Reputation Power: 5
Send a message via MSN to Pheifel
in the file_b you can use a JS (java script) calling the opener (the specific opening file_a) this is done like this:

Code:
window.opener.location.href


this will give you the specific url of the opener-page (the file_a) then you can print it ore use it as you like from here

Hope it helpes

- Pheifel

Reply With Quote
  #3  
Old June 4th, 2004, 12:18 PM
fizker fizker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: denmark
Posts: 42 fizker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 18 m 18 sec
Reputation Power: 5
Send a message via MSN to fizker
or you could create the url for file_a dynamically when creating the link by using the $_SERVER['REDIRECT_SCRIPT_URI'] for the uri or $_SERVER['REDIRECT_SCRIPT_URL'] for the url
__________________
Benjamin Horsleben
horsleben.com/benjamin
Don't blame malice for what stupidity can explain

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Determining path + filename of actual file and pass it on as link-variable


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 2 hosted by Hostway