Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

<!DOCTYPE html> <html> <head> <title> praneet.16p3.php </title> <script> functio

ID: 3822240 • Letter: #

Question

<!DOCTYPE html>

<html>

<head>

<title> praneet.16p3.php </title>

<script>

function allnumeric(inputtxt)

{

var numbers = /^[0-9]+$/;

// For count_network

if(inputtxt.count_network.value.match(numbers) inputtxt.count_memory.value.match(numbers) inputtxt.count_hdd.value.match(numbers))

{

alert('Your Registration number has accepted....');

inputtxt.count_network.focus();

return true;

}

else

{

alert('Please input numeric characters only');

inputtxt.count_memory.focus();

return false;

}

}

</script>

</head>

<body>

<form name = "myform" action="/formtest.php">

Customer name:&nbsp;&nbsp;

<input type="text" name="Customer">

<br><br>Address:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<input type="text" name="address">

<br><br>

State:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<select name="state">

<?php

$arr=array(" Georgia", "Alabama"," Florida");

for($i=0;$i<count($arr);$i++) {

echo "<option value='" . $arr[$i] ."'>" . $arr[$i] ."</option>";

}

?>

</select>

<br><br>

<p>Payment Choices</p>

<input type="radio" name="payment" value="Visa" id="VisaPayment" checked>

<label for="VisaPayment">&nbsp;&nbsp;&nbsp;&nbsp;Visa</label><br>

<input type="radio" name="payment" value="MasterCard" id="MasterCardPayment" >

<label for="MasterCardPayment">&nbsp;&nbsp;&nbsp;&nbsp;MasterCard</label><br>

<input type="radio" name="payment" value="AmericanExpress" id="AmericanExpressPayment" >

<label for="AmericanExpressPayment">&nbsp;&nbsp;&nbsp;&nbsp;AmericanExpress</label>

<br><br>

<b> Enter quantity :-</b>

<br><br>

List-Memory Upgrade :- <input type="text" name="count_memory" id = "count_memory">

<br><br>

List-HDD Upgrade :- <input type="text" name="count_hdd" id = "count_hdd">

<br><br>

List- Network Upgrade :- <input type="text" name="count_network" id = "count_network">

<br><br>

<input type="submit" name="submit" value="Submit">

</form>

</body>

</html>

when I validate,following errors occur.please fix these errors and update it

Warning: The preferred Content-Type for XHTML5 is application/xhtml+xml. The Content-Type was application/octet-stream.

Error: Unnamespaced element html not allowed in this context. (Suppressing further errors from this subtree.)

From line 1, column 16; to line 2, column 6

TYPE html><html><hea

Fatal Error: reference to undeclared general entity nbsp

At line 54, column 20

omer name:&nbsp;&

Please fix these errors and update it

Explanation / Answer

I tried from my Netbean IDE with creating a new HTML 5 Application with no site template .

After the project is created then i added yours file to my index.html file and then run the file in both chrome and IE also didn't find any error while validating the code.

<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<META CHARSET="UTF-8">
<title></title>
<script>
function allnumeric(inputtxt)
{
var numbers = /^[0-9]+$/;
// For count_network
if(inputtxt.count_network.value.match(numbers) && inputtxt.count_memory.value.match(numbers) && inputtxt.count_hdd.value.match(numbers))
{
alert('Your Registration number has accepted....');
inputtxt.count_network.focus();
return true;
}
else
{
alert('Please input numeric characters only');
inputtxt.count_memory.focus();
return false;
}
}
</script>
</head>
<body>
<form name = "myform" action="/formtest.php">
Customer name:&nbsp;&nbsp;
<input type="text" name="Customer">
<br><br>Address:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="address">
<br><br>
<p>Payment Choices</p>
<input type="radio" name="payment" value="Visa" checked>
<label for="Visa">&nbsp;&nbsp;&nbsp;&nbsp;Visa</label><br>
<input type="radio" name="payment" value="MasterCard">
<label for="MasterCard">&nbsp;&nbsp;&nbsp;&nbsp;MasterCard</label><br>
<input type="radio" name="payment" value="AmericanExpress">
<label for="AmericanExpress">&nbsp;&nbsp;&nbsp;&nbsp;AmericanExpress</label>
<br><br>
<b> Enter quantity :-</b>
<br><br>
List-Memory Upgrade :- <input type="text" name="count_memory" id = "count_memory">
<br><br>
  
List-HDD Upgrade :- <input type="text" name="count_hdd" id = "count_hdd">
<br><br>
List- Network Upgrade :- <input type="text" name="count_network" id = "count_network">
<br><br>
  
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote