| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Mar 2006
Posts: 10
|
iframe that pushes frames
Hello developer fellows, I came here to seek some help for a problem, because its making me nuts. Now, I only do webdesign as a hobby and I know the basics but this problem is a bit advanced for me so Im wondering if you guys would be kind enough to help me out. Ok, so there is a page and there are static objects that dont reload again like buttons headers etc, and a dynamic part of the page like the content pages. The easiest way to solve this is to insert an iframe. So when I click a button only the stuff in the iframe change and the entire page doesnt have to load again. Now, what i want is that is it possible to have an iframe that when the content is bigger than the iframe, instead of scrollbars the iframe adjusts to the height of the content? Or if its not possible to solve it with an iframe another option would be good, but it should have the same function as an iframe because the design of my page is the most important at the moment. Thank you in advance! Adam Last edited by adamtrance : 29-03-2006 at 15:11. |
|
|
|
|
|
#2 (permalink) | |
|
Dr. Lucien Sanchez
Join Date: Mar 2003
Location: UK
Posts: 5,563
|
Quote:
If you want to reuse the same bit of code, you could look at php includes. http://www.google.co.uk/search?hl=en...Search&meta = |
|
|
|
|
#4 (permalink) | |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
Quote:
PHP includes (or similar) would be your best bet, though. |
|
|
|
|
#5 (permalink) |
|
Registered User
Join Date: Mar 2006
Posts: 10
|
Heh, sorry I guess I didnt explain myself good. You see I cannot use images that reload again because what I want to create is that when I click on a button, the header image slowly fades to another image. So If I reload the whole page its not gonna work. At least the buttons and the header have to be left seperately and not load them over and over again for this to work. I have attached an image to show you guys what I mean. Like when the content is larger the height of the page automatically adjusts, thus it doesnt reload the buttons and the header. Is this possible? (also please note that PHP is not my strenght so I may need some help with that.) |
|
|
|
#6 (permalink) |
|
Senior Member
Join Date: Mar 2006
Posts: 147
|
There is a way to do this, but it's going to take scripting. I did the exact thing on an old intranet site 4 years ago and it worked like a charm, and it was a bit of a pain to get it working correctly. Frankly I'd stay away from iframes, you can't bookmark pages and you louse up your history (back/forward buttons). I had to have an additional script to make those work. If you REALLY gotta do that, I might be able to dig up the old site files. |
|
|
|
#8 (permalink) | |||
|
Senior Member
Join Date: Mar 2006
Posts: 147
|
Well, looks like I can't attach a text file so here's the code: Put this in the HEAD: Quote:
Define and position your iframe (use your own settings, obviously): Quote:
Then, to call pages into the iframe you need to set up your links like this: Quote:
That should work, if not let me know but I don't think I've forgotten anything Just keep in mind that the BACK button will not work right, it will not take them back one in the iframe 'history', you'd need another script and buttons (which I did) to emulate 'history'. |
|||
|
![]() |