i had a script which works in IE but i need that to work in netscape ...this script uses div tags and show and hide depending upon the condition ...
pls help me its urgent
thanks in advance
Baskar
here is the code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Simulation</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function changeImage()
{
var lis1=document.simu.lis1.se
lectedInde
x;
var lis2=document.simu.lis2.se
lectedInde
x;
if (lis1==0 && lis2==0)
document.images['logo'].sr
c='g.gif';
else
document.images['logo'].sr
c='r.gif';
if (lis1==1 && lis2==1)
document.images['logo'].sr
c='y.gif';
else
document.images['logo'].sr
c='r.gif';
if (lis1==2 && lis2==2)
document.images['logo'].sr
c='r.gif';
}
function addText()
{
var str = "";
document.all.quest9_3.oute
rHTML = "<div id='quest9_3'></div>";
str = ' <table border="2" cellpadding="0" cellspacing="0" width="50%" align="center">'+
' <tr align="center">'+
' <td > <select name="lis1" size="5">'+
' <option value="1">Choice1</option>
'+
' <option value="2">Choice2</option>
'+
' <option value="3">Choice3</option>
'+
' </select> </td><td><td>'+
' <select name="lis2" size="5">'+
' <option value="1">Choice1</option>
'+
' <option value="2">Choice2</option>
'+
' <option value="3">Choice3</option>
'+
' </select>'+
' </td><tr></table>' ;
document.all.quest9_3.inne
rHTML = str;
}
function addTextt()
{
var str = "";
document.all.quest9_4.oute
rHTML = "<div id='quest9_4'></div>";
str = ' <table border="2" cellpadding="0" cellspacing="0" width="50%" align="center">'+
' <tr align="center">'+
' <td > <select name="lis1" size="5">'+
' <option value="1">Choice1</option>
'+
' <option value="2">Choice2</option>
'+
' <option value="3">Choice3</option>
'+
' </select> </td><td><td>'+
' <select name="lis2" size="5">'+
' <option value="1">Choice1</option>
'+
' <option value="2">Choice2</option>
'+
' <option value="3">Choice3</option>
'+
' </select>'+
' </td><tr></table>' ;
document.all.quest9_4.inne
rHTML = str;
}
function addInfoText(checkedValue)
{
var ser=document.simu.service.
selectedIn
dex;
var att=document.simu.attribut
e.selected
Index;
if (ser >= 1 && att >= 1 )
{
var str = "";
document.all.quest9_1.oute
rHTML = "<div id='quest9_1'></div>";
if (checkedValue == 'Yes')
{
str = ' <table border="0" cellpadding="0" cellspacing="0" width="50%" align="center">'+
' <tr align="center">'+
' <td ><img src="image1.gif" width="100" height="100" onMouseOver=addTextt("yes"
);></td>'+
' <td colspan="2"><img src="w.gif" width="100" height="100" name="logo"></td>'+
' <td><img src="image2.gif" width="100" height="100" onMouseOver=addTextt("yes"
);></td>'+
' </tr>'+
' <tr>'+
' <td> </td>'+
' <td> </td>'+
' <td> </td>'+
' <td> </td>'+
' </tr>'+
' <tr>'+
'<td width="25%"><p align="center"><font size="1"'+
' face="Arial">'+
'</font></p>'+
' </td>'+
' <td width="25%"><p align="center"> </p>'
+
' </td>'+
' <td width="25%"><p align="center"> </p>'
+
' </td>'+
' <td width="25%"><p align="center"><font size="1"'+
' face="Arial"><div id="quest9_2" style="position:absolute;V
ISIBILITY:
hidden"><select name="lis1" size="5">'+
' <option value="1">Choice1</option>
'+
' <option value="2">Choice2</option>
'+
' <option value="3">Choice3</option>
'+
' </select></div></font></p>
'+
' </td>'+
' </tr>'+
' <tr>'+
' <td> </td>'+
' <td> </td>'+
' <td> </td>'+
' <td> </td>'+
' </tr>'+
' <tr>'+
' <td> </td>'+
' <td colspan="2" align="Center"><div id="quest9_4" style="position:absolute;V
ISIBILITY:
hidden"><input type="button" name="btnOOK" value=" OK " onClick=changeImage();></d
iv></td>'+
' <td> </td>'+
' </tr>'+
'</table>' ;
document.all.quest9_1.inne
rHTML = str;
}
}
}
function addLossInfoText(checkedVal
ue)
{
var tt=document.simu.items.sel
ectedIndex
;
if (tt==1)
{
var str = "";
document.all.quest9_0.oute
rHTML = "<div id='quest9_0'></div>";
if (checkedValue == 'Yes')
{
str = ' <table border="1" cellpadding="2" cellspacing="2" width="50%" align="center">'+
' <tr>'+
' <td width="100%">'+'<table border="0" cellpadding="2" cellspacing="2" width="100%">'+
' <tr>'+'<td width="50%"><table border="0" cellpadding="3" cellspacing="3" width="100%" bgcolor="#EDEDFE">'+
' <tr>'+
' <td width="25%" valign="top"><font size="2" face="Arial">Services</fon
t></td>'+
' <td width="25%" valign="top"><font size="1" face="Arial"> '+
' <select name="service" size="1">'+
' <option value="">--------------</o
ption>'+
' <option value="1">IP Address 1</option>'+
' <option value="2">IP Address 2</option>'+
' <option value="3">IP Address 3</option> '+
' <option value="4">IP Address 4</option>'+
' </select></font></td>'+
' <td width="25%" valign="top"><font size="2"'+
' face="Arial">Attributes</f
ont></td>'
+
' <td width="25%" valign="top"><font size="1"'+
' face="Arial"><select name="attribute" size="5">'+
' <option value="1">Choice1</option>
'+
' <option value="2">Choice2</option>
'+
' <option value="3">Choice3</option>
'+
' <option value="4">Choice4</option>
'+
' </select></font></td>'+
' </tr>'+
' <tr>'+
' <td> </td>'+
' <td> </td>'+
' <td> </td>'+
' <td> </td>'+
' </tr>'+
' <tr>'+
' <td colspan="4"><p align="center"><input'+
' type="button" name="btnOk" value=" OK " onClick=addInfoText("Yes")
;>'+
'<input'+
' type="submit" name="btnCancel"'+
'value="Cancel"></p>'+
' </td>'+
' </tr>'+
' </table>'+
' </td>'+
' </tr>'+
' </table>'+
' </td>'+
' </tr>'+
' </table>' ;
document.all.quest9_0.inne
rHTML = str;
}
}
else
{
var str = "";
document.all.quest9_0.oute
rHTML = "<div id='quest9_0'></div>";
if (checkedValue == 'Yes')
{
str = ' <table border="1" cellpadding="2" cellspacing="2" width="50%" align="center">'+
' <tr>'+
' <td width="100%">'+'<table border="0" cellpadding="2" cellspacing="2" width="100%">'+
' <tr>'+'<td width="50%"><table border="0" cellpadding="3" cellspacing="3" width="100%" bgcolor="#EDEDFE">'+
' <tr>'+
' <td width="25%" valign="top"><font size="2" face="Arial">Services</fon
t></td>'+
' <td width="25%" valign="top"><font size="1" face="Arial"> '+
' <select name="service" size="1">'+
' <option value="">--------------</o
ption>'+
' <option value="1">ATM 1</option>'+
' <option value="2">ATM 2</option>'+
' <option value="3">ATM 3</option> '+
' <option value="4">ATM 4</option>'+
' </select></font></td>'+
' <td width="25%" valign="top"><font size="2"'+
' face="Arial">Attributes</f
ont></td>'
+
' <td width="25%" valign="top"><font size="1"'+
' face="Arial"><select name="attribute" size="5">'+
' <option value="1">Choice1</option>
'+
' <option value="2">Choice2</option>
'+
' <option value="3">Choice3</option>
'+
' <option value="4">Choice4</option>
'+
' </select></font></td>'+
' </tr>'+
' <tr>'+
' <td> </td>'+
' <td> </td>'+
' <td> </td>'+
' <td> </td>'+
' </tr>'+
' <tr>'+
' <td colspan="4"><p align="center"><input'+
' type="button" name="btnOk" value=" OK " onClick=addInfoText("Yes")
;>'+
'<input'+
' type="submit" name="btnCancel"'+
'value="Cancel"></p>'+
' </td>'+
' </tr>'+
' </table>'+
' </td>'+
' </tr>'+
' </table>'+
' </td>'+
' </tr>'+
' </table>' ;
document.all.quest9_0.inne
rHTML = str;
}
}
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<form name="simu" method="post" action="kanda.htm">
<table border="1" cellpadding="2" cellspacing="2"
width="40%" align="center" height="40">
<tr>
<td >
<table border="0" cellpadding="2" cellspacing="2"
width="100%" align="center" height="40">
<tr>
<td colspan="2">
<font size="3" face="Arial" color="blue">Choose Your Options Below to Proceed</font>
</td>
</tr>
<tr>
<td width="50%" align="center"><p align="center"><font
size="1" face="Arial" valign="top"><strong>LABLE
1</strong></font></p>
</td>
<td width="50%" align="center"><font size="1" face="Arial"><select
name="items" size="1" onClick="if(document.all)a
ddLossInfo
Text('Yes'
); ">
<option value="">----------</optio
n>
<option value="1">IP Address</option>
<option value="2">ATM</option>
<option value="3">Frame Relay</option>
<option value="4">POTS</option>
</select></font></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<DIV id=quest9_0></DIV>
<br>
<DIV id=quest9_1></DIV>
<br>
<DIV id=quest9_3></DIV>
<br>
<DIV id=quest9_4></DIV>
</form>
</BODY>
</HTML>