views:

14

answers:

0

This is my first question, i'll try to be as clear as possible. I'm building a personal site using different APIs hosted on google code:

Google Search ---> user search for random info

Google Map ---> will be used to locate the user

Jquery -----> simple javascript interaction

Jquery UI ----> using the tabs module for the page's main menu

i'm having an issue loading all these APIs in the same page, it seems that when i load, only one at a time can function.

Here's parts of the code:


google.load('search', '1');
google.load("jquery", "1");
google.load("jqueryui", "1");

function OnLoad(){
    //create new search control object
    var searchControl = new google.search.SearchControl();

    //add various searchers
searchControl.addSearcher(new google.search.LocalSearch());
searchControl.addSearcher(new google.search.WebSearch());
searchControl.addSearcher(new google.search.VideoSearch());
searchControl.addSearcher(new google.search.ImageSearch());
searchControl.draw(document.getElementById("search_control"));
}
function Tabulation(){
$(function() {
        $("#tabs").tabs();
    });
}
google.setOnLoadCallback(OnLoad, true);
google.setOnLoadCallback(Tabulation);

  function initialize() {
    var latlng = new google.maps.LatLng("","");
    var myOptions = {
      zoom: 6,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);

  }  



$(function tabulation() {
    $("#tabs").tabs();
});





`

i think my problem is with the "google.setOnLoadCallBack()", and the tag "-body onLoad="initialize(); tabulation();"- " i'll be honest, i'm not sure if i should seperate each API script in a section or do it all in one. for now, when i use this code, only google maps load, and the Jquery/jquery UI does. not the google search.

If any one can point me to my mistakes it would be very appreciated.

thanks!

Ps: i had a bit of issues with copuy/pasting my code, i can rearrange depending on the need for more info. thanks!