This is a migrated thread and some comments may be shown as answers.

Set text from the client side.

3 Answers 217 Views
SearchBox
This is a migrated thread and some comments may be shown as answers.
ACubukcu
Top achievements
Rank 1
ACubukcu asked on 01 Feb 2013, 02:51 PM
Is thre a way to set the search box text from the client side?

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 01 Feb 2013, 03:53 PM
Hi,

Yes, you can use the client-side set_emptyMessage property. Here is example:

function pageLoad() {
      $find("SearchBox1").set_emptyMessage("Foo");
}

Greetings,
Genady Sergeev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
ACubukcu
Top achievements
Rank 1
answered on 01 Feb 2013, 04:23 PM
Hi Genady,

Thanks for your reply.

"set_emptyMessage" method, doesn't do what I am trying to achive. 
I'd like to have something like set_text or set_value method to emulate/initiate user input.

I see that there is an "input" control inside the search box.  That's where I want to access.

Thanks,
AC
0
ACubukcu
Top achievements
Rank 1
answered on 01 Feb 2013, 08:13 PM

 
Got it working:

 

var rsBox = document.getElementById("RadSearchBox1");

 

var rsInput = rsBox.getElementsByTagName("input");

rsInput[0].value = "foo"

 

AC

Tags
SearchBox
Asked by
ACubukcu
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
ACubukcu
Top achievements
Rank 1
Share this question
or