Posted in General

My own Find

My own custom client side find functionality for IE.

<input type="text" id="SearchText" value="the">
<input type="button" onclick="doFind(SearchText.value, searchableText);" value="Find">
<INPUT onclick="clearFind(SearchText.value, searchableText);" type="button" value="Clear" name="ClearSearchButton">


var HIGHLIGHT_START = "";
var HIGHLIGHT_END = "";
function doFind(text, elementToSearch)
{
var re = new RegExp(text, "ig");
elementToSearch.innerHTML = elementToSearch.innerHTML.replace(re, HIGHLIGHT_START + text + HIGHLIGHT_END);
}

function clearFind(text, elementToSearch)
{
var re = new RegExp(HIGHLIGHT_START + text + HIGHLIGHT_END, "ig");
elementToSearch.innerHTML = elementToSearch.innerHTML.replace(re, text);
}

This is a working version

“;
var HIGHLIGHT_END = “”;
function doFind(text, elementToSearch)
{
var re = new RegExp(text, “ig”);
elementToSearch.innerHTML = elementToSearch.innerHTML.replace(re, HIGHLIGHT_START + text + HIGHLIGHT_END);
}

function clearFind(text, elementToSearch)
{
var re = new RegExp(HIGHLIGHT_START + text + HIGHLIGHT_END, “ig”);
elementToSearch.innerHTML = elementToSearch.innerHTML.replace(re, text);
}
//–>

Authorities have detected signs of bird flu at a farm in northern Japan and plan to kill 82,000 chickens, local officials say. The farm in Ibaraki prefecture, just north east of Tokyo, was already inside a quarantined area because of past outbreaks, Kyodo News agency reported. Kyodo said 1.5 million birds had already been culled in the area because of bird flu fears. Authorities found signs of the disease in seven farms in the area at the end of August. In today’s case, antibody tests showed the chickens may be infected with a virus from the H5 family, Ibaraki prefectural officials said in a statement. Signs of the antibodies means the chickens were infected in the past but had survived. Japanese officials said the strain involved in the recent outbreaks is less virulent that the H5N1 variety that has ravaged poultry in South-East Asia since 2003 and killed more than 60 people in Vietnam, Thailand and Cambodia. Bird flu hit Japan last year for the first time in decades, killing or prompting the extermintion of hundreds of thousands of chickens. Japan also confirmed a human case of bird flu in December 2004, but no deaths have been reported. An outbreak in June forced the culling of about 94,000 birds at another farm outside Tokyo. It was caused by the H5N2 bird flu strain, a variety not known to infect humans.

Some text
is available
in the
a Table

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s