-
I rarely use it, but here's how I do it if and when:
Code:
<script type="text/javascript" language="javascript">
var myArray;
var keepOnRollin = true;
try {
myArray = new Array(3);
myArray[0] = 'item1';
myArray[1] = 'item2';
myArray[2] = 'item3';
} catch (ex) {
keepOnRollin = window.confirm('Error populating myArray\n' + ex.value);
} finally {
if (keepOnRollin) {
myFunction(myArray);
}
}
</script>
Anyone else have anything to add to this?
EDIT: replaced "continue" with "keepOnRollin". Good catch, filburt
-
continue is a reserved word (immediately start next iteration of a loop).