Validation Problem
-
Hi Friends, I am having 2 submit buttons on one page. One is to search and other is for newsletter subscription. When i add text to search textbox and press enter, it validates the other text box which is to enter emailID for the subscription button. I am not using the .NET validators. I am using my own javascript file. I tried to check the enter keycode for search textbox and then make the search button click in the javascript, but still the validator fires and then the search button clicks. Please Help.
Sushant Duggal.
-
Hi Friends, I am having 2 submit buttons on one page. One is to search and other is for newsletter subscription. When i add text to search textbox and press enter, it validates the other text box which is to enter emailID for the subscription button. I am not using the .NET validators. I am using my own javascript file. I tried to check the enter keycode for search textbox and then make the search button click in the javascript, but still the validator fires and then the search button clicks. Please Help.
Sushant Duggal.
-
you have to write a javascript function which will trap the enter key and then envoke the button which you want to. :)
Best Regards, Apurva Kaushal
Hi, I already did that
function gotoSearch() { if(event.keyCode == 13) { document.getElementById('btnSearch').click(); return false; } }
It validates the other textbox validation, and then fires the btnsearch click event.
Sushant Duggal.
-
Hi, I already did that
function gotoSearch() { if(event.keyCode == 13) { document.getElementById('btnSearch').click(); return false; } }
It validates the other textbox validation, and then fires the btnsearch click event.
Sushant Duggal.
-
Hi Friends, I am having 2 submit buttons on one page. One is to search and other is for newsletter subscription. When i add text to search textbox and press enter, it validates the other text box which is to enter emailID for the subscription button. I am not using the .NET validators. I am using my own javascript file. I tried to check the enter keycode for search textbox and then make the search button click in the javascript, but still the validator fires and then the search button clicks. Please Help.
Sushant Duggal.
Hi Friends, I am having 2 submit buttons on one page. One is to search and other is for newsletter subscription. When i add text to search textbox and press enter, it validates the other text box which is to enter emailID for the subscription button. I am not using the .NET validators. I am using my own javascript file. I tried to check the enter keycode for search textbox and then make the search button click in the javascript, but still the validator fires and then the search button clicks. Please Help.
Sushant Duggal.