Simplified cross-domain JavaScript
Function Hotsearch (INDEX)
{
If (Window. XMLHttpRequest)
{ // Code for IE7 +, Firefox, chrome, opera, Safari
XMLHTTP = New XMLHttpRequest ();
// Sortname = encodeuri (sortname );
}
Else
{ // Code for IE6, ie5
XMLHTTP = New Activexobject ( " Microsoft. XMLHTTP " );
// Sortname = encodeuri (sortname );
}
// Q = encodeuri (type );
Gscriptobj = Document. createelement ( " Script " );
Gscriptobj. setattribute ( " Type " , " Text/JavaScript " );
Gscriptobj. setattribute ( " Charset " , " UTF-8 " );
// If (Index = 1)
// {
Gscriptobj. setattribute ( " SRC " , Index );//Index is the URL to be accessed by Ajax.
Headobj = Document. getelementsbytagname ( " Head " ). Item ( 0 );
Headobj. appendchild (gscriptobj );
Headobj = Document. getelementsbytagname ("head"). Item (0); headobj. appendchild (gscriptobj );
}
End