Website Search Engine Counter

Cancelled Posted Nov 7, 2012 Paid on delivery
Cancelled Paid on delivery

A website I am constructing with the help of 3rd party software calls a specific function 'DisplaySearch()' function in [url removed, login to view] every time a search is made on website. I would like to be able to capture calls i.e search requests made to that function and record all them to a file displaying date/time and search query made. This script be able to record multiple users querying the website at once. Once that is done I require a separate html page that displays the bar graph nothing fancy which queries the file that was generated by the script and displays all search queries and the amount times each search term was used. Date range should be able to configured by the user.

Below is copy of the function.

Code should be well commented and error handling should be included as well.

Bidding price is flexible to a marginal degree.

Thank you.

## Deliverables

function DisplaySearch(searchtext, condition, filter) {

//if the mode is 'no-contents' and we are in live mode, then display the contents window and hide the page window

// if ([url removed, login to view]("imgedit") == null && [url removed, login to view]("divcontents").offsetWidth == 0)

// {

// [url removed, login to view]("tdcontentswrapper").[url removed, login to view] = "table-cell"

// [url removed, login to view]("tdcontentswrapper").[url removed, login to view] = "250px"

// //[url removed, login to view]("tdpagewrapper").[url removed, login to view] = "70%"

// }

// //If the contents window is visible then show the search window

// alert("divcontents width = " + [url removed, login to view]("divcontents").offsetWidth)

// if ([url removed, login to view]("divcontents").offsetWidth != 0)

// {

//Show the search results window with the loading animation

[url removed, login to view]("divsearchresults").[url removed, login to view] = "url(../_engine/images/[url removed, login to view])";

[url removed, login to view]("divsearchresults").[url removed, login to view] = "no-repeat";

[url removed, login to view]("divsearchresults").[url removed, login to view] = "center center"

//hide Contents

[url removed, login to view]("divcontents").[url removed, login to view] = "none";

//hide properties window

[url removed, login to view]("divproperties").[url removed, login to view] = "none";

//[url removed, login to view]("TreeView1").style.height="100%";

//hide index

[url removed, login to view]("divindex").[url removed, login to view] = "none";

[url removed, login to view]("divindex").innerHTML = "";

//show the search results window

[url removed, login to view]("divsearchresults").[url removed, login to view] = "";

//Set the height of the search results window so that the scrollbars will work

//[url removed, login to view]("divsearchresults").style.height=[url removed, login to view]("divcontents").[url removed, login to view];

[url removed, login to view]("divsearchresults").[url removed, login to view] = "100%";

//Change the contents heading (if the control exists)

if ([url removed, login to view]("tdcontentslabel") != null) {

[url removed, login to view]("tdcontentslabel").[url removed, login to view] = "none";

[url removed, login to view]("tdindexlabel").[url removed, login to view] = "none";

[url removed, login to view]("tdsearchresultslabel").[url removed, login to view] = "";

}

//hide the contents controls

if ([url removed, login to view]("tdcontentscontrols") != null) {

[url removed, login to view]("tdcontentscontrols").[url removed, login to view] = "none";

}

//Show the close icon

if ([url removed, login to view]("tdCloseContentsWindow") != null) {

[url removed, login to view]("tdCloseContentsWindow").[url removed, login to view] = "";

if ([url removed, login to view]("tdeditcontents") != null) { [url removed, login to view]("tdeditcontents").[url removed, login to view] = "none" }

}

if ([url removed, login to view]("txtAdvancedSearch") != null) {

[url removed, login to view]("txtAdvancedSearch").focus();

}

// }

// //if the condition was specified, then set it now

// if ([url removed, login to view]("lstSearchCondition") != null && condition != "") {

// [url removed, login to view]("lstSearchCondition").value = condition;

// }

//Get search results index using AJAX

var http = false;

var reqstring = "action=search";

reqstring = reqstring + "&searchtext=" + searchtext;

reqstring = reqstring + "&projectname=" + GetProjectName();

//Search Filter

if ([url removed, login to view]("lstSearchFilter") != null) {

reqstring = reqstring + "&searchfilter=" + [url removed, login to view]("lstSearchFilter").value

}

else if (filter != "" && filter != null) {

reqstring = reqstring + "&searchfilter=" + filter

}

//Search Condition

if ([url removed, login to view]("lstSearchCondition") != null) {

reqstring = reqstring + "&searchcondition=" + [url removed, login to view]("lstSearchCondition").value

}

else if (condition != "" && filter != null) {

reqstring = reqstring + "&searchcondition=" + condition

}

reqstring = reqstring + "&username=" + [url removed, login to view]("txtactiveusername").value;

reqstring = reqstring + "&password=" + [url removed, login to view]("txtactivepassword").value;

if ([url removed, login to view] == "Microsoft Internet Explorer") { http = new ActiveXObject("[url removed, login to view]"); } else { http = new XMLHttpRequest(); }

[url removed, login to view] = function() {

if ([url removed, login to view] == 4) {

if ([url removed, login to view] == 200) {

//alert("tdcontents width = " + [url removed, login to view]("tdcontents").offsetWidth);

if ([url removed, login to view]("tdcontents").offsetWidth == 0) {

//If the contents window is hidden then load search results into page window

[url removed, login to view]("divpage").innerHTML = [url removed, login to view];

}

else {

//If the contents window is visible then load search results into the contents window

[url removed, login to view]("divsearchresults").innerHTML = [url removed, login to view];

}

//hide the progress bar

[url removed, login to view]("divsearchresults").[url removed, login to view] = "";

}

else {

alert("Error: " + [url removed, login to view] + [url removed, login to view]);

}

}

}

[url removed, login to view]("POST", "../_engine/[url removed, login to view]", true);

[url removed, login to view]("Content-Type", "application/x-www-form-urlencoded");

[url removed, login to view](reqstring);

ASP JavaScript PHP XML

Project ID: #2789856

About the project

Remote project Active Nov 7, 2012