Help with SimpleSearch
Help with SimpleSearch
I'm having a problem which I think is my own lack of ASP.net knowledge rather than an AC7 problem.
I've got the SimpleSearch control in the header of each page of the site. Problem is when the header is on a page with any other form (login, edit address, etc.), when you fill out the other form and hit return, it submits a search instead of submitting the form you're focused on.
I created my own custom control so we could style it a little differently. I tried using the stock control as well, but get the same results.
I'm totally stumped. Where should I start looking?
Thanks.
I've got the SimpleSearch control in the header of each page of the site. Problem is when the header is on a page with any other form (login, edit address, etc.), when you fill out the other form and hit return, it submits a search instead of submitting the form you're focused on.
I created my own custom control so we could style it a little differently. I tried using the stock control as well, but get the same results.
I'm totally stumped. Where should I start looking?
Thanks.
The default value for a button is UseSubmitBehavior=True.
Add this parameter to the asp:button control on the simplesearch.ascx page. It should eliminate the issue although I haven't tested it.
Add this parameter to the asp:button control on the simplesearch.ascx page. It should eliminate the issue although I haven't tested it.
Code: Select all
UseSubmitBehavior="False"
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
You are correct, I did not go to any special steps (that I am aware of) to make that functionality possible. As you can tell, my theme is pretty much the default with some minor tweaks.
What about any "SetFocus" parameters - got any of those set on your modifications? Sometimes .Net validators can SetFocus as well without realizing it.
Another way to possibly narrow it down is pick a problem page. Switch to Edit Mode. Change one zone back to the AC7 default. Test. Change another zone. Test. Keep working backwards towards the AC7 default setup until the problem disappears - the last zone changed would be the one that contains the problem control(s).
Just some thoughts, that's a tricky one to narrow down for sure....
What about any "SetFocus" parameters - got any of those set on your modifications? Sometimes .Net validators can SetFocus as well without realizing it.
Another way to possibly narrow it down is pick a problem page. Switch to Edit Mode. Change one zone back to the AC7 default. Test. Change another zone. Test. Keep working backwards towards the AC7 default setup until the problem disappears - the last zone changed would be the one that contains the problem control(s).
Just some thoughts, that's a tricky one to narrow down for sure....

Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
- Shopping Cart Admin
- AbleCommerce Admin
- Posts: 3055
- Joined: Mon Dec 01, 2003 8:41 pm
- Location: Vancouver, WA
- Contact:
- Shopping Cart Admin
- AbleCommerce Admin
- Posts: 3055
- Joined: Mon Dec 01, 2003 8:41 pm
- Location: Vancouver, WA
- Contact:
- Shopping Cart Admin
- AbleCommerce Admin
- Posts: 3055
- Joined: Mon Dec 01, 2003 8:41 pm
- Location: Vancouver, WA
- Contact:
Hi Joe --
Works great for asp:Button, but doesn't work for asp:ImageButton. Do you know a workaround for this.
Code: Select all
UseSubmitBehavior="False"
Works great for asp:Button, but doesn't work for asp:ImageButton. Do you know a workaround for this.
Argh! It worked in that it disabled the search button, but then just shifted focus to the next button on the page.
If I change everything on the login page to use asp:button, everything works fine. If they are asp:ImageButton or asp:LinkButton things get confused.
This is kind of a bummer because we need to use asp:ImageButton and asp:LinkButton to style our buttons.
If I change everything on the login page to use asp:button, everything works fine. If they are asp:ImageButton or asp:LinkButton things get confused.
This is kind of a bummer because we need to use asp:ImageButton and asp:LinkButton to style our buttons.
Bud I wish I knew - there's no obvious property on linkbutton or imagebutton that supresses the submit behavior.
Any straight HTML buttons on your site that could be the cause??
Any straight HTML buttons on your site that could be the cause??
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com