View Full Version : How to embed a link into a static HTML page?

Jan 13th, 2009, 10:30 PM
Please first take a look at the attached image... then...

The question is - something will have to read the link in #1 and do its magic and then generate a "response" or output (or whatever you want to call it) link that will be then displayed on the page. However the page is static so whatever it is that would generate that would have to be outside the page.

A few things that come to mind are Javascript - not very reliable as people tend to disable it sometimes. SSI - not very sure how it works and whether the majority of today's servers support it, some frame - but it gets kind of too technical for the person who will embed it at their site so that doesn't look very good to be either...

So I'm asking for your suggestions - what other technologies can be used for what I want to accomplish? What other alternatives are there? And how they work?

If there's anything not clear enough - please ask... I did my best to explain but I do understand it only looks clear in my own head (not even sure about that)!

Jan 14th, 2009, 12:08 AM
OK, so you want a static html page to send parameters to another static html page and for it to utilise those parameters. well, the problem with that scenario is that a static page can't do anything other than present as it is actually coded. If you want to have params sent to a page, then either it or a part of it must be server side created/generated. this can be a php/perl (others) file which is included by a 'server-side include' (SSI) but to do that, the file must be an shtml and not an html file. Iframes might do it but then you can open a whole raft of other issues which make it less attractive. much better to use a server side language, to get the params and to process them into a server-generated page.

To answer the last part of your post: much better to do what you are aiming for with either PHP or PERL. they are server-side languages which can grab params and process them before outputting a web page with the response you want.



Jan 14th, 2009, 02:23 PM
OK so then how do I use SSI to insert an HTML code (the link in this particular case) that was generated by a CGI script into a page?

Jan 14th, 2009, 07:35 PM
I am rusty in SSI. From what I recall, you would firstly need your cgi script to build a web page. you could then include it in your shtml page with one line of code.

google ssi to find what that is coz I can't recall it correctly.

this is it.

<!--#include virtual="../quote.txt" -->