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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.