We Recommend

HTML: The Definitive Guide HTML: The Definitive Guide
They teach you that learning HTML is like learning any other language and that reading a book of rules can only take you so far. Readers begin writing what may be their first Web page just two pages into the book's second chapter. From there on, they provide a wide range of HTML coding to allow readers to learn from good examples. The book includes a handy "cheat sheet" of HTML codes for quick reference.


Posted By

1man on 03/14/07


Tagged

form ajax simple yahoo json


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

d4rk


Pull in News from Yahoo API Using JSON HTML


Published in: HTML 


The simple form that calls the searchYahoo function.

  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  5. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  6. <meta name="keywords" content="" />
  7. <meta name="description" content="" />
  8. <title>Javascript Testing</title>
  9.  
  10. <!-- CSS Links -->
  11. <link rel="stylesheet" href="css/ajax.css" type="text/css" media="screen" />
  12.  
  13. <!-- Scripts Here -->
  14. <script src="js/global.js" type="text/javascript"></script>
  15. <script src="js/yahoo.js" type="text/javascript"></script>
  16.  
  17. </head>
  18. <h1>Yahoo Search</h1>
  19. <form onsubmit="searchYahoo(this.query.value); return false" action="">
  20. <label for="">Search For</label>
  21. <input type="text" name="query" id="query" />
  22. <input type="submit" value="Search" />
  23. </fieldset>
  24. </form>
  25. <div id="results"></div>
  26. </body>
  27. </html>

Report this snippet 

You need to login to post a comment.