HTML and JQuery for a SharePoint Search Input and Button
No comments
April 17th, 2012
Here is s little code adapted from a number of examples on-line and added to SharePoint using the Page viewer webpart. I would prefer a homepage with this, and just this, but I think I’ll add some code to keep and display a users favourite pages and display in order… We’ll see if I get to do this and will post the code if I do.
<!DOCTYPE html>
<html>
<head>
<link href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css” rel=”stylesheet” type=”text/css”/>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js”></script>
<script src=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js”></script>
<script>
$(document).ready
(function()
{
$(“button”).button();
}
);
</script>
</head>
<body style=”font-size:62.5%;”>
<form method=”get” action=”http://MYSPSITE.com/Search/Pages/Results.aspx” target=”_parent”>
<P align=center><input name=”k” type=”text” size=”55″/> </p><P align=center><button type=”submit” value=”Search”>SharePoint Search</button></p>
</form>
</body>
</html>