HTML conditional processing?

M

Mark Foley

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!
 
H

Harlan Messinger

Mark said:
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.

HTML has no programming, so there is no straight HTML solution. You're
evidently aware of the alternatives.
 
T

Tina Peters

Mark Foley said:
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.

HTML doesn't process stuff, like you are hoping. It just makes your page
look pretty. What is the "condition"? That will help us guide you.

--Tina
 
T

Toby Inkster

Harlan said:
HTML has no programming, so there is no straight HTML solution.

How about:

<p>If (condition) then you may find
<a href="pagex.html">Page X</a> useful.</p>

If you are looking for something more automated, then Tina and Harlan
are right.
 
P

pangea33

Mark said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top