|
|
Subject:
How to ensure separate html pages always appear in cgi template, not alone
Category: Computers > Programming Asked by: horseradish-ga List Price: $10.00 |
Posted:
07 Oct 2003 14:20 PDT
Expires: 06 Nov 2003 13:20 PST Question ID: 264003 |
I use a cgi script to pull two separate html files together (content and menu) to make a final page. I don't want the separate pages to be accessed on their own. Is there any way I can ensure that if the single page is accessed, it automatically seeks the cgi and assembles it with its partner page as it is meant to be viewed? Similar to ensuring a page in a frame is always viewed in the frameset I presume, but in this case using cgi instead of frames. Thanks! |
|
There is no answer at this time. |
|
Subject:
Re: How to ensure separate html pages always appear in cgi template, not alone
From: prophet-ga on 16 Oct 2003 16:16 PDT |
Hi horseradish, You can include javascript in your html documents which would inspect the current URL, checking for "cgi" or some other string. If you have a full URL to the cgi it could search for that to be more specific. If the string is not present, you can then forward them to the appropriate cgi page. For example: <html> <head> <script language="JavaScript" type="text/javascript"> <!-- checkurl = document.location.href; if (!(checkurl.indexOf("cgi")>0)) document.location.href="http://....../cgi......"; //--> </script> </head> <body> body of your page... </body> </html> Would this suit your purposes? If so, I can post this as an answer or code something more specific to your purposes and submit that. Cheers, Prophet |
Subject:
Re: How to ensure separate html pages always appear in cgi template, not alone
From: prophet-ga on 23 Oct 2003 12:39 PDT |
Just following up. Did my comment help you out? Should I post it as an answer? Thanks, Prophet |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |