<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>Hello,<div><br></div><div>We are required to provide a non-javascript version of our website in order to provide access to people who use screen readers and other non-traditional browsers. Our catalog is based on the 'standard' store. Some research on the mail list only turns up variations on the solution of "tell the user to turn on javascript". This is an accessibility requirement so that is not really an option for us.</div><div><br></div><div>I think that the javascript code could probably be replaced using the 'mv_click' feature. However, in some cases javascript is used to change the form action and form profile when particular buttons are pressed. Although these changes could be made in the mv_click, the click is not processed until after the check_order is run for mv_form_profile.</div><div><br></div><div>So, for example, in the checkout process, we can have a mv_form_profile to validate the inputs on the shipping address. However, for the back key the mv_form_profile is turned off allowing </div><div>the user to hit back without having to get a valid shipping address entered.</div><div><pre id="line1"><span>            <input type=hidden name=mv_form_profile  value="Check_shipping"></span><span class="Apple-tab-span" style="white-space:pre">            </span><<span class="start-tag">input</span> <span class="attribute-name">type</span>=<a class="attribute-value">button</a> <span class="attribute-name">onClick</span>="</pre><pre id="line1"><a class="attribute-value">                                  this.form.mv_form_profile.value='';</a></pre><pre id="line1"><a class="attribute-value">                                    this.form.country_reset.value='1';</a></pre><pre id="line1"><span><a class="attribute-value"><span id="line819"></span>                                 this.form.mv_action.value='back';
<span id="line820"></span>                                        this.form.mv_nextpage.value='ord/country';
<span id="line821"></span>                                        this.form.submit();
<span id="line822"></span>                                </a>"
<span id="line823"></span>                                <span class="attribute-name">value</span>="<a class="attribute-value"><span class="entity"><span>&</span>lt;</span>-- Back</a>" <span class="attribute-name">class</span>=<a class="attribute-value">button3</a>></span><span></span></pre><div>If this were replaced with an mv_click</div></div><div><div>                [button</div><div>                    text="&lt;-- Back"</div><div>                    class="back_button"</div><div>                    ]</div><div>                    mv_form_profile=''</div><div>                    mv_action=back</div><div>                    mv_nextpage=ord/basket</div><div>                [/button]</div></div><div><br></div><div>which produces</div><div><pre id="line1"><span><span class="Apple-tab-span" style="white-space:pre">      </span><<span class="start-tag">input</span> <span class="attribute-name">class</span>="<a class="attribute-value">back_button</a>" <span class="attribute-name">type</span>="<a class="attribute-value">submit</a>" <span class="attribute-name">name</span>="<a class="attribute-value">mv_click</a>" <span class="attribute-name">value</span>="<a class="attribute-value"><span class="entity"><span>&</span>lt;</span>-- Back</a>"></span><span></span></pre><div>then by the time dispatch() gets to turning off the mv_form_profile in the mv_click, the mv_form_profile has already been run.</div></div><div><br></div><div>I am considering changing Vend::Dispatch::dispatch() to add an mv_form_profile<b>_after</b> which checks form inputs, but does it after mv_click has had an opportunity to change some of them</div><div><br></div><div><div></div></div><blockquote type="cite"><div><div>        if($CGI::values{mv_form_profile}) {</div><div>                my ($status) = check_order(</div><div>                                                        $CGI::values{mv_form_profile},</div><div>                                                        \%CGI::values,</div><div>                                                        $CGI::values{mv_individual_profile},</div><div>                                                        );</div><div>                return 1 if defined $status and ! $status;</div><div>        }</div><div><br></div><div>    my $orig_todo = $CGI::values{mv_todo};</div><div><br></div><div>        do_click();</div><div><br></div><div>    my $todo = $CGI::values{mv_todo};</div><div><br></div></div><div><div>+        if($CGI::values{mv_form_profile<b>_after</b>}) {</div><div>+               my ($status) = check_order(</div><div>+                                                       $CGI::values{mv_form_profile<b>_after</b>},</div><div>+                                                       \%CGI::values,</div><div>+                                                      $CGI::values{mv_individual_profile<b>_after</b>},</div><div>+                                                       );</div><div>+              return 1 if defined $status and ! $status;</div><div>+     }</div></div></blockquote><div><div><br></div><div>Does anyone have any alternatives for providing a non-javascript option? Any comments on this proposal, in particular unexpected side-effects to watch out for?</div><div><br></div><div>Thanks</div><div><br></div><div>Angus</div><div><br></div><div><br></div></div><div><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><b>---</b></div><div><b>Angus Rogerson, BMath, BScN, RN</b></div><div><br></div><div>Duct Tape Programmer</div><div>University of Waterloo | Retail Services | Information Systems</div><div><span class="Apple-style-span" style="line-height: 12px; "><b><br></b></span></div><div><span class="Apple-style-span" style="line-height: 12px; "><b>Visit Us Online & Right On Campus<span class="Apple-converted-space"> </span><a href="http://www.retailservices.uwaterloo.ca">www.retailservices.uwaterloo.ca</a></b></span></div><div><br></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></div></body></html>