Updating text with inner html returning cannot read undefined

Updating text with inner html returning cannot read undefined

I have this java code
  1. function updateprice(pprice, ppricediv, pform, popt) {
  2.     var totAdd = pprice;
  3.     var thisopt = popt;
  4.     if (!isW3) return;
  5.     var pDiv = document.getElementById(ppricediv);
  6.     totAdd = totAdd + pricechecker(document.forms.pform.thisopt.options[document.forms.pform.thisopt.selectedIndex].value);
  7.     pDiv.innerHTML = formatprice(Math.round(totAdd * 100.0) / 100.0, '', '');
  8. }
and it returns;

Cannot read property 'thisopt' of undefined

this is what I'm doing this;

onchange =" updateprice('382.49' , 'pricediv1' , 'tform1' , ' optn0 '); "

And I have no idea why?

Kind regards,
    Glenn - glenn223