Displaying a note when focus comes over a text box - asp.net

I want to display a note to the user whenever the focus comes to a particular textbox i have written the note in a div and set its visibility to false what to do next

Instead of your div, put that text into a ToolTip property on the textbox control and ASP.NET will take care of it for you.

Related

Web Form Validator Layout Issue

I have a Div that holds a RadioButtonList with 2 values and a required field validator.
As you can see the validator wraps to the next line (Circled). I am trying to get it to display next to the RadioButtonList (where the red dot is). No matter what I do it remains on the next line.
I have made the cell wider with no effect. I have set Display to Dynamic, no effect. With all the other controls on the form (textboxes & Drop downs) the validator displays correctly but this one wont. It is the same in Design mode as it is when I run the app.
On the RadioButtonList I set RepeatDirection to Flow. Its fixed the problem.
I think the size of the div where you place the radio button control is small.Can you please increase the size of that div.

Primefaces splitButton rendering issue when no text is on the button

My splitButton should not have any text on the button. So when I try to achieve this using by providing blank value for the value attribute, the button shrinks to a very small size. I want it to remain the size of the dropdown button which appears beside it. I don't have an actionListener, therefore I need the button to display no text.
Is there no default size set to the button when it contains no text? Or is it possible to apply a style property to it?
Put the value attribute like this:
value=" "

Resizing Textbox/textarea to fit text

I need to create user control with Texbox Textmode="Multiline" or html textarea.
When in edit mode Textbox/textarea has to be resizable. I can use some jquery plugin for this. But in read only mode this Textbox/textarea is disabled and it must be automatically resized (height) to fit the text. Even if text takes pages. I could just hide Textbox/textarea in read only mode and display text in div but I would like to keep edit and readonly page look same.
Any ideas?
Why have textarea/input in readonly mode - versus using js to switch back and forth between that control and a DIV or a P tag (to display the text), where simply by not setting the height (or setting it to height:auto) that box would automatically size to contain all text?
Also, unless your surrounding content doesn't allow that, enable resizing the textarea to the user; see http://davidwalsh.name/textarea-resize

css/selenium: visiblity of an element does not change

I have an element (text box), which has the following attribute:
style="visibility: hidden;" and style="visibility: visible;"
When this textbox is empty the visibility is visible and vice-verse for when the textbox contains some text.
Now, I have a test-case in selenium where I am trying to get the attribute value of this attribute.
I remove all the text from the textbox and then check the style attribute.
The following wired thing is happening:
1. When i run the test-case and the Firefox window running the test-case is in focus, then the style comes out fine (visible, after removing the text in the textbox)
2. But when that window is not in focus my test-case always fails as the style attribute still shows 'hidden' even though i have removed the text from the text box.
could someone please help with this?
thanks
use this it ll work
selenium.get_eval("element = this.browserbot.findElement('locator'); vis =window.document.defaultView.getComputedStyle(element,null).getPropertyValue('visibility');")

Flex: Set caret cursor position in RichEditableText control

Is there a method to set the caret position within a RichEditableText control?
The control's contents can contain errors that the user must fix which are navigated though via Next/Previous buttons, and during the navigation I would like to set the caret cursor to the end of each error within the text.
First you need to change the focus:
textField.setFocus()
Then set the positoin:
textField.selectRange()

Resources