Question

Suppose i have one input type textbox for example Bday :<div id="clickbox">               ...

Suppose i have one input type textbox for example

Bday :<div id="clickbox">
                                       <input name="bday" size="10" maxlength="10" class="TextInput"
                                           value="${bday}" onchange="validatedate(this)"/>
                                           <img src="/LMS/img/calendar.gif" border="0" onclick="openCalWin_actual_date('0', 'bday');" /> </div>
                                   </td>

=======================================================

On clicking the Calendar icon i am able to open the calendar. Now i want to pause the screen and Write alert box statement so that if user click somewhere else or user scrolls down , an error message should be displayed sstating "Kindly first fill the Birthday date " then only proceed further.

I want to lock , hold the screen with the alert box statement "kindly first fill birthday date" if user clicks somewhere else on screen or scrolls down

Write a function to Hold/lock the screen in javascript. You can name the function as _externalClick() or anything you like .

just Hold and lock the screen untill and unless the user fills the Birthday Date, screen should not move and alert popup statement should be upside the screen

Language = Front-End , Javascript , Jquery.

================================

i dont know how to bind the Event with tat textbox After Opening the Calendar Popup

==============================================================

PLEASE TELL AND EXPLAIN HOW TO PUT THE ALERT POPUP AND LOCK AND KEEP ON DISPLAYING THE MESSAGE "PLEASE FILL BIRTHDAY DATE" EVEN IF USER SCROLLS DOWN OR CLICKS SOMEWHERE ELSE

ONCE THE USER FILLS THE BDAY DATE THE CALENDAR SHOULD BE HIDDEN.

=====================================================================================================

I TRIED WITH THE FOLLOWING PIECE OF CODE BUT NOTHING IS HAPPENING

<img src="/LMS/img/calendar.gif" border="0" onclick="openCalWin_actual_date('0', 'bday');externalClick();" /> </div>

<script type="text/javascript">

       externalClick(){

           $(document).click(function() {

           alert('clicked outside box');

           });

           $(window).scroll(function() {

           alert("You scrolled please enter details first");

           });

           }
       </script>

================================================

PLEASE TELL WHAT HAS TO BE DONE PLEASE WRITE CORRECT WORKING CODE SOLUTION. ON THE CLICK OF CALENDAR ICON IF USER CLICKS SOMEWHERE ELSE THEN MY CALENDAR SHOULD NOT BE HIDDEN ON THE DESKTOP . THE CALENDAR POPUP SHOULD BE PAUSED THERE ITSELF AND IF USER CLICKS SOMEWHERE ELSE THEN POPUP SHOULD COME THAT "USER SHOULD FIRST ENTER THE BIRTHDAY DATE" IF USER CLICKS ANYWHERE ON THE ENTIRE PAGE OR USER SCROLLS DOWN

0 0
Add a comment Improve this question Transcribed image text
Answer #1

<html>

<head>

<title>

</title>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.js"></script>

</head>

<body>

<h1>Exampple form</h1>

<input type="text" placeholder="data" class="box"/>

<h2>

if you add more block element you can see scroll alter too

</h2>

<script>

$(document).click(function() {

alert('clicked outside box');

});

$(window).scroll(function() {

alert("You scrolled please enter details first");

});

</script>

</body>

</html>

//the above HTML is an example so you can put the jquery in _externalClick()

_externalClick(){

$(document).click(function() {

alert('clicked outside box');

});

$(window).scroll(function() {

alert("You scrolled please enter details first");

});

}

Add a comment
Know the answer?
Add Answer to:
Suppose i have one input type textbox for example Bday :<div id="clickbox">               ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • NEED HELP with HTML with Javascript embedding for form validation project below. I have my code...

    NEED HELP with HTML with Javascript embedding for form validation project below. I have my code below but I'm stuck with validation. If anyone can fix it, I'd really appreciate. ****************************************************************************** CODE: <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <title>Nice</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> var textFromTextArea; function getWords(){ var text =...

  • I have some code for HTML/Javascript but I need to change it up a bit. Heres...

    I have some code for HTML/Javascript but I need to change it up a bit. Heres the assignment and what I have. The part in the bold is what I need help with. I need a button called new timer for when it reaches zero... Thank you. Assignment For this assignment, you will write a timer application in HTML and JavaScript. Your HTML document should contain the following elements/features: HTML tags: An <input> tag labeled "Timer Duration" with the initial...

  • LANGUAGE JAVASCRIPT, PHP Need help with PHP and ajax code. The user needs to login but,...

    LANGUAGE JAVASCRIPT, PHP Need help with PHP and ajax code. The user needs to login but, I keep getting an error that I coded "Wrong username and password!" ***PLEASE DONT GIVE ME A NEW CODE THAT IS NOWHERE NEAR THE CODE I SUBMITTED***** PLEASE LOOK AT THE CODE AND SEE ANY ISSUES login.html <!DOCTYPE html> <html> <head> <title>login popup</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <style type="text/css"> body { background-color: white; } </style> </head> <body> <center> <h1 style="text-align: center;"> Login </h1> <form>             Login ID:...

  • I have the code buts its not working as this below instruction can anyone help Use...

    I have the code buts its not working as this below instruction can anyone help Use the requirements from the pizza part of Assignment 6 and do the following using CSS and an internal style sheet: 1.     Your Javascript function should be in an external file (don’t forget to move it up to studentweb too) 2.     Put a red border of 300px in width around the form 3.     There should be three Div sections: header, main_body, and footer. 4.     Center the name of your...

  • Hello, this is my code. moest of the things works but when select the price, i...

    Hello, this is my code. moest of the things works but when select the price, i just dont get my total. can someone help me out . thank you My queshion is also here The page will simulate the site for a Chicago-based small bus line that travels to St Louis, Milwaukee, and Detroit. Here are the requirements: The home page (i.e. the main page) should simply be the heading, image, and slogan of the site.  The home page should NOT...

  • Form Processing HTML One of the most ubiquitous uses of JavaScript is validating form data on...

    Form Processing HTML One of the most ubiquitous uses of JavaScript is validating form data on the client side before it is submitted to the server. It is done everywhere because it is fast and it gives you a great deal of flexibility in how you handle errors insofar as the GUI is concerned. Attached is an image of some code I wrote (so Blackboard can't mess it up). Some things to notice that will help you with the lab....

  • Code is in C# Your instructor would like to thank to Marty Stepp and Hélène Martin...

    Code is in C# Your instructor would like to thank to Marty Stepp and Hélène Martin at the University of Washington, Seattle, who originally wrote this assignment (for their CSE 142, in Java) This program focuses on classes and objects. Turn in two files named Birthday.cs and Date.cs. You will also need the support file Date.dll; it is contained in the starter project for this assignment. The assignment has two parts: a client program that uses Date objects, and a...

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT