I am able to make my app work by commenting out the following line from
jevdo().

if(jform.jtype.value=="click"||jform.jtype.value=="enter"){alert("not
defined: function "+JEV+"()");return false;}


To me this seems rather drastic, but I could not see another fix, which I
would prefer, because this "fix" means adjusting JHS code instead of my
app's code. Can anyone suggest a way to rewrite J code so that this
condition in js is NOT triggered?



On Sun, Mar 19, 2017 at 2:12 AM, Brian Schott <[email protected]>
wrote:

> I think I have found the reason there is a difference but I don't see how
> to fix it.
>
> I think the difference is between the function jevdo() in j804 and j805,
> which are both in the scriptfiles j64-804/addons/ide/jhs/utiljs.ijs and
> j64-805/addons/ide/jhs/utiljs.ijs
> shown below.
>
> I should add that this error occurs only for radio buttons in groups, not
> for simple buttons and although the error alert is presented, processing
> continues and is done correctly in most cases.
> Also there is another new problem that occurs with other radio buttons.
>
> All of the problems seem to occur because these radio buttons are being
> submitted early, before the
>
> `'made' jhselect Choices `
>
> control in my app -- shown in this next line -- is clicked/tapped by the
> user.
>
> jhtr ('made'jhselect Choices);('output1' jhtextarea '';25;20);('output2'
> jhtextarea '';30;50)
>
>
> I could use suggestions about how to revise my app for the new JHS.
>
>
> j805:
> function jevdo()
> {
>  JEV= "ev_"+jform.jmid.value+"_"+jform.jtype.value;
>  //alert(JEV);
>  //try{eval(JEV)}
>  //catch(ex)
>  if('undefined'==eval("typeof "+JEV))
>  {
>   // undef returns true or does alert and returns false for events that
> should have handlers
>   if(null==jevtarget)return true;
>   if(jform.jtype.value=="click"||jform.jtype.value=="enter"){alert("not
> defined: function "+JEV+"()");return false;}
>   return true;
>  }
>  try{var r= eval(JEV+"();")}
>  catch(ex){alert(JEV+" failed: "+ex);return false;}
>  if('undefined'!=typeof r) return r;
>  return false;
> }
>
>
> 804:
> function jevdo()
> {
>  JEV= "ev_"+jform.jmid.value+"_"+jform.jtype.value;
>  // alert(JEV);
>  //try{eval(JEV)}
>  //catch(ex)
>  if('undefined'==eval("typeof "+JEV))
>  {
>   // undef returns true or does jsubmit for buttons
>   if(null==jevtarget)return true;
>   var c=jevtarget.getAttribute("class");
>   if(c=="jhb"||c=="jhab"||c=="jhmab")jsubmit();
>   return true;
>  }
>  try{var r= eval(JEV+"();")}
>  catch(ex){alert(JEV+" failed: "+ex);return false;}
>  if('undefined'!=typeof r) return r;
>  return false;
> }
>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to