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? Quote 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... Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.