Useing php insead of html frames

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
BlueFlame
Forum Commoner
Posts: 33
Joined: Wed Oct 12, 2005 5:21 am

Useing php insead of html frames

Post by BlueFlame »

I wish to use php instead of frames though in php i cant work out how to add the code to the nav bar button so when the user clicks the button it loads up a certain part of the page without loading the whole page again like inline frame work. The only reason i do not wish to use frames is that they do not auto ajust to the content but instead give you a crappy scrool bar.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

with php you will have to reload the whole page when you click a link. php is server side, not client side. you can use includes to make things auto ajust, thats what i usually do. but no matter what the page will have to reload unless you use javascript
BlueFlame
Forum Commoner
Posts: 33
Joined: Wed Oct 12, 2005 5:21 am

Post by BlueFlame »

There has to be a way to do it without going to client side.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

not without frames. if you want php to do anything then you will have to reload the page.
BlueFlame
Forum Commoner
Posts: 33
Joined: Wed Oct 12, 2005 5:21 am

Post by BlueFlame »

ok, so we need iframes. But we can still ajust the size of the iframe depending on wat the size of the content is with php useing variables. Now just to somehow peice this hole thing together. Mabey if i use a config file to get all the widths and heights for all the frames that iv already set up(this will keep it easy to go back and change) and ill just then tell the Frame to ajust when someone clicks the nav button. Hmm if any one has work out what i just said congradulations but if you have a better way please tell.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

just have the table cell where you would normally put the iframe in but instead just use include. then the table, if made properly, will auto adjust itself with the new file being included. instead of having the link goto the iframe just have it reload the whole page with a $_GET variable. based on that $_GET variable you will find the right page to include. takes out the scroll bars and makes the page look nicer
BlueFlame
Forum Commoner
Posts: 33
Joined: Wed Oct 12, 2005 5:21 am

Post by BlueFlame »

But the main focuse on this is not to reload the hole page, at the moment im working off my hole config idea. The only problem is that i need the iframe height refreshed.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

i have tried this. tried for almost a week. thought i got it once in a while but to no avail. it may be possible but its incredibly difficult, actually damn near impossible, expecially making it work on both firefox and IE. you are going to have to look at a different solution most likley.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

yeah.i never could get that to work either..... :-/
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

Use AJAX. It will rock your face.
BlueFlame
Forum Commoner
Posts: 33
Joined: Wed Oct 12, 2005 5:21 am

Post by BlueFlame »

ahhh earthquake.

im learning ajax now, yay
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

BlueFlame wrote:ahhh earthquake.

im learning ajax now, yay
Glad it helped... or if it didn't, it will... :twisted:
BlueFlame
Forum Commoner
Posts: 33
Joined: Wed Oct 12, 2005 5:21 am

Post by BlueFlame »

I think im going way to far with this dam frame idea. Im now learning javascript, i know i dont want to use a client side script but iv head you can run it server side with cgi's, either way im going to slowly find a way to do this.
BlueFlame
Forum Commoner
Posts: 33
Joined: Wed Oct 12, 2005 5:21 am

Post by BlueFlame »

Ok iv found this http://www.devpapers.com/article/200

though the dam instructions of useing this is fault, could someone walk me through it, im a bit of a newbie to javascript.
Post Reply