<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <script src="http://c...content-available-to-author-only...y.com/jquery-latest.min.js" type="text/javascript"></script> </head> <body> <script> addToDatabase = function() { alert("addToDatabase called"); $.post("generatingxpath.php", { websource: $('#websource').val(), links: $('#links').val(), title: $('#title').val(), image: $('#image').val(), discount: $('#discount').val(), price: $('#price').val(), description: $('#description').val(), coordinates: $('#coordinates').val() }, function(data) { $("#result").html(data); }); }; </script> <form name="form1" method="post" action="generatingxpath.php"> <p> <label for="websource"></label> Web source: <input name="websource" type="text" id="websource" size="70"> is:</p> <p> <label for="links"></label> Links: <input name="links" type="text" id="links" size="77"> OK! </p> <p> <label for="title"></label> Title: <input name="title" type="text" id="title" size="78"> is:</p> <p> <label for="image"></label> Image: <input name="image" type="text" id="image" size="76"> show:</p> <p> <label for="discount"></label> Disscount: <input name="discount" type="text" id="discount" size="72"> is:</p> <p> <label for="price"></label> Price: <input name="price" type="text" id="price" size="77"> is:</p> <p> <label for="description"></label> Desription: <input name="description" type="text" id="description" size="72"> is:</p> <p> <label for="coordinates"></label> Coordinates: <input name="coordinates" type="text" id="coordinates" size="70"> lat,lng is:</p> <p> <input type="submit" name="Submit" id="Submit" value="Preview"> or <input type="submit" name="Add to database" id="Add to database" value="Add To Database"> <a href="javascript:addToDatabase();">Add to database</a> </p> <p> </p> </form> <div id="result"></div> </body> </html>
Standard input is empty
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="http://c...content-available-to-author-only...y.com/jquery-latest.min.js"
type="text/javascript"></script>
</head>
<body>
<script>
addToDatabase = function() {
alert("addToDatabase called");
$.post("generatingxpath.php", {
websource: $('#websource').val(),
links: $('#links').val(),
title: $('#title').val(),
image: $('#image').val(),
discount: $('#discount').val(),
price: $('#price').val(),
description: $('#description').val(),
coordinates: $('#coordinates').val()
}, function(data) {
$("#result").html(data);
});
};
</script>
<form name="form1" method="post" action="generatingxpath.php">
<p>
<label for="websource"></label>
Web source:
<input name="websource" type="text" id="websource" size="70">
is:</p>
<p>
<label for="links"></label>
Links:
<input name="links" type="text" id="links" size="77">
OK!
</p>
<p>
<label for="title"></label>
Title:
<input name="title" type="text" id="title" size="78">
is:</p>
<p>
<label for="image"></label>
Image:
<input name="image" type="text" id="image" size="76">
show:</p>
<p>
<label for="discount"></label>
Disscount:
<input name="discount" type="text" id="discount" size="72">
is:</p>
<p>
<label for="price"></label>
Price:
<input name="price" type="text" id="price" size="77">
is:</p>
<p>
<label for="description"></label>
Desription:
<input name="description" type="text" id="description" size="72">
is:</p>
<p>
<label for="coordinates"></label>
Coordinates:
<input name="coordinates" type="text" id="coordinates" size="70">
lat,lng is:</p>
<p>
<input type="submit" name="Submit" id="Submit" value="Preview">
or
<input type="submit" name="Add to database" id="Add to database" value="Add To Database">
<a href="javascript:addToDatabase();">Add to database</a>
</p>
<p> </p>
</form>
<div id="result"></div>
</body>
</html>