I created a questionnaire kind of form, works just fine using IE (using DIV
object) , want to get it up in
netscape too.
I am having problem displaying objects within a layer in netscape browser
(netscape communicator 4.5 ):
<input NAME="Q1" VALUE="Q11" TYPE="radio" OnClick=ValidateQ1()>Yes
On the click of the radio button , I am calling the function ValidateQ1,
which in turn should show the radlay1, which has another set of radio
buttons.
But all it shows is just the text beside the radio objects, but not the
buttons. However it does show the objects if I put another form tag inside
the layer object as below:
<LAYER NAME="Radlay1" VISIBILITY=HIDE>
<form name="radform">
2. How often do you use the Internet? <BR>
<INPUT Type="radio" name="Q2" value="Q21"
OnClick=ValidateQ2()>Hardly Ever
<INPUT Type="radio" name="Q2" value="Q22"
OnClick=ValidateQ2()>Approximately once a month <BR>
</form>
</LAYER>
But here I am getting a javascript error at document.form1.Q2[0].checked
within the called function ValidateQ2().
function ValidateQ2() {
if (document.form1.Q2[0].checked){
alert ("Option 1"
} else {
alert ("Option 2"
}
}
Any help is greately appreciated. thanks in advance.
Here is the entire CODE:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<BODY bgcolor="#FFFFFF" "" link="#004000" vlink="#000000" alink="#C0C0C0"
topmargin="0"
leftmargin="1" style="margin-right: 15">
<HR color=#004000 SIZE=5>
<form name="form1" method="get" action="xxxxx.asp">
<SCRIPT LANGUAGE="JavaScript">
<!--
function ValidateQ1() {
if (navigator.appName == "Netscape"
&& parseInt(navigator.appVersion) >= 4) {
if (document.form1.Q1[0].checked){
document.Radlay1.visibility = "SHOW";
}
else
{
document.Radlay1.visibility = "HIDE";
}
}
}
function ValidateQ2() {
if (document.form1.Q2[0].checked){
alert ("Option 1"
}
else {
alert ("Option 2"
}
}
// -->
</SCRIPT>
<form name="form1" method="get" action="PostTrans.asp">
<FONT face=Arial color=blue size=2><STRONG>To properly place you in a class
that will best suit your needs, please answer the following
questions</STRONG></FONT></P>
<FONT color=black>
1. Do you currently use Realcomp's MLS?</FONT><BR>
<DIV align="left">
<input NAME="Q1" VALUE="Q11" TYPE="radio" OnClick=ValidateQ1()>Yes
<input NAME="Q1" VALUE="Q12" TYPE="radio"
OnClick=ValidateQ1()> No
</DIV>
<LAYER NAME="Radlay1" VISIBILITY=HIDE>
2. How often do you use the Internet? <BR>
<INPUT Type="radio" name="Q2" value="Q21"
OnClick=ValidateQ2()>Hardly Ever
<INPUT Type="radio" name="Q2" value="Q22"
OnClick=ValidateQ2()>Approximately once a month <BR>
</LAYER>
</FORM>
</BODY>
</HTML>
object) , want to get it up in
netscape too.
I am having problem displaying objects within a layer in netscape browser
(netscape communicator 4.5 ):
<input NAME="Q1" VALUE="Q11" TYPE="radio" OnClick=ValidateQ1()>Yes
On the click of the radio button , I am calling the function ValidateQ1,
which in turn should show the radlay1, which has another set of radio
buttons.
But all it shows is just the text beside the radio objects, but not the
buttons. However it does show the objects if I put another form tag inside
the layer object as below:
<LAYER NAME="Radlay1" VISIBILITY=HIDE>
<form name="radform">
2. How often do you use the Internet? <BR>
<INPUT Type="radio" name="Q2" value="Q21"
OnClick=ValidateQ2()>Hardly Ever
<INPUT Type="radio" name="Q2" value="Q22"
OnClick=ValidateQ2()>Approximately once a month <BR>
</form>
</LAYER>
But here I am getting a javascript error at document.form1.Q2[0].checked
within the called function ValidateQ2().
function ValidateQ2() {
if (document.form1.Q2[0].checked){
alert ("Option 1"
} else {
alert ("Option 2"
}
}
Any help is greately appreciated. thanks in advance.
Here is the entire CODE:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<BODY bgcolor="#FFFFFF" "" link="#004000" vlink="#000000" alink="#C0C0C0"
topmargin="0"
leftmargin="1" style="margin-right: 15">
<HR color=#004000 SIZE=5>
<form name="form1" method="get" action="xxxxx.asp">
<SCRIPT LANGUAGE="JavaScript">
<!--
function ValidateQ1() {
if (navigator.appName == "Netscape"
&& parseInt(navigator.appVersion) >= 4) {
if (document.form1.Q1[0].checked){
document.Radlay1.visibility = "SHOW";
}
else
{
document.Radlay1.visibility = "HIDE";
}
}
}
function ValidateQ2() {
if (document.form1.Q2[0].checked){
alert ("Option 1"
}
else {
alert ("Option 2"
}
}
// -->
</SCRIPT>
<form name="form1" method="get" action="PostTrans.asp">
<FONT face=Arial color=blue size=2><STRONG>To properly place you in a class
that will best suit your needs, please answer the following
questions</STRONG></FONT></P>
<FONT color=black>
1. Do you currently use Realcomp's MLS?</FONT><BR>
<DIV align="left">
<input NAME="Q1" VALUE="Q11" TYPE="radio" OnClick=ValidateQ1()>Yes
<input NAME="Q1" VALUE="Q12" TYPE="radio"
OnClick=ValidateQ1()> No
</DIV>
<LAYER NAME="Radlay1" VISIBILITY=HIDE>
2. How often do you use the Internet? <BR>
<INPUT Type="radio" name="Q2" value="Q21"
OnClick=ValidateQ2()>Hardly Ever
<INPUT Type="radio" name="Q2" value="Q22"
OnClick=ValidateQ2()>Approximately once a month <BR>
</LAYER>
</FORM>
</BODY>
</HTML>