Products
RapidSpell for .NET Apps.
RapidSpell Desktop .NET
(Win Forms)
RapidSpell Web ASP.NET
(ASP.NET, MVC, AJAX...)
RapidSpell WPF
RapidSpell Silverlight
RapidSpell for Java Apps.
RapidSpell Desktop Java
(Servlets, Swing...)
RapidSpell Web Java
(JSP, JSF...)
SearchUnit
RapidFindReplace WPF
Thesaurus Desktop .NET
Visual Studio Tools
Conveyor
Dictionaries
.NET Dictionaries
Java Dictionaries
StudioSpell
Customer Care
Existing Customers
Support
Support Forum
Knowledge Base
Company
Home
About Keyoti
Blog
Contact Us
Resellers
Refunds Policy
Support Policy
Privacy Policy
Home
>
Support
>
Support Forum
QueryTextBox initialization - SearchUnit - Forum
Welcome Guest
Search
|
Active Topics
|
Log In
|
Register
Notification
Forum
»
Technical Support Questions
»
SearchUnit
»
QueryTextBox initialization
Options
Previous Topic
·
Next Topic
DMacy
#1
Posted :
Wednesday, December 10, 2014 11:27:34 AM
Rank: Advanced Member
Groups: Registered
Joined: 9/1/2010
Posts: 136
I have the following SearchBox:
<keyoti:SearchBox ID="sbxProdSearch" runat="server" AutoCompleteQuery="True" AutoCompleteQueryFailSilent="True" AutoCompleteQueryMaxSuggestions="5"
AutoCompleteQueryRunSearchOnSelect="True" AutoCompleteQueryShowNumberOfResults="True" OnSearch="sbxProdSearch_OnSearch" RememberQuery="True">
<QueryTextBox ID="qtbProdSearch" runat="server" CssClass="text-box init" type="text" />
<SearchButton ID="sbProdSearch" runat="server" CssClass="go-button" type="button" Value="Go" />
</keyoti:SearchBox>
I also have the following script defined on that ASPX page:
<script type="text/javascript">
function clearTextBox(me) {
me.className = me.className.replace(" init", "");
me.value = "";
return true;
}
</script>
In the code-behind for that page, I have:
qtbProdSearch.Attributes.Add("onFocus", "return clearTextBox(this);")
The intent is for the initial text ("Search products") to be gray (the "init" CSS class) and for the text to be cleared and the color restored to black when the user clicks in the text box. It's not happening. I have used this same technique successfully with an HTML textbox. Is there another way to do it with the Keyoti QueryTextBox?
Back to top
|
User Profile
Hide User Posts
Dan
#2
Posted :
Wednesday, December 10, 2014 12:27:44 PM
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 10/20/2004
Posts: 456
Hi Dan,
You should be able to use this in the code-behind;
SearchBox1.QueryTextBox.Attributes.Add("onclick", "this.value=''");
Let me know how that goes.
Dan
Dan Wright
Back to top
|
User Profile
Hide User Posts
DMacy
#3
Posted :
Wednesday, December 10, 2014 12:43:08 PM
Rank: Advanced Member
Groups: Registered
Joined: 9/1/2010
Posts: 136
That was what I needed. Thanks!
Dan
Back to top
|
User Profile
Hide User Posts
Forum Jump
Technical Support Questions
- RapidSpell Desktop .NET
- RapidSpell Web ASP.NET
- RapidSpell WPF
- RapidSpell Silverlight
- RapidSpell Web Java
- RapidSpell Desktop Java
- SearchUnit
- RapidFindReplace WPF
- Thesaurus Desktop .NET
- Thesaurus for ASP.NET
You
cannot
post new topics in this forum.
You
cannot
reply to topics in this forum.
You
cannot
delete your posts in this forum.
You
cannot
edit your posts in this forum.
You
cannot
create polls in this forum.
You
cannot
vote in polls in this forum.
Watch this topic
Print this topic
Normal
Threaded
Powered by YAF
|
YAF © 2003-2009, Yet Another Forum.NET
Related Products:
SearchUnit - Search Engine for ASP.NET, MVC, Javascript, Razor
.
About
|
Contact
|
Site Map
|
Privacy Policy
Copyright © 2002-
2013
Keyoti Inc.