Witam. Chciałem napisać program ,który po kliknięciu "submit" pobiera z pliku txt tekst i wyświetla go w oknie diva. Za pomoca XML napisałem to , lecz teraz muszę ajaxem. Używam do tego biblioteki SACK exclamation.gif Musze jej użyć - proszę o pomoc

  1. <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  2.  
  3. <title> [Strona </title>
  4. <style type="text/css">
  5. body
  6. {
  7. background-color: orange;
  8. }
  9. </style>
  10. <script type="text/javascript" src="tw-sack.js"></script>
  11. <script type="text/javascript">
  12. var ajax = new sack();
  13.  
  14. function doit(){
  15. var form = document.getElementbyId('form');
  16. ajax.method = POST;
  17. ajax.requestFile = "index3.php";
  18. ajax.element='div1';
  19. ajax.runAJAX();
  20. }
  21. </head>
  22. <form action="index3.php" method="POST" id="form">
  23. <input type="submit" value="Pokaz" onclick="doit();return false;" onDblClick="doit(); return false;"/>
  24. </form>
  25. <div id="div1" style="background-color: silver;
  26. border: 2px solid green;
  27. width: 300px;
  28. height: 300px;
  29. color: white;
  30. margin: 10px;
  31. overflow: auto">
  32.  
  33. </div>
  34. </body>
  35. </html>