0

I have form in which I have several controls. My concern is that when I filling values in Panel1 , & click on any other control or space outside panel1 .How can I get alert message. I am working in asp.net

5
  • 1
    Would you mind showing some of the code involved and what you've tried, please. Commented Oct 9, 2012 at 15:27
  • Currently I dont have code on my machine , but I can tell you scenario.. Commented Oct 9, 2012 at 15:31
  • @Neurofluxation It would help if any of the questions asked had any responses. Guessing those questions have as much detail as this one. :) Commented Oct 9, 2012 at 15:31
  • @ Neurofluxation , epascarello : i dont understand what you are trying to tell Commented Oct 9, 2012 at 15:32
  • If an answer has helped you, please accept it (click the tick)! Commented Oct 9, 2012 at 15:35

2 Answers 2

2

Add a click event to the body. Check the event's target or srcElement to see where the click occured. See if the cilck occurs on an element that is in the panel.

Sign up to request clarification or add additional context in comments.

Comments

0

Use focusin and focusout of Jquery.

<div style="border: 1px solid black;padding:10px;">
   First name: <input type="text"><br>
  Last name: <input type="text">
</div>`
<script>
$(document).ready(function(){
$("div").focusin(function(){
    $(this).css("background-color", "#FFFFCC");
});
$("div").focusout(function(){
    $(this).css("background-color", "#FFFFFF");
});
});

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.