Hi, I have a situation where we are using vanity urls, and it is causing us a bit of trouble. I've got the following code for the search
function Search(formValues,offSet)
{
existingobject = document.getElementById("output");
existingobject.innerHTML="";
queryTermInternal = document.getElementById("SearchTerm2")
if (queryTermInternal.value != "")
{
document.internalSearchForm.SearchTerm2.value = formValues.SearchTerm.value;
document.internalSearchForm.SearchDomain2.value = formValues.SearchDomain.value;
}
else
{
}
//alert("Search Term = "+formValues.SearchTerm.value+", Search Domain = "+formValues.SearchDomain.value+", Offset = "+offSet);
var requestStr = "http://api.search.live.net/json.aspx?"
// Common request fields (required)
+ "AppId=" + AppId
+ "&Query="+formValues.SearchTerm.value+"%28site%3A"+formValues.SearchDomain.value
+ "&Sources=Web"
// Common request fields (optional)
+ "&Version=2.0"
+ "&Market=en-us"
+ "&Adult=Moderate"
+ "&Options=EnableHighlighting"
// Web-specific request fields (optional)
+ "&Web.Count=10"
+ "&Web.Offset="+offSet
+ "&Web.Options=DisableHostCollapsing+DisableQueryAlterations"
// JSON-specific request fields (optional)
+ "&JsonType=callback"
+ "&JsonCallback=SearchCompleted";
var requestScript = document.createElement("script");
requestScript.type = "text/javascript";
requestScript.src = requestStr;
var head = document.getElementsByTagName("head");
head[0].appendChild(requestScript);
}
I would like to be able to exclude everything that has "EventsDetail.do" and "MakeReservation.do" , in the URL, as the "EventsDetail.do" and "MakeReservation.do" do weird cross-URL things in our situation. I am currently doing some filtering on the client side, but this results in the count being off, and some other issues. Is there a way to exclude results when requesting?