| Posted by pangea33 on 11/23/06 02:50 
Mark Foley wrote:> We have existing help (html) pages to which I need to add some conditional
 > processing.
 >
 > Something like:
 >
 > if (condition)
 >   redirect to PageX
 >
 > this condition variable needs to be something that I can pull from the
 > info passed by the caller.
 >
 > This needs to work for all Browsers, so I think any sort of scripting
 > is not an option. I did some work with asp a while ago, but I'm looking
 > for a straight HTML solution.
 >
 > Thanks!
 
 Which webserver are you running on? Not sure about IIS, but with Apache
 you can enable server side include directives on specific documents
 with the .html extension. Using the xbithack you can avoid having all
 the html documents parsed, and you can get away with adding very simple
 conditional logic for redirection. The formatting is like an html
 comment too, so there are no problems when ssi isn't enabled.
 
 Example:
 <!--#if expr="test_condition" -->
 <!--#elif expr="test_condition" -->
 <!--#else -->
 <!--#endif -->
 
 http://httpd.apache.org/docs/2.2/howto/ssi.html
 [Back to original message] |