ap
17 Jul 2007, 11:26 AM
In IE, the Fx slideIn will clear form value already selected by user. In IE7 when a div with radio buttons uses slideIn, the selected radio button is cleared and it goes back to the original selection. In IE6, not only the radio button but also the check boxes have the same behavior. This doesnot happen in Firefox.
<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>test </title>
<script type="text/javascript" src="../ext/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="../ext/adapter/yui/ext-yui-adapter.js"></script>
<link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-all.css" />
<script type="text/javascript" src="../ext/ext-all.js"></script>
</head>
<body>
<form name="test" method="post" action="" id="test">
<div class='' id='advSearch_panel' style="" >
<div id="box_1" class="" style="width:170px;">
<label >test</label>
<ul>
<li><input type="checkbox" value="2" ><label >test</label></li>
<li><input type="checkbox" value="2" ><label >test</label></li>
<li><input type="checkbox" value="2" ><label >test</label></li>
</ul>
</div>
<div id="box_2" style="width:200px;" class="">
<label class='opt_box_label'>test</label>
<ul><li><input type="radio" checked>
<label>Any</label>
</li>
<li><input type="radio" name="location" value="1" >
<label>test </label>
</li>
<li><input type="radio" name="location" value="2" >
<label>test</label>
</li>
</ul>
</div>
</div>
<div id="drawer" class="" style="background-color:gray;" onclick="toggle();" >
<label id="display_msg" style="margin-right:200px;vertical-align:top;font-size:1.1em;color:gray"></label><font id="optbar_txt" style="vertical-align:top;">more option</font>
</div>
</form>
<script type="text/javascript">
var toggle_counter=1;
function toggle(){
toggle_counter++;
if(toggle_counter%2==1){
Ext.get('advSearch_panel').slideIn('t', {useDisplay:true, duration: .5});
Ext.get('optbar_txt').update("hide option");
}else{
Ext.get('advSearch_panel').slideOut('t', {useDisplay:true, duration: .5});
Ext.get('optbar_txt').update("more option");
}
}
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>test </title>
<script type="text/javascript" src="../ext/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="../ext/adapter/yui/ext-yui-adapter.js"></script>
<link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-all.css" />
<script type="text/javascript" src="../ext/ext-all.js"></script>
</head>
<body>
<form name="test" method="post" action="" id="test">
<div class='' id='advSearch_panel' style="" >
<div id="box_1" class="" style="width:170px;">
<label >test</label>
<ul>
<li><input type="checkbox" value="2" ><label >test</label></li>
<li><input type="checkbox" value="2" ><label >test</label></li>
<li><input type="checkbox" value="2" ><label >test</label></li>
</ul>
</div>
<div id="box_2" style="width:200px;" class="">
<label class='opt_box_label'>test</label>
<ul><li><input type="radio" checked>
<label>Any</label>
</li>
<li><input type="radio" name="location" value="1" >
<label>test </label>
</li>
<li><input type="radio" name="location" value="2" >
<label>test</label>
</li>
</ul>
</div>
</div>
<div id="drawer" class="" style="background-color:gray;" onclick="toggle();" >
<label id="display_msg" style="margin-right:200px;vertical-align:top;font-size:1.1em;color:gray"></label><font id="optbar_txt" style="vertical-align:top;">more option</font>
</div>
</form>
<script type="text/javascript">
var toggle_counter=1;
function toggle(){
toggle_counter++;
if(toggle_counter%2==1){
Ext.get('advSearch_panel').slideIn('t', {useDisplay:true, duration: .5});
Ext.get('optbar_txt').update("hide option");
}else{
Ext.get('advSearch_panel').slideOut('t', {useDisplay:true, duration: .5});
Ext.get('optbar_txt').update("more option");
}
}
</script>
</body>
</html>