help with find button
this url worked until I added a code section
http://proximityone.com/k12schools/azschools1.htm
The text added is listed below and is at the end of the script.
I have a similar "find in text" above this code that works properly.
I am seeking to have this addl "find in text" work on column 7, but it will not even allow the user to key in text to find.
Can someone tell me how to fix?
Thank you ... the errant code:
/////////////
var max_3 = table.getCount();
var max2_3 = max_3;
function filter3(searchcriteria3){
var i, rows = [], max_3 = obj.getRowCount();
if(searchcriteria3==''){
obj.setRowCount(max2_3);
obj.setRowIndices('');
}
if(searchcriteria3!=''){
for (i=0; i<max_3; i++){
if (obj.getCellValue(7, i).indexOf(searchcriteria3) >-1 ){
rows.push(i);
}
}
obj.setRowCount(rows.length);
obj.setRowIndices(rows);
}
}
var button3 = new AW.UI.Button;
button3.setControlText("Find in City Name:");
button3.onControlClicked = function(){ filter3( input3.getControlText()); }
document.write(button3);
var input3 = new AW.UI.Input;
input3.setId("myCombo");
input3.setControlText("enter text & click Find");
document.write(input3);
http://proximityone.com/k12schools/azschools1.htm
The text added is listed below and is at the end of the script.
I have a similar "find in text" above this code that works properly.
I am seeking to have this addl "find in text" work on column 7, but it will not even allow the user to key in text to find.
Can someone tell me how to fix?
Thank you ... the errant code:
/////////////
var max_3 = table.getCount();
var max2_3 = max_3;
function filter3(searchcriteria3){
var i, rows = [], max_3 = obj.getRowCount();
if(searchcriteria3==''){
obj.setRowCount(max2_3);
obj.setRowIndices('');
}
if(searchcriteria3!=''){
for (i=0; i<max_3; i++){
if (obj.getCellValue(7, i).indexOf(searchcriteria3) >-1 ){
rows.push(i);
}
}
obj.setRowCount(rows.length);
obj.setRowIndices(rows);
}
}
var button3 = new AW.UI.Button;
button3.setControlText("Find in City Name:");
button3.onControlClicked = function(){ filter3( input3.getControlText()); }
document.write(button3);
var input3 = new AW.UI.Input;
input3.setId("myCombo");
input3.setControlText("enter text & click Find");
document.write(input3);
Warren
February 15,