Java Reference
In-Depth Information
}
} else if (tag.getName().equalsIgnoreCase("td"))
{
if (buffer.length() > 0)
list.add(buffer.toString());
buffer.setLength(0);
capture = true;
} else if (tag.getName().equalsIgnoreCase("/td"))
{
list.add(buffer.toString());
buffer.setLength(0);
capture = false;
} else if (tag.getName().equalsIgnoreCase("/table"))
{
break;
}
} else
{
if (capture)
buffer.append((char) ch);
}
}
}
/**
* The main method, create a new instance of the object and call
* process.
* @param args not used.
*/
public static void main(String args[])
{
try
{
JavaScriptForms parse = new JavaScriptForms();
parse.process(7.5,12,10000);
} catch (Exception e)
{
e.printStackTrace();
}
}
}
This recipe submits data to a JavaScript enabled form. This form collects information
about a loan and displays the loan's amortization table. Figure 9.4 from earlier in this chapter,
shows the amortization schedule.
Search WWH ::




Custom Search