I have a dhtmlxcombo box which accepts text entry or drop-down selection. Beneath this dhtmlxcombo box is the submit button. Users are entering a value in the dhtmlxcombo box (e.g. 1400)… as soon as they’ve typed the last character they are clicking on the submit button. They do not click outside of the dhtmlxcombo box or ‘tab away’ from it in any way before clicking the Submit button. Therefore the value they’ve entered in the dhtmlxcombo box isn’t being registered before the submit takes place. Instead, the default value of the dhtmlxcombo box gets submitted instead.
The process works fine for those users who click outside of the dhtmlxcombo box or ‘tab away’ from it before clicking the submit button. But I cannot rely on that.
Please could someone suggest a way of getting around this problem - with code examples would be great.
A snippit from my existing ASP/Javascript code is as follows…
Thanks,
Graham.
You can try to call confirmSelection() method before form submit:
<form onsubmit=“z4.confirmSelection()” …
Thanks for the suggestion.
I just tried it but I can’t seem to get that z4.confirmSelection() to work. Exactly what should the syntax be in the context of my existing code?
Sorry for the misleading information.
It was my typo.
The correct method name is _confirmSelection:
z4._confirmSelection(); /where z4 is combo object/
That’s fantastic - thanks very much.
I thought it was going to give me a prompt to ‘sonfirm selection’ but instead it just confirms the selection itself before proceeding with the submit which is exactly what I was after )
Cheers,
Graham.