I get the data from the json file from my localhost but the var html only returns the data in html when i call alert throughout the the loops and it only works in Firefox.
My Questions
1.How do i take out alert in my javascript to where the function still returns var html
2.What can i use besides alert to show my data from my json file
3.Why isn't my code running on all internet platforms
function myFunction()
{
var html=new String();
    $.getJSON('GroupID.json',function(data)
    {
        var h=new String();
        for(var i=0;i<data.length;i++)
        {
            h+='<div class="data">';
            h+=data[i]['group_option'].OptionsID+'<br>';
            h+=data[i]['group_option'].MenuGroupID+'<br>';
            h+=data[i]['group_option'].group_options_name+'<br>';
            for(var iter = 0; iter < data[i]['group_option']['option_items'].length; iter++)
            {
                h+=data[i]['group_option']['option_items'][iter]['item'].OptionItemID+'<br>';
                h+=data[i]['group_option']['option_items'][iter]['item'].option_name+'<br>';
                h+='<br><br><br>';
            }   
            h += '</div>';
        }
        alert("h");
        alert(h);   
        alert("html equals ");
        html=h; 
        alert(html);
    });
alert("returning html");
alert(html);
return html;
}
 
    