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

RadTextBox Border Color

1 Answer 221 Views
Input
This is a migrated thread and some comments may be shown as answers.
Constantine
Top achievements
Rank 1
Constantine asked on 30 Jul 2012, 03:11 PM
I am trying to update the border color of a RadTextBox using javascript.  The below snippit works great for the textbox in my datetimepickers but does not work for a radtextbox/radnumerictextbox:
DateTime.get_textBox().style.borderColor = "#FF0000";

This is the modified version that I am using with just the normal radtextbox:
TextBox.style.borderColor = "#FF0000";

Given that the get_textBox function is simply accessing the radtextbox component of the datetime picker should the same syntax not work on the straight radtextbox?

TIA




1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 31 Jul 2012, 06:34 AM
Hi Constantine,

Try setting the RadTextbox style as follows to achieve your scenario.

Javascript:
<script type="text/javascript">
function pageLoad()
{
 var textbox = $find("<%=RadTextBox1.ClientID %>");
 textbox._element.style.borderColor = "#FF0000";
}
</script>

Hope this helps.

Thanks,
Shinu.
Tags
Input
Asked by
Constantine
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or