I have a hidden span within a table column and I cannot unhide it using style.display=' block' ??
Sample code
<table>
<tr>
<td><input name="status" value=""></td><td><input type="button" value="search" onClick="search ByStatus()"></td>
<td><div id="MySpan" Style="display: none"><img src="ajaxprogre ssindicator.gif "></div></td>
</tr>
</table>
var xmlHttp = new ActiveXObject(" MSXML2.XMLHTTP" );
function searchByStatus( ){
var f=document.form s[0];
var key =f.status.value ;
if(key==''){
alert("Please select a status");
return;
}
MySpan.style.di splay='block';
var url = "/"+document.form s[0].getdbpath.valu e+"/StatusSearch?Op enAgent";
pdata="&a="+key ;
xmlHttp.open("P OST",url,false) ;
xmlHttp.setRequ estHeader("Cont ent-type","applicat ion/x-www-form-urlencoded");
xmlHttp.setRequ estHeader("Cont ent-length",pdata.l ength);
xmlHttp.setRequ estHeader("Conn ection","close" );
xmlHttp.onready statechange = processSearchXM L
xmlHttp.send(pd ata)
}
I have used a similar method in the past. the location of the span, inside or outside of the table does not seem to matter.
I have got the image to appear by placing an alert after the line:
MySpan.style.di splay='block';.
Maybe this has something to do with a small result set, but in the past with only one result I still saw the image flicker and in this case I am returning over 25 results from the server.
Sample code
<table>
<tr>
<td><input name="status" value=""></td><td><input type="button" value="search" onClick="search ByStatus()"></td>
<td><div id="MySpan" Style="display: none"><img src="ajaxprogre ssindicator.gif "></div></td>
</tr>
</table>
var xmlHttp = new ActiveXObject(" MSXML2.XMLHTTP" );
function searchByStatus( ){
var f=document.form s[0];
var key =f.status.value ;
if(key==''){
alert("Please select a status");
return;
}
MySpan.style.di splay='block';
var url = "/"+document.form s[0].getdbpath.valu e+"/StatusSearch?Op enAgent";
pdata="&a="+key ;
xmlHttp.open("P OST",url,false) ;
xmlHttp.setRequ estHeader("Cont ent-type","applicat ion/x-www-form-urlencoded");
xmlHttp.setRequ estHeader("Cont ent-length",pdata.l ength);
xmlHttp.setRequ estHeader("Conn ection","close" );
xmlHttp.onready statechange = processSearchXM L
xmlHttp.send(pd ata)
}
I have used a similar method in the past. the location of the span, inside or outside of the table does not seem to matter.
I have got the image to appear by placing an alert after the line:
MySpan.style.di splay='block';.
Maybe this has something to do with a small result set, but in the past with only one result I still saw the image flicker and in this case I am returning over 25 results from the server.
Comment