Jump to content

Link to Div on same page possible with php?


batstanggt

Recommended Posts

In do my own research its looking increasingly like javascript is my only option. Any other suggestions besides the aforementioned? I thought about using include() or header right in the div tag but i dont know if that will accomplish what im looking to do.

-SB

Link to comment
Share on other sites

If you want to do this with PHP, you will need to reload the page whenever the user clicks the link. Then redisplay the page with the changed content in that div.

 

If you want to do this such that the content is updated in the div without refreshing the page, then you need to use AJAX: combination of client-side (JavaScript) and server-side (in this case PHP). You could look into using jQuery, a javascript framework, that makes it fairly easy to implement some AJAX. Do a search for "jquery AJAX tutorial" and see if it is something you want to tackle.

 

Well, there is another option: frames. but, frames suck.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.