WeBWorK Problems

Changing tab order of answer blanks

Changing tab order of answer blanks

by D. Brian Walton -
Number of replies: 1
I was curious if anyone knew how to change the tab-order (HTML attribute tabindex) of the text entry fields generated by ans_rule. I'm interested in writing synthetic division problems where the student directly fills out the table of entries. But when the table of fields is created, the tabbing order does not match the algorithm.

Thanks for any insight.

D. Brian Walton
James Madison University
In reply to D. Brian Walton

Re: Changing tab order of answer blanks

by Michael Gage -
Hi Brian,

Saw this and your comments on IRC once I got back to my computer.  I think that using named answers and a javaScript (which you can insert using  HEADER_TXT() ) would be one way to set the tab order.

For other's reference here is the url which you found:

we could also modify ANS_RULE and associated macros so that it 
accepted an optional hash or hash reference 
which would allow us to add arbitrary tags
to any ANS_RULE (use the key/value pairs in the hash to 
place key/value pairs in the HTML mark up). I haven't tested this
but I think it would allow you to add tabIndex=>"3" type attribute tags.

It wouldn't get in the way of existing usage.  This would solve your current problem, do you think it would be a good idea in general?

-- Mike