[ic] onChange

Greg Goble interchange-users@interchange.redhat.com
Wed Apr 10 03:33:00 2002


Greg Goble wrote:
>
> Something's fishy...
>
> Vrs.: IC 4.8
>
> The following code produces what I want in checkout.html,
> after I selectd
> Yes OR No, BUT only when I click somewhere/anywhere in the
> browser window
> (strange???). I mistakenly found this after exhausting all other
> possibilities known to me...
>
> Q: Why would clicking in the browser window cause my [if] to
> work properly?
> What's missing this should work on "onChange"?
>
> Here it is:
>
> <input type="radio" name="insurance" [checked name=insurance
> value=Yes]
> value="Yes"  onChange="this.form.submit()">Yes
> <input type="radio" name="insurance" [checked name=insurance value=No]
> value="No" onChange="this.form.submit()">No
>
> [if value insurance eq Yes]
>
> [then]
> text_text_text
> [/then]
>
> [else]
> [/else]
> [/if]
>
> Thanks, Greg
>
Greg Goble writes again:
Hoping someone might have had an answer or a 'thought' to my problem,
I returned to the drawing board this morning empty handed. However,
continuing
with motivation & reverse engineering (as my strongest know how), I found
the
solution!

Quite easy actually...It should have been 'onClick' and not 'onChange.' It
was
that one 'click' in the browser window that caused the ="this.form.submit()"
to perform, so it only makes since that it should be 'onClick' and not
'onChange'
OR?!!

Cheers!