how to use if-then-else in HTML?

  pcadv 22:36 17 Jan 2007


I want to design a webpage such that if any one option is clicked.. then all remains same except a frame. That is to say.. all things remain same except the picture in the frame keeps changing with change of option selected.

Is it possible that I can have one page coding and use if-then-else option or hide or something?

If anyone can suggest something, it would be great.


  pcadv 22:55 17 Jan 2007

sorry .. I forgot to add that the options are in one div and the frame is in other div.In other words, if PA is selected then only iframe src will change. similarly with other li options.

<div id="container">
<H3 style="left: 20px; text-align: left"> Photographs </H3>

<div class="small">
<ul class="none">

<div class="inlineframe">
<iframe src="index.html" width="100%" height="70%">

  PurplePenny 23:05 17 Jan 2007

You'll have to use scripting. There isn't any if-else in HTML.

You'll probably find a suitable script at JavaScript Source: click here

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

What went wrong at the Designs of the Year 2017

iPhone X news: Release date, price, new features & specs

Comment regarder des séries et talk-shows américains en France ?