combo sending default value and not typed in value

We are using v.2.5 build 090904 of dhtmlxcombo… Its not easy for us to upgrade, so I hope there is an answer in our version…

We initialize the page by calling:

dhtmlxcombo.setComboValue(‘1234’);
dhtmlxcombo.setComboText(‘defaultText’);

When someone goes to the page, and types something in the combo, and clicks submit before the Ajax is done coming back, then the value 1234 is sometimes sent to the server on submit, instead of the new value they type in.

This is what is submitted…

defaultTextasdfas
ajaxSection25combo 1234
ajaxSection25comboName 1234
ajaxSection25combo_new_va… false

Note the first thing is what we want (from the dhtmlxcombo textfield with no name), but the new value should say true, and the combo hidden fields should submit like that too.

So my question is, have you heard of this problem before? Is there a delay between when people type things in and when they are copied to the hidden fields? Note, this is hard for us to reproduce. We can reproduce in firefox 3.6.12 sometimes, when the ajax service has a delay in it, and even then it doesnt happen all the time…

Thanks!
Chris

Try to call _confirmSelection (private method) on form submit:

combo._confirmSelection();

In the latest combo version you could you use confirmValue method instead:

docs.dhtmlx.com/doku.php?id=dhtm … nfirmvalue

I tried calling that, and still had the issue. I dont see anything change in the screen, is it a silent method that should help with this? Thanks, Chris

combo value is placed into the hidden input on blur event for the combo. There could be a case when onblur doesn’t occur when submit clicked. And _confirmSelection method exectutes the same functionality as onblur event handler.
If the problem is not solved, please provide the demo where we could reproduce it.