Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Webpart keyboard submit of a search View modes: 
User avatar
Member
Member
sid.denwood-southstaffshis.nhs - 10/11/2013 6:01:36 AM
   
Webpart keyboard submit of a search
Hi all,

I am at a bit of a loose end with an issue. I have a web part that I use to hook into a repository of documents via web service. One of the queries asked by the user when searching this repository is to search on keyboard enter being pressed. This is normally fine in any standard environment however in Kentico it is recognizing the main Kentico search as the default button as so it never actually does the web part search. I know it is a bit of a weird request but hey users can be quirky in their needs.

Does anyone know of a solution to my issue?

User avatar
Member
Member
kentico_sandroj - 10/11/2013 9:07:25 PM
   
RE:Webpart keyboard submit of a search
Hello,

Our recommendation is to set the focus using JavaScript or standard .NET methods.

Please let me know if you have any questions about this.

Best Regards,
Sandro

User avatar
Kentico Legend
Kentico Legend
Accepted solutionAccepted solution
Brenden Kehren - 10/14/2013 8:29:51 AM
   
RE:Webpart keyboard submit of a search
If you have access to modify the code, I simply wrap the controls I want to have a default submit button for in an asp:Panel. You can set the DefaultSubmit property to your button and by default it will have the action you desire. Pretty simple fix and allows you to have multiple "forms" on one page with multiple submit buttons.

User avatar
Member
Member
sid.denwood-southstaffshis.nhs - 10/15/2013 3:24:24 AM
   
RE:Webpart keyboard submit of a search
kentico_sandroj wrote: Hello,

Our recommendation is to set the focus using JavaScript or standard .NET methods.

Please let me know if you have any questions about this.

Best Regards,
Sandro

FroggEye wrote: If you have access to modify the code, I simply wrap the controls I want to have a default submit button for in an asp:Panel. You can set the DefaultSubmit property to your button and by default it will have the action you desire. Pretty simple fix and allows you to have multiple "forms" on one page with multiple submit buttons.

Just a quick thanks to the both of you. I did indeed use the asp Panel setting the default button and it works like a dream :)

Once again thanks to you both I have a happy client now!!!