Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

How to Embed Video Search in Web Application

, 23 Aug 2010 CPOL
An article on how to embed video search in web application
VideoSearchAPI.zip
How to embed video searh in web application.doc
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>My Google AJAX Search API Application</title>
    <script src="http://www.google.com/jsapi?key=ABQIAAAABE_5tJYjIxZez706qj8fKhSHXJsp5oogWH5jZodYSc2VMsh-GBTebFLwydk8evvTefXYLwNiLYMO_A" type="text/javascript"></script>
    <script language="Javascript" type="text/javascript">
   
    //<![CDATA[

    google.load('search', '1');

function OnLoad() {

  // create a search control
  var searchControl = new google.search.SearchControl();

  // So the results are expanded by default
  options = new google.search.SearcherOptions();
  options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);

  // Create a video searcher and add it to the control
  searchControl.addSearcher(new google.search.VideoSearch(), options);

  // Draw the control onto the page
  searchControl.draw(document.getElementById("searchcontrol"));

  // Search for a YouTube channel
  searchControl.execute("ytchannel:NBA");
}

google.setOnLoadCallback(OnLoad);
    //]]>
    </script>
    <style type="text/css">
    
<style type="text/css">
body
	{
		font-family:Arial Rounded MT Bold;
		background-color:Silver;
		
	}
#searchcontrol
	{
		background-color:ActiveBorder;
		width:50%;
		margin-left:auto;
		margin-right:auto;
		text-align:left;
      }

<style/>

    </style>
    


  </head>
  <body>
    <div id="searchcontrol">Loading...</div>
  </body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

NikhilJohari
Technical Writer Fast-Get
India India
Nikhil is a Microsoft MCTS and MCP.
developed many websites.
interested in web designing and modifying things with
creativity.
-Nikhil

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141030.1 | Last Updated 23 Aug 2010
Article Copyright 2010 by NikhilJohari
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid