View Full Version : Strange problem with input fields and radio buttons

17 Nov 2006, 5:50 AM

First of all: thank you for this wonderful framework.
Now my problem:

I'm building a small app that will work as a script manager for call center operators.
It basically displays a question, a list of answers, and, based on the answer, displays another question (these are usually called "scripts").

Anyway: some of the answers are selected using radio buttons, others use checkboxes. Also, some of the answers may require aditional information, and for that we have input fields near a question:

I have a border layout with two regions: south and center.

On the center I display the current question and the list of answers.
On the south, I display the current script history.

Everytime the user clicks the "next" button, I clear both panels and update their content.
I only have a problem that I have been unable to solve so far:

For some reason, if I click on a radio button, it doesn't get selected (but checkboxes do!).
Text input fields aren't working also! They get rendered, but I cannot type text on them (they're active), and if they have a default text value, the text cannot be selected.

What's causing this?
I'm pretty sure i'm doing something wrong.

Right now I'm adding all these elements (Question, Answers, etc), using DomHelper.Template.

Can anyone help? Also, what's the best way to update content panels? I know i'm not doing it in the best possible manner, as I'm just clearning the contents of both divs.

Thanks in advance.

17 Nov 2006, 7:05 AM
Hmm. Could it be something to do with disabling selection?

17 Nov 2006, 7:48 AM
Hmm, now that you mention it, I cannot select text on the screen.
What could be causing that?

17 Nov 2006, 8:37 AM
Add this after you add your broken panel and see if it fixes it:

panel.getEl().mon('selectstart', function(e){

If it does, please let me know and I will make a config option.

17 Nov 2006, 9:02 AM
Great, everything works now!
Thanks a lot :)

17 Nov 2006, 9:26 AM
Thanks for letting me know.