Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback on: irt.org FAQ Knowledge Base Q1411, Monday April 30, 2007 at 06:58:38

You are here: irt.org | About | Feedback | 4510 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q1411

Sent by
Jojo T J on Monday April 30, 2007 at 06:58:38

Worth:
Worth reading

Length:

Technical:

Comments:
Plese change the function function filter(el) as follows, currently its not supporting IE and mozilla

function filter(el) {
var j = 0;
var strHTML = " ";
var v_foundarray = new Array();
var v_array = new Array("manish","satyan","123","324","34324","565");
var v_regexp = new RegExp(el.value,"gi");

for ( var i = 0; i < v_array.length; i++ ) {
if ( v_regexp.test(v_array[i]) ) {
v_foundarray[j] = v_array[i]; // Pattern found
j++;
}
}
strHTML += "<table width='98%' class='TABLEBORDER' border='0' cellspacing='2' cellpadding='2' align='center'>";

for ( var k = 0; k < v_foundarray.length; k++ ) {
strHTML += "<tr> <td>";
strHTML += v_foundarray[k];
strHTML += "</td> </tr>";
}
strHTML += "</table>";

if (document.getElementById){
x = document.getElementById('vals');
x.innerHTML = '';
x.innerHTML = strHTML;
}
else if (document.all) {
document.all.vals.innerHTML = strHTML;
}
else if (document.layers) {
document.layers['vals'].document.open();
document.layers['vals'].document.write(strHTML);
document.layers['vals'].document.close();
}




©2018 Martin Webb