Forum Moderators: coopster
I'm new to WW forum and hope someone can advise me on a PhP or javascript coding. I am using PhP and MySQL. Here goes...
My intention:
1. In my "example.html" I want to create a link that when clicked, will popup a small browser window (200x200). (For this link, I want it dynamically usable in any webpage. Eg on a sidebar.)
2. In this new popup window, I want to capture and display the URL of the original referer page. For this case it's "http://....example.html".
3. Also in the new window is an option button which says "Save this URL? Yes/No". If user clicks "Yes" it saves the URL into the database.
It is sort of a tool to help users bookmark URLs of my website.
For 1, I have tried using javascript to do the sized popup (using onclick(window.open) ) ....which works, but unable to grab the intended URL onto the new page.
For 2, I can use the default HTML's target="_blank" combined with getenv("HTTP_REFERER") to get the previous URL, but then I cannot make the window size 200x200
How do I fulfill 1 & 2 at the same time?
Fo 3, I guess if I could find a solution to 1 & 2, it will be solved.
Hope someone could help me. Any advise is much appreciated.
Thanks! :)