Jump to content

Newbee - Frames without frames?


Zebra

Recommended Posts

Basically – I have a little HTML background, and would like to try make a small and simple site in XHTML – But I need help on whats possible.I want to do something, that I know how to do in frames, but without frames.I would like to have a link clicked in the margin change the content of the main 'frame'. Please look at http://hvidberg.net/Martin/Zebra/ Clicking the flags changes the text in the larger frame.Now I'm trying to turn into something like http://hvidberg.net/Martin/Zebra-Project/C...da-English.html It seems like the same functionality is preserved, but it's not...In the old frame version each language is kept in a separate file like french.html, english.html etc. and then loaded according to the pressing of the flags. In the new frame less version each country have one or more separate .html files, depending on the number of languages spoken in the country. Thus, e.g. the English text is repeated for all countries where English is spoken... This is not, to my experience, good programming.Therefore – I would like to make a frame less version, based on the http://hvidberg.net/Martin/Zebra-Project/C...da-English.html version, but improved so the actual quiz questions are kept in a separate file and loaded into an appropriate part of the screen, as the user clicks the language name...It that possible?How?Best RegardsZebra

Link to comment
Share on other sites

I'd recommend you learnt PHP and then used the include() function.I posted an example on how it's used here: http://w3schools.invisionzone.com/index.php?showtopic=20770But don't just copy and paste code, learn some PHP, or you'll find yourself with problems.
Hi I would love also to learn PHP - it's on the list.But right now I would like to try out XHTML with CSS.Is it not possible to obtain this functionality without using PHP?:-) Zebra
Link to comment
Share on other sites

If PHP wasn't necessary to make websites, you wouldn't have a need to learn it.You can also use another server-side language, but at least you see you have a need for PHP.

Link to comment
Share on other sites

CSS doesn't provide functions, it provides beauty. ^^
I'm aware what CSS does. But my that was not part of my original question: How do I get the requested frame-like functionality, in XHTML, without frames?:-) Z
Link to comment
Share on other sites

If PHP wasn't necessary to make websites, you wouldn't have a need to learn it.You can also use another server-side language, but at least you see you have a need for PHP.
Okay, I need PHP.I tried the sample you refered to, but can't make it work.As a first try I, of cause, cut and pasted it, though you don't recomend that. I needed to se what it did and how it worked, first then can I begin to understand it, and develop my own.Only it didn't work. However I do it produces nothing but a blank web page ???:-? Z
Link to comment
Share on other sites

You'll have to run it on a PHP-enabled server, you can't do it on your PC unless you install a server in it.And my particular script will only load files called "menu.php", "main.php", "about.php" and "contact.php".Also, in order to make the script work, you need to add a query string at the end of the URL referring to which section to load:index.php?s=about

Link to comment
Share on other sites

PHP isn't necessary to make websites, that much should be obvious. It helps, but it's not necessary. You can use an iframe with XHTML 1.0 transitional to do what you want to do, iframes were removed from the strict doctype and from XHTML 1.1 and there isn't a replacement for them yet, but you can use them with transitional. PHP might still be the better choice, I'm just trying to make the point that it's not required and that there are other ways. You can also use AJAX to load whatever content you want into a div or other container, there are a few possibilities.

Link to comment
Share on other sites

Guest FirefoxRocks
If PHP wasn't necessary to make websites, you wouldn't have a need to learn it. You can also use another server-side language, but at least you see you have a need for PHP.
PHP and server-side languages are not required to make websites, although they are required for many advanced things such as processing of data, user-generated content etc. To make a website, you just need (X)HTML, you don't even need CSS. Although that would be a pretty boring page design-wise. :)
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...