I'm having problem with this code in firefox but in the Internet Explorer Browser works fine on it what is the wrong in my code ?
[HTML]<html>
<head>
<title>Like_mai l</title>
<script type="text/javascript">
//----------------------------------------------------------------------
function addEvent()
{
var hidden = document.getEle mentById('theVa lue');
var num = hidden.value++;
var ni = document.getEle mentById('menu' );
var divIdName = "menu_items"+nu m;
var newdiv = document.create Element('div');
newdiv.setAttri bute("id",divId Name);
newdiv.innerHTM L ="<div class='menu_ite ms'><select name='select' id='select'><op tion>- Select State -</option></select><select name='select2' id='select2'><o ption>- Select Collage -</option></select><select name='select3' id='select3'><o ption>- Select Faculty -</option></select> &n bsp;   ;<input name='delete' type='button' id='delete' value='Delete' onclick='del_di vtag("+divIdNam e+")'/></div>"
ni.appendChild( newdiv);
}
//----------------------------------------------------------------------
function del_divtag(divI dName){
var d = document.getEle mentById('menu' );
var olddiv = document.getEle mentById(divIdN ame);
d.removeChild(d ivIdName);
}
//----------------------------------------------------------------------
</script>
</head>
<body>
<div id="all">
<div id="Dbanner">
<input name="add" type="button" id="add" value="Add" onclick="addEve nt()"/>
</div>
<div id="menu">
<div id="menu_banner ">
<span style="margin-left:10px;" >| States |</span>
<span style="margin-left:90px;" >| Collage |</span>
<span style="margin-left:90px;" >| Faculty |</span>
<input type="hidden" value="0" id="theValue" /></div>
</div>
</div>
</body>
</html>[/HTML]
[HTML]<html>
<head>
<title>Like_mai l</title>
<script type="text/javascript">
//----------------------------------------------------------------------
function addEvent()
{
var hidden = document.getEle mentById('theVa lue');
var num = hidden.value++;
var ni = document.getEle mentById('menu' );
var divIdName = "menu_items"+nu m;
var newdiv = document.create Element('div');
newdiv.setAttri bute("id",divId Name);
newdiv.innerHTM L ="<div class='menu_ite ms'><select name='select' id='select'><op tion>- Select State -</option></select><select name='select2' id='select2'><o ption>- Select Collage -</option></select><select name='select3' id='select3'><o ption>- Select Faculty -</option></select> &n bsp;   ;<input name='delete' type='button' id='delete' value='Delete' onclick='del_di vtag("+divIdNam e+")'/></div>"
ni.appendChild( newdiv);
}
//----------------------------------------------------------------------
function del_divtag(divI dName){
var d = document.getEle mentById('menu' );
var olddiv = document.getEle mentById(divIdN ame);
d.removeChild(d ivIdName);
}
//----------------------------------------------------------------------
</script>
</head>
<body>
<div id="all">
<div id="Dbanner">
<input name="add" type="button" id="add" value="Add" onclick="addEve nt()"/>
</div>
<div id="menu">
<div id="menu_banner ">
<span style="margin-left:10px;" >| States |</span>
<span style="margin-left:90px;" >| Collage |</span>
<span style="margin-left:90px;" >| Faculty |</span>
<input type="hidden" value="0" id="theValue" /></div>
</div>
</div>
</body>
</html>[/HTML]
Comment