Johnny2 Posted March 13, 2013 Report Share Posted March 13, 2013 I'm trying to include a file, but want to show the file at a specific location. I figured I'd just use a named anchor in my include, but it doesn't seem to work. Is there a way to do this?... or am I once again trying to do something impossible? I know I can probably use a regular link to go to that specific location on the page, but in my situation I need to "include" the other file (so that my variables will still be defined). include(otherFile.php#anchor); Thanks! Quote Link to comment Share on other sites More sharing options...
falkencreative Posted March 13, 2013 Report Share Posted March 13, 2013 Unfortunately that isn't the way that includes work. I'm not quite sure what you have in mind... you might look into AJAX instead, where you use Javascript to insert content from a file into a page (for example: http://api.jquery.com/jQuery.get/) or using a session and session variables to keep certain variables defined while switching pages. 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.
Note: Your post will require moderator approval before it will be visible.