Value not being returned?

Hi guys, the below code loads the combo fine and adds the values but the onchange event shows a blank alert box?





In existing version on moment of onchange event only value set for combo.
Problem already fixed in dev. code - it will be released as part of next build. If you need it ASAP - please use attached js file instead of original one.

dhtmlxcombo.zip (8.48 KB)

I have the same problem with the new code…dated 2008-3-20

Problem can’t be reconstructed with latest code - please check attached sample.

1207818559.zip (15.7 KB)


The problem is, the combobox value is not set unless the value is changed.  Therefore, when I default the value on page load, then user clicks submit…the value is null.



My code…







When country equals US in drop down, but unless the user clicks in drop down, value is null on page submit.



Thanks.

The combo has different commands to set selected text and selected value, you can use
    combo.setComboValue(value);   //value which will be send during submit


setComboValue works on page load.  I am talking about another problem, not on load…but on submit.



This problem I am talking about is when the user is typing in the value, then hitting the submit button.  If you click in the box, or hit tab…the value the user typed will always be submitted with the form.



However, if the user just types in the combo box then clicks on submit…the NEW VALUE is hit or miss on submit.



Please help!

The combo changes its value in next cases
    - direct selection by click
    - direct selection by enter key
    - typing value and onBlur event

When you clicking any button outside of combo, onBlur event occurs and value in combo changed
If it still not works in you case, you can force onBlur event by using next code

       <input type=“submit” onclick=“combo._confirmSelection()”/>


Thanks,



I do have to call your onblur action to make it work, I wonder if it is because I have an image submit button.  This is on IE 7 for your notes.



Thanks.