a quick js code question

  • From: Alex Hall <mehgcap@xxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Wed, 06 Feb 2008 22:08:08 -0500

Hi all,
I have a very simple program that, for some reason refuses to run. I have this function being called by a button and that part works, but I cannot get an answer out of this function. It seems to stop at where I declare x as a variable. The code, all 12 lines of it, is below. If anyone can point out what I know must be a very simple error I would really appreciate it.
function eq(){
try{
x=eval(form.in.value);
ans=(x-2)/(x*x)-4;
form.out.value=ans;

catch(err){
alert(err+": "+err.description);



Have a great day,
Alex
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: