Rheves Posted February 28, 2009 Share Posted February 28, 2009 I'm making a Gallery page on my site and I currently have it set up so that when the page loads if you have the address "site.com/Portfolio.php#fishandchips_l.jpg" javascript will load that picture as the default. I don't like it because it loads the default image first, THEN switches it out with the one specified in the url. I want to use PHP to grab what follows the # in the address but all my attemps only return "Portfolio.php". I have tried $_SERVER['PHP_SELF'], $_SERVER['REQUEST_URI'], and $_SERVER['SCRIPT_NAME']. Also the gallery needs to NOT refresh on each change of picture so using ?Image= instead of # in the URL is not doable. Is anyone able to help me out here? Link to comment https://forums.phpfreaks.com/topic/147341-php-current-complete-url-address/ Share on other sites More sharing options...
DarkSuperHero Posted February 28, 2009 Share Posted February 28, 2009 i think you might want to look into ajax if you dont want to have to refresh the page... Link to comment https://forums.phpfreaks.com/topic/147341-php-current-complete-url-address/#findComment-773398 Share on other sites More sharing options...
Rheves Posted February 28, 2009 Author Share Posted February 28, 2009 Well I have that part working, the page is here: http://mike.otherskies.net/Portfolio.php All the javascript is working, I'd just like to replace the current default image javascript code with php, to make it more efficient. Link to comment https://forums.phpfreaks.com/topic/147341-php-current-complete-url-address/#findComment-773400 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.