Bug Tracker

Ticket #4007: test_number.html

File test_number.html, 1.1 KB (added by jmtoporek, 13 years ago)

the file where I discovered this issue

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5    <title>Test Number</title>
6    <script type="text/javascript" src="validate_number.js"></script>
7    <script type="text/javascript" src="jquery.js"></script>
8    <script type="text/javascript">
9    function validate_number()
10    {
11        var phone_number = $("#phone_number").val();
12        var success = validate_phone_number(phone_number)?"valid":"invalid";
13        //$("#error_msg").empty();
14        //$("#error_msg").append("The number " + phone_number + " is " + success + "<br />");
15        $("#error_msg").replaceWith("The number " + phone_number + " is " + success + "<br />");
16    }
17    </script>
18</head>
19<body>
20    <h1>Test phone number validation</h1>
21    <div id="error_msg" name="error_msg">number validation message goes here</div><br /><br />
22    <input type="text" id="phone_number" name="phone_number" /><br /><br />
23    <input type="submit" onclick="validate_number(); return 0;" /><br />
24</body>
25</html>