Re: Bizarre radio button behaviour

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



What happens if they avoid the mouse?
E.g. do a Ctrl-f Find for satisfied, press Backtab
then press CursorDown to make the selection.
Then what? Press Enter? Tab to the Record your Satisfaction button?

What happens is very interesting. Thank you for your insight!
The radio buttons cannot be reached.
I think this is because of some strange (to me, even though I coded the page aeons ago) JavaScript.

Each of the radio buttons has associated:
onClick="document.Form.Reason.focus();return true;" onFocus="document.Form.Reason.focus();return true;"

"Reason" is the text input field below the Radio buttons.
The *intention* was to transfer focus to the input field as soon as one of the radio buttons has been selected, thus helping the user avoid the need to click in the "Reasons" box. That javaScript was developed before I had any idea what I was doing (still don't, really, for JavaScript) and was put together by experimenting with fragments found elsewhere.

I'm wondering if the "onFocus" event is stealing focus away from the radio button and preventing its getting selected? If so, then its an obscure timing issue, as I've never seen it causing any problems across years of use and tens of thousands different users/systems/browsers. Until now, that is.

I do recall a problem with being unable to click the radio buttons during development of this page, caused by JavaScript, but until today thought I'd got around it.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
.



Relevant Pages

  • Re: Bizarre radio button behaviour
    ... E.g. do a Ctrl-f Find for satisfied, press Backtab ... then press CursorDown to make the selection. ... Tab to the Record your Satisfaction button? ... The radio buttons cannot be reached. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Problem with JavaScript in Internet Explorer
    ... The following JavaScript does work with Opera and Firefox, but not with the Internet Explorer. ... After the selection of one of those radio buttons, there will be given another table row below. ... The two radioboxes calling the function: ...
    (comp.lang.javascript)
  • Re: Change Form input text name=""
    ... CHANGE_WITH_RADIO_SELECTION to see what I need to change with radio ... selection. ... Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ ...
    (comp.lang.javascript)
  • Re: Set disabled attribute of input based on value of radio button?
    ... behavior in user agents with Javascript turned on. ... to the value of the 'publns_source_web' radio button at that time). ... publnsUri = document.getElementById, ... the most popular one is jQuery. ...
    (comp.lang.javascript)
  • Set disabled attribute of input based on value of radio button?
    ... I'm trying to add a very light sprinkling of JavaScript to a web form as ... If a particular one of the radio buttons is *not* the selected button ... Please choose which source of publications data to use: ...
    (comp.lang.javascript)