fork download
  1.  
  2. <!DOCTYPE HTML>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title>Untitled Document</title>
  7. <script src="http://c...content-available-to-author-only...y.com/jquery-latest.min.js"
  8. type="text/javascript"></script>
  9.  
  10. </head>
  11.  
  12. <body>
  13. <script>
  14. addToDatabase = function() {
  15. alert("addToDatabase called");
  16. $.post("generatingxpath.php", {
  17. websource: $('#websource').val(),
  18. links: $('#links').val(),
  19. title: $('#title').val(),
  20. image: $('#image').val(),
  21. discount: $('#discount').val(),
  22. price: $('#price').val(),
  23. description: $('#description').val(),
  24. coordinates: $('#coordinates').val()
  25. }, function(data) {
  26. $("#result").html(data);
  27. });
  28. };
  29. </script>
  30. <form name="form1" method="post" action="generatingxpath.php">
  31.  
  32. <p>
  33. <label for="websource"></label>
  34. Web source:
  35. <input name="websource" type="text" id="websource" size="70">
  36. is:</p>
  37. <p>
  38.  
  39. <label for="links"></label>
  40. Links:
  41. <input name="links" type="text" id="links" size="77">
  42. OK!
  43. </p>
  44. <p>
  45.  
  46. <label for="title"></label>
  47. Title:
  48. <input name="title" type="text" id="title" size="78">
  49. is:</p>
  50. <p>
  51.  
  52. <label for="image"></label>
  53. Image:
  54. <input name="image" type="text" id="image" size="76">
  55. show:</p>
  56. <p>
  57.  
  58. <label for="discount"></label>
  59. Disscount:
  60. <input name="discount" type="text" id="discount" size="72">
  61. is:</p>
  62. <p>
  63.  
  64. <label for="price"></label>
  65. Price:
  66. <input name="price" type="text" id="price" size="77">
  67. is:</p>
  68. <p>
  69.  
  70. <label for="description"></label>
  71. Desription:
  72. <input name="description" type="text" id="description" size="72">
  73. is:</p>
  74. <p>
  75.  
  76. <label for="coordinates"></label>
  77. Coordinates:
  78. <input name="coordinates" type="text" id="coordinates" size="70">
  79. lat,lng is:</p>
  80. <p>
  81. <input type="submit" name="Submit" id="Submit" value="Preview">
  82. or
  83. <input type="submit" name="Add to database" id="Add to database" value="Add To Database">
  84. <a href="javascript:addToDatabase();">Add to database</a>
  85. </p>
  86. <p>&nbsp;</p>
  87. </form>
  88. <div id="result"></div>
  89. </body>
  90. </html>
Success #stdin #stdout 0.03s 13064KB
stdin
Standard input is empty
stdout
<!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>&nbsp;</p>
</form>
    <div id="result"></div>
</body>
</html>