lebronletchev
07-10-2007, 08:33 AM
Hi
Please I need your help for doing a function (in advance) named "OutputMe" bear in mind the same structure below.
<div id="hidnMyText" style="display: none;">If a record-breaking heat wave doesn't lift soon, cattle rancher Sharon McDonald may see her hay crop turn to dust. Oppressive temperatures eased a bit Friday in some parts of the West, but McDonald's central Montana ranch baked under triple-digit heat.</div>
<div id="mytext"><a href="#" onclick="OutputMe('if');">if </a> <a href="#" onclick="OutputMe('a');">a</a> <a href="#" onclick="OutputMe('record-breaking');">record-breaking</a> <a href="#" onclick="conc('heat');">heat</a> <a href="#" onclick="OutputMe('wave');">wave</a> <a href="#" onclick="OutputMe('doens´t');">doesn't<a/> <a href="#" onclick="OutputMe('lift');">lift<a/> <a href="#" onclick="OutputMe('soon');">soon</a> <a href="#" onclick="OutputMe('cattle');">cattle</a> <a href="#" onclick="OutputMe('rancher');">rancher</a> <a href="#" onclick="OutputMe('McDonald');">McDonald</a> <a href="#" onclick="OutputMe('central');">central</a>
<a href="#" onclick="OutputMe('Montana');">Montana<a/> <a href="#" onclick="OutputMe('ranch');">ranch<a/> <a href="#" onclick="OutputMe('baked');">baked<a/> <a href="#" onclick="OutputMe('under');">under<a/> <a href="#" onclick="OutputMe('triple-digit');">triple-digit<a/> <a href="#" onclick="OutputMe('heat');">heat<a/> </div>
<div id="results"></div>
I want output the clicked keyword + its neighbourings.
For example:
Click on "soon" and will see <a href="#" onclick="OutputMe('lift');">lift<a/> <a href="#" onclick="OutputMe('soon');">soon</a> <a href="#" onclick="OutputMe('cattle');">cattle</a>
If there is not at left or at right of the "keyword" it gives nothing.
Thank you
Lebron
Please I need your help for doing a function (in advance) named "OutputMe" bear in mind the same structure below.
<div id="hidnMyText" style="display: none;">If a record-breaking heat wave doesn't lift soon, cattle rancher Sharon McDonald may see her hay crop turn to dust. Oppressive temperatures eased a bit Friday in some parts of the West, but McDonald's central Montana ranch baked under triple-digit heat.</div>
<div id="mytext"><a href="#" onclick="OutputMe('if');">if </a> <a href="#" onclick="OutputMe('a');">a</a> <a href="#" onclick="OutputMe('record-breaking');">record-breaking</a> <a href="#" onclick="conc('heat');">heat</a> <a href="#" onclick="OutputMe('wave');">wave</a> <a href="#" onclick="OutputMe('doens´t');">doesn't<a/> <a href="#" onclick="OutputMe('lift');">lift<a/> <a href="#" onclick="OutputMe('soon');">soon</a> <a href="#" onclick="OutputMe('cattle');">cattle</a> <a href="#" onclick="OutputMe('rancher');">rancher</a> <a href="#" onclick="OutputMe('McDonald');">McDonald</a> <a href="#" onclick="OutputMe('central');">central</a>
<a href="#" onclick="OutputMe('Montana');">Montana<a/> <a href="#" onclick="OutputMe('ranch');">ranch<a/> <a href="#" onclick="OutputMe('baked');">baked<a/> <a href="#" onclick="OutputMe('under');">under<a/> <a href="#" onclick="OutputMe('triple-digit');">triple-digit<a/> <a href="#" onclick="OutputMe('heat');">heat<a/> </div>
<div id="results"></div>
I want output the clicked keyword + its neighbourings.
For example:
Click on "soon" and will see <a href="#" onclick="OutputMe('lift');">lift<a/> <a href="#" onclick="OutputMe('soon');">soon</a> <a href="#" onclick="OutputMe('cattle');">cattle</a>
If there is not at left or at right of the "keyword" it gives nothing.
Thank you
Lebron