Reply to Re: HTML conditional processing?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация