iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
how to get the event, such as whether the event is the tab key and depending on this to one or another action for example set focus another control.
I'm using this example, but does not work
--- function javascript ----
if (event.keyCode==9)
{
{aspnetForm.ctl00_Contentplaceholder1_txtMontoNeto.focus();}
{ var objeto = ISGetObject(control); objeto.SetFocus(); }}
objeto.SetFocus(); }}
}
Hello Johnny,
I have figured what went wrong with the tab.
When you use a listener event, it will invoke the listener event first handed before the tab default behaviour. This is why when you press tab button it will run the listener event to wiFRecepcion and then run the tab default behaviour, which is lead to txtMontoNeto.
For the first workaround you can use setTimeout function.
if (event.keyCode == 9) { var objeto = ISGetObject("WebInput3"); objeto.SetValueData("10/10/2010"); setTimeout(function() { objeto.SetFocus(); }, 1); return false; }
Or you can use the cancel bubble function, this function will cancel the tab default behaviour.
if (event.keyCode == 9) { event.returnValue = false; event.cancelBubble = false; var objeto = ISGetObject("WebInput3"); objeto.SetValueData("10/10/2010"); objeto.SetFocus(); return false; }
objeto.SetFocus(); return false; }
Hope this solves your issue.
Thank you and have a nice day.
Best regards,
Niven Prasetya
Hi Johnny,
The WebCombo’s OnKeyDown will be triggered only when you press any key in keyboard after the dropdown is shown. Here I attached my simple sample that shows you how to attach the HTML event to WebCombo’s textbox. Please let me know if you have different scenario.
Hope this helps and have a nice day.
the previous example served me well, but not from webinput. Send the example for WebInput. The alert works with all the keys except the tab key, I send a sample in pictures
-- function javascript -------
{ alert(event.keyCode); }
Hi Johny,
When you press the tab button, it will invoke WebInput default behaviour first handed than the OnKeyDown function.
But you can use the same WebCombo workaround as I gave you yesterday. I attach a sample using a WebInput based on WebCombo workaround.
Hope this can helps
when you hit the tab key in wiFEmision the focus is set txtMontoNeto
</ISWebInput:WebInput>
-- functions javascript --
{ var objeto = ISGetObject("wiFRecepcion"); objeto.SetValueData("10/10/2010"); objeto.SetFocus();
objeto.SetValueData("10/10/2010"); objeto.SetFocus();
objeto.SetFocus();
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname