mnielsen Posted July 14, 2008 Share Posted July 14, 2008 Hi, I'm newish to PHP but I do have a very basic understanding. My question is, When using PHP for example on a standard php page and I want to expand the text to reveal more of the story, like on facebook when you click on a question mark the link has a '#' at the end. What is the code behind it. If you can understand that question some replies would be great. Thanks in advance for any help. Quote Link to comment Share on other sites More sharing options...
unsider Posted July 14, 2008 Share Posted July 14, 2008 Like a 'Read More' type thing, where it goes to the article? Or like JavaScript where it reveals more of the content, when you click the click or an image icon? I'm not familiar with facebook so sorry if I don't completely understand. But if it's one of those 2 it's either done with JS, or PHP. Quote Link to comment Share on other sites More sharing options...
mnielsen Posted July 14, 2008 Author Share Posted July 14, 2008 yes like java script but its in php. Quote Link to comment Share on other sites More sharing options...
unsider Posted July 14, 2008 Share Posted July 14, 2008 Well what you're describing is AJAX (back-end PHP with a JS interface). Although that's odd because when dealing with JS and AJAX the content is loaded without refreshing/reloading the page, that's the entire point. Would it be possible to provide a link to a page that contains these question marks? I don't have an account so keep that in mind. This wuld porbably help me more. Quote Link to comment Share on other sites More sharing options...
mnielsen Posted July 14, 2008 Author Share Posted July 14, 2008 Click on one of the question and note the '#' at the end of the link in the status bar of your browser. http://www.facebook.com/help.php?page=715 Quote Link to comment Share on other sites More sharing options...
waynewex Posted July 14, 2008 Share Posted July 14, 2008 That's Ajax. Have a look here for a simplified example of how to implement Ajax. http://w3schools.com/php/php_ajax_intro.asp Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted July 14, 2008 Share Posted July 14, 2008 That can just be done with Javascript, no PHP required. Just toggle the display state of a span or div. Simple. Quote Link to comment 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.