Has anyone got any idea how this google code works?
i got the following:
<!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=blahblahblah" type="text/javascript"></script>
<script language="Javascript" type="text/javascript">
google.load("jquery", "1");
google.load("jqueryui", "1");
</script>
</head>
<body>
<div class="ui-state-highlight">
hello world
</div>
</body>
</html>
However the <div></div> should display the error box with hello world. but it doesn’t show the red background therefor the ui is not working …
What have i done wrong here?
You also need the stylesheet if you want styling, like this:
This is the base (grey) theme, there are others (be sure too update the version number!)
Unless you need
google.loadfor other things, you can include the scripts directly, it’s worth looking at this question for the advantages/disadvantages to usinggoogle.load().Loading them directly would look like this: