|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Determining path + filename of actual file and pass it on as link-variable |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|