This is a newb question, but any help would be appreciated.
In HTML you can use frames and then target a specific link to load in a specified frame. Is there anything like this in PHP so I don't always have to load a new page? What is currently the best way to go about this(within PHP or not)?
Thanks,
Spec36
Something like frames in PHP? [Solved]
Moderator: General Moderators
Something like frames in PHP? [Solved]
Last edited by spec36 on Thu Nov 19, 2009 7:11 pm, edited 1 time in total.
- iankent
- Forum Contributor
- Posts: 333
- Joined: Mon Nov 16, 2009 4:23 pm
- Location: Wales, United Kingdom
Re: Something like frames in PHP?
Well, two options:
1. You can continue to use HTML frames to split up your HTML pages. You can use A links to open specific php files in certain frames to do whatever you like. You can also use IFRAME's to embed one file in another. A quick and easy way, but doesn't look too good and has a few compatibility problems.
2. The more modern and 'cool' way of doing it - AJAX. This uses javascript to update the page without reloading the whole thing from the server. When the user clicks buttons etc the javascript code sends requests to PHP scripts on the server and updates the page with the result. This is the neatest way, but requires javascript and makes some of the programming a bit more complicated (although, also makes other bits easier!)
hth
1. You can continue to use HTML frames to split up your HTML pages. You can use A links to open specific php files in certain frames to do whatever you like. You can also use IFRAME's to embed one file in another. A quick and easy way, but doesn't look too good and has a few compatibility problems.
2. The more modern and 'cool' way of doing it - AJAX. This uses javascript to update the page without reloading the whole thing from the server. When the user clicks buttons etc the javascript code sends requests to PHP scripts on the server and updates the page with the result. This is the neatest way, but requires javascript and makes some of the programming a bit more complicated (although, also makes other bits easier!)
hth
Re: Something like frames in PHP?
thanks for the quick response. I will check out ajax.