Jump to content

load page into div


yoshida

Recommended Posts

Hi guysIs there a way to load a page inside a div? I'm only able to use css/html, and try to get rid of ugly frames. If I want the same menu bar and header on each page I'll be damned if I re-create them for each page if it's possible to simply load them on the page.The only question is: how? (if possible only css/html, no javascript, php or some other programming language)

Link to comment
Share on other sites

<div id=scroller><object data=links.html width=100% height=100%</div>

This seems to work pretty well... note the div has a width of 200 pixels.

Link to comment
Share on other sites

I'm gonna dive into iframe, just to see how that's different. Thanks for your advise and good luck with your Super Mario clone. ^^

Link to comment
Share on other sites

I'm gonna dive into iframe, just to see how that's different. Thanks for your advise and good luck with your Super Mario clone. ^^

haha, thanks, I am a long way from understanding enough to even start it right now. Graphics in C++ are insane!I did a bit of comparision. It takes almost 300 lines of code just to make a 'window' in C++, while it takes 0 lines in C# when using Visual Studio.I have about 600 lines of C++ code I and I now have a multicolor, rotating 3D triangle. lol
Link to comment
Share on other sites

That beats a css with almost 150 lines of code... "Oow check that, how do I add shadow to a div?" "Hey, it would be nice to have some control over my link behavior." "I want my pictures to display the same perceptual size in all resolutions, with text wrapped around it."Programming... it simply seems agonizing to me.(sorry if I don't make any sense. I have a splitting headache, and some bloke two streets down is test-driving his motorbike.)

Link to comment
Share on other sites

yoshida,I don't know if your interested, but the whole frame thing where you get the pleasure of not having to pull down the whole page again can be accomplished in a very powerful and elegant way with Ajax type stuff. If you got the intereste you should check out a book; its a way to pull down stuff without refershing the whole page, so, in essence, you can pull down new info for just a div. And you can do a lot more.

Link to comment
Share on other sites

yoshida,I don't know if your interested, but the whole frame thing where you get the pleasure of not having to pull down the whole page again can be accomplished in a very powerful and elegant way with Ajax type stuff.  If you got the intereste you should check out a book; its a way to pull down stuff without refershing the whole page, so, in essence, you can pull down new info for just a div.  And you can do a lot more.

thnx, I'll try to look into that. Is it some sort of PHP or another server sided language?
Link to comment
Share on other sites

A scripting technique for silently loading new data from the server. Although AJAX scripts commonly use the soon to be standardized XMLHttpRequest object, they could also use a hidden iframe or frame. An AJAX script is useless by itself. It also requires a DOM Scripting component to embed the received data in the document.The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user makes a change.

Link to comment
Share on other sites

Full report:I got everything I wanted to load in a div without using PHP or JS. But if I alter the header or the menu, I need to adapt each page. The best solution would be to load both of them in an iframe but I can't get it to work the way I want (not if I want it to look the same in Firefox and IE).For as far as I can see I can go back to regular frames, or try to get it to work on a server with PHP support. Both stink, to be honest, bc the first option is ugly and outdated, and the other one isn't cheap. Please, I need some help (reference pages - tutorials) with IFrames.Thanks in advance.EDIT: nesting an iframe into a <p align-center> centers it for both ff and ie. It's still not a very nice solution but it's getting closer.I'll keep trying and I'll post again if something else is driving me insane. Something that should've took an hour or two is now already consuming a day and a half.

Link to comment
Share on other sites

imho xml and xslt and js have worked very well for me to do just what you're talking about (though I also through in some formatting stuff that you wouldn't need). All this example code is here. To test it just download content.xml and content.xsd and the contents of dark/ then view content.xml on your machine with firefox (important: IE support hasn't been put in yet since I'm the only one looking at it so far and I use firefox :)).Let me know if you need any questions answered regarding this code.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...