Hi, am having some trouble in jQuery. How do I remove the text that I added after the input box?
Here's my code:
SyntaxEditor Code Snippet
if($('#"+Employee_Address.Id+":text').val() == '')
$('#"+Employee_Address.Id+":text').after('<span style="" position: absolute; border: 1px solid red; font-size:larger; background-color: lightcoral; color: whitesmoke; margin-left: -1px; "">Please enter the address</span>') ;
$('#"+Employee_Address.Id+"').css( 'border-color', 'gray' ); // this will change the color of input field
The highlighted text is the one I used to remove the span I created near the input field.
Please help me. If you want to see the oml. I have attached it too.
why don't you use the simple client-server validation of outsystems?
I have done some changes in your code & now for first control EmployeeName I have implemented jquery code in onkeyup event if you do not write anything then it will be red and if you write something it will be green in this way you can understand how we can use jquery in outsystems.
Case 1: If call onkeyup event with blank textbox.
Case 2: If call onkeyup event with filled textbox.
I think it should be helpfull to learn use of jquery in outsystems.
Sahshi kant Shukla wrote:
Yeah I understand. But the problem is, even after I enter the name the error message still in display. I want it to disappear after the input box is filled.
So please help me to achieve this.
Okay Thanks. I will check.