Question

Hi, there. A question about web development. I'm using the jquery to try the reset method...

Hi, there. A question about web development.

I'm using the jquery to try the reset method in an input form in the PHP file but it didn't work. Here is a part of my code.

<div id='signbox' class='modal-window'>

<form id= 'signF' method='post' action='centerControl.php'>

...

<input id='resetSign' type='button' value ='Reset'>;

...

</form>

</div>

<script>

$(document).ready(function(){
$("#resetSign").click(function(){
$("#signF")[0].reset()
});
});

</script>

And one more question that I'm a new player so what kind of tool I can check all my jquery PHP and HTML syntax error? Thank you.

Homework Answers

Answer #1

This code is working fine and you should check that jQuery is added in your PHP file.

It looks like jQuery is not added in the file. So the code is not running.

If not, add this script tag in your file and make sure the internet is on.

<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
</script>

To check jquey is added or not

Press right click on the browser and select inspect

then a window is open in the right side of the browser which looks like-

Select console to see the JavaScript and jQuery errors.

Select Elements to see if there is an error in HTML syntax.

PHP errors shown in the bowser screen when u refresh the page.

Know the answer?
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
Similar Questions
Part 1: Create the grid tic-tac-toe gameboard using buttons and iteration. Part 2: Human user gets...
Part 1: Create the grid tic-tac-toe gameboard using buttons and iteration. Part 2: Human user gets to select an open cell on the grid - place an X on that button selected Part 3: Check for a win using DOM iteration - new game option if row or column matching X pattern Part 4: Computer gets to select an open cell on the grid - place an O on that button selected Part 5: Check for a win using DOM...
<!doctype html> <html lang=”en”>   <head>     <title>Principal Calculation Form</title>     <meta charset="utf-8"/>         
<!doctype html> <html lang=”en”>   <head>     <title>Principal Calculation Form</title>     <meta charset="utf-8"/>                   <script src="code.js"></script>   </head>      <body onload="setFocus();">     <div class="container">                                       <div class="main">                                                                                <form action="#" method="post" name="form_name" id="form_id" class="form_class" >                                                                           <h2>--Principal Loan Form--</h2>                                                                                                                                                      <h5>Disclaimer: This software by no mean will precisely predict your mortgage through your lender company.  This Software will only assume the four items below in order to make an educated guess or prediction to your exact mortgage interests amount and the duration of your loan from your lender. <img...
This will be my third time submitting this question. THERE SHOULD BE NO USE OF CSS...
This will be my third time submitting this question. THERE SHOULD BE NO USE OF CSS OR SWITCH STATEMENTS IN THE JAVASCRIPT. Even though there is stylesheet in the HTML file do no create a new one. Project Standards: Students will use click events to capture user input. Students will use variables to store information needed by their application and keep track of their program’s state. Students will use conditionals to control project flow. Project Task You will be building...