Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Web Site Functionality _ IfThisThanThat conditional statement HTML

Posted by: RtvOost Apr 15 2022, 07:14 AM

Im trying to make an IfThisThanThat statement in HTML code but my link that should show up doesn't show up, does anybody know how to write the code?

This is what i wrote:

<textarea name="Awnser1" id="1"></textarea>
<input type="submit"
{% if awnser1 = 1234 %}
<a href = "Right.html">Right</a>
{% else %}
<h2>Wrong</h2>
{% endif %} id="1">

Posted by: CharlesEF Apr 15 2022, 02:44 PM

HTML doesn't have a 'IfThisThanThat' structure. You need to use either server side or client side code. I don't see any use for a question/answer using Javascript, since the answer can be seen by viewing the source.

Posted by: pandy Apr 15 2022, 06:52 PM

What language is that that you are trying to use?

Posted by: CharlesEF Apr 16 2022, 10:31 PM

I have seen '{% xxx %}' used in Django templates.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)