raheel_88 0 Newbie Poster

I would like to place a footer at the bottom of my DHTML web page.

The simple footer tag doesn't do what I want because the text in the footer is simply placed underneath the current text on the web page. What I want s for the footer to stay at the bottom of the window, regardless of what appears on the page.

Here's a code for something similar to my page without a footer;

<HTML>
<HEAD>
<SCRIPT TYPE="TEXT/JAVASCRIPT">
function setup(ans) {
  lit = ''
  if (ans == 'anim') {
    lit = '<br><br>How many legs?   '
    lit = lit + '<SELECT NAME="q2" ONCHANGE="print(document.quest.q2.value)">'
    lit = lit + '<OPTION VALUE="">- Please select -</OPTION>'
    lit = lit + '<OPTION VALUE="Cat">4</OPTION>'
    lit = lit + '<OPTION VALUE="Sparrow">2</OPTION>'
    lit = lit + '<OPTION VALUE="Snake">0</OPTION>'
    lit = lit + '</SELECT>'
  }
  if (ans == 'min') {
    lit = '<br><br>What colour?   '
    lit = lit + '<SELECT NAME="q2" ONCHANGE="print(document.quest.q2.value)">'
    lit = lit + '<OPTION VALUE="">- Please select -</OPTION>'
    lit = lit + '<OPTION VALUE="Emerald">Green</OPTION>'
    lit = lit + '<OPTION VALUE="Ruby">Red</OPTION>'
    lit = lit + '<OPTION VALUE="Sapphire">Blue</OPTION>'
    lit = lit + '</SELECT>'
  }
  if (ans == 'elem') {
		lit = '<br><br>What kind of element?   '
		lit = lit + '<SELECT NAME="q2" ONCHANGE="print(document.quest.q2.value)">'
		lit = lit + '<OPTION VALUE="">- Please select -</OPTION>'
		lit = lit + '<OPTION VALUE="Helium">Noble gas</OPTION>'
		lit = lit + '<OPTION VALUE="Fluorine">Halogen</OPTION>'
		lit = lit + '<OPTION VALUE="Lithium">Alkali metal</OPTION>'
		lit = lit + '</SELECT>'
  }
  document.getElementById('rep').innerHTML=lit
}

function print(statement) {
	document.getElementById('prt').innerHTML='<H3>You have chosen ' + statement +'<BR><HR><input type="button" value="Reload Page" onClick="window.location.reload()">'

}

</SCRIPT>
</HEAD>
<BODY>

<FORM ACTION="#" NAME=quest>
What is it?   <SELECT NAME="q1" ONCHANGE="setup(document.quest.q1.value)">
<OPTION VALUE="" SELECTED>- Please select -</OPTION>
<OPTION VALUE="anim">Animal</OPTION>
<OPTION VALUE="min">Mineral</OPTION>
<OPTION VALUE="elem">Element</OPTION>
</SELECT>

<SPAN ID="rep"></SPAN>
<SPAN ID="prt"></SPAN>


</FORM>

</BODY>
</HTML>

Many thanks in advance!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.