Parameters/Query String with HTML

  Gaz W 14:01 14 Nov 04

OK I hope I can explain what I'm trying to do properly...

Basically I want to make a site as simple as possible for anyone to add pages to (anyone with the password that is). I've found that there may be two options available to me:

1. Build the layout on one page (using CSS, Server Side Includes, etc), and have an iframe in the content area. The content would be contained on separate pages. I would only do this if the iframe didn't have to scroll independently and could be made to look part of the main page.

2. Exactly the same as above, but using server side includes instead of iframes.

With either method, I would like each page to be accessible using the address bar. This might be possible if I could use parameters at the end of the HTML document to specify which page to load in the iframe or server side include.

I don't know if this is what the address bar would look like, but it's something along these lines:

click here

...something like that anyway.

Is this possible?

  Taran 13:49 15 Nov 04

Iframes present their own problems, mainly with search indexing and accessiility issues.

Personally I'd set up a small Content Management System, that allows registered users to create a page which is added to the site navigation. You can control the page layout (template, CSS, SSI or whatever) and only supply editing rights for text or text and images.

I don't know of a simple way of doing it without getting into server side scripting.

What you want to be able to do requires writable access rights to your web server and as such, you'd really want a very robust login system and carefully locked down editing rights. Depending on your web server I'd be looking into PHP or ASP with an underlying database. Anything less is potentially more open to security issues.

  Taran 13:53 15 Nov 04

You can't use HTML on its own to run a query.

HTML is just tagged text rendered by the browser.

An address with ?parameter/pagename.html is queried from a data store which, at its simplest could be writable text files, but is more usually MySQL. You can get PHP to rewrite the URL to be more search engine friendly as well, which effectively gets rid of the ?parameter/pagename.html rubbish and just displays a normal HTML file name in the address bar.

  Gaz W 19:42 15 Nov 04

Thanks for the information...

I appear to have managed what I was looking for using JavaScript... a bit crude and basic, especially at the moment, but it works...

click here

also works with websites provided the URL ends with .html

click here

That was because I decided to add .html to make it slightly more difficult for people to build fake pages contained within my site. I could always put a forward slash in front, so that no matter where it is, it's always got to be on the root of my site - that might work.

I will be looking into PHP in the future, but for now this will do for what I want.

Also maybe I should have made it more clear at the start, but the search engine thing isn't a problem, since the site isn't actually meant to be found as such. If I use this method, I could I suppose include a JavaScript to make the content pages appear within the iframe of the main page, so they would be indexed in search engines, clicked on and then loaded up into the proper site... old fashioned but it will do for now because I haven't got time to learn PHP just yet.

Thanks again,


  Taran 01:21 16 Nov 04

If you don't mind me asking, what is your intended use ?

If you're trying to generate an FAQ or something similar, there are far simpler, more capable and elegant ways of doing things.

Perhaps some more information ?

  blackheart 11:46 21 Nov 04

If you've got php/mysql then take a look at Drupal (click here) I tried using it to host a blog, but there are lots of other modules that you can download, and it seemed quite intuitive, but there's an online manual too. I ought to add that I'm not using it now because it had more features than I wanted.


  Gaz W 16:59 21 Nov 04


Sorry for the late reply. I was just experimenting with different options to make it simple to add pages to a site. I realise that it's far from ideal and I'll look into other options as well.

When I said the site wasn't intended to be found, that wasn't strictly true; the test site (when I make it) doesn't need to be found obviously, but the real sites made like this would be I suppose!

I like to make sites by myself as much as possible though, i.e. coding it myself and learning the code, but I'm not up to the PHP/MySQL standard yet! I've put forums up (just to see how it's done) using phpBB, but apart from that I've not done anything much more advanced than HTML with Server Side Includes and CSS, JavaScript, etc.

Anyway, any further suggestions would still be appreciated. Thanks,


  Taran 17:58 21 Nov 04

An admin page of some description allows a visitor to type text in, more or less like this forum.

A submit button sends the content of the 'form' they write in to a destination, normally a database and, in the case of this site, things scoot along nicely using ColdFusion.

A page can display the post made by a previous visitor by querying the database.

Most systems along the above lines rely on protecting the area that a person can write in with login username/password combinations. You wouldn't want just anyone to be able to anonymously post to your site.

Now, when you see a URL like the one at the top of this page, where a site address is followed by a question mark, then some more address elements, it means the content of the page is dynamic and is being pulled from a database. You can feasibly run a huge site in one, single page, calling the page content to fill it when a link is clicked.

At the lowest level, writing to a text file can work, up to a point.

Any high traffic site though, will quickly appreciate the benefits to a supporting underlying database to contain the page content, which pages may be filled with on request (hyperlink click).

You can get the URL rewritten to display a search engine friendly URL, instead of one with a question make and lots of gibberish with a bit of clever coding, but there are pros and cons to this.

You still haven't really said what this is for, which could go a long way to providing a simple solution.

Have you looked at FrontPage 2003 for its discussion board wizard ?

Its results are a little primitive to some extent, but with a few mouse clicks you can generate a full threaded discussion board and all you need is FrontPage Server Extension support from your web host.

Meanwhile, back at the ranch...

You can output a data driven website to include CSS and Server Side Includes easily enough. They are common elements to a site and offer a quick and easy method of altering an entire look and, to a certain extent, its general layout.

The bottom line is that if you want people to be able to post comments or content on some part of your site, you need to be able to police it (username and password) to help prevent anonymous posters writing lots of offensive junk on your site.

So you need to regulate those who will post, store their sumbissions and be able to recall them later, all of which points very heavily to a database driven web application.

My initial comments about a CMS (Content Management System) may sound a little scary, but they can actually be quite simple and small applications. Obviously a large intranet will require a huge amount of programming, but a small application to allow people access to a simple threaded discussion, or a general comments/feedback application where the results can populate a shoutbox or similar all qualify to some extent as a CMS.

Anything that needs an admin panel, that allows content of some description to be added to your site which can then be recalled to populate its page(s) could loosely fall under the CMS heading.

phpBB and similar appls are a sort of CMS. Others may allow user image upload, shared galleries, news and views and all kinds of everything.

I'd repeat an earlier comment: If you don't mind me asking, what is your intended use ?

  Taran 18:07 21 Nov 04

To add pages to a site could be as simple as this:

1. User logs in (authentication system)

2. A form contains the following fields, which logged in user fills:

Page name (browser title bar), hyperlink name (only if you want people to be able to manually name hyperlinks), copy text, author name (you should really pull author info from the authentication system to help track who said what, when).

3. On submitting the form, its contents are written into the database by a query.

Your main page navigation system is a query which pulls a list of hyperlinks to pages from the database.

When a link is clicked, the page is populated by another query, to display the copy text that relates to the hyperlink name.

It's all down to understanding how databases work, how they interact with the web browser (and vice versa) and what you have available on your web host.

So a CMS could cover anything from a very simple threaded text-only discussion board to a fully blown site like this one, to an intranet application for a large corporation. CMS is simply a broad heading for anything that has an admin panel where the administrator can control what is going on, and where the systems admin or others may add content to your site.

It's all down to forms, data handling, querying and a very good understanding of databases for anything more than a very, very simple application.

  Gaz W 18:13 21 Nov 04


Thanks for your help. Basically it's not really for anything in particular at the moment... I have a few ideas for websites but the idea behind all of this was to make it easy to add content to it without building pages every time. Since I code it all myself, the iframe idea above was to try and get the main page to show different content (simple HTML file) depending on the parameters.

For forums I'm sorted because I can use phpBB, which I don't mind using at all. Basically I just wanted a content management system so that others running the site could add pages as simply as possible.

Another use I had for that iframe was for loading different mirrors of a page... so it didn't go entirely to waste, although I'll probably use a proper frameset for that.

  Gaz W 18:15 21 Nov 04

I like that idea though... as long as it could be private so that not anyone could log in, but just people I specify to be able to log in.

This thread is now locked and can not be replied to.

Qualcomm Snapdragon 835 benchmarks: Antutu, Geekbench 4, GFXBench and PCMark results

1995-2015: How technology has changed the world in 20 years

This stop-frame animation tells a moving story of domestic violence for Refuge

New iPad 2017 preview: Apple's affordable but underspecced new iPad may appeal to the education…