PDA

View Full Version : Really urgent! Number of word Occurences


csam0003
05-20-2009, 03:42 PM
Hi,

Can someone please tell me how I can get the PREVIOUS number of occurences of a text selected in the webpage.I am using Firefox and window.find() method doesnt seem the right approach,as it scrolls the page.

For example:

The dog and the cat and the house and the mouse.

If I select "the" (in Bold), it should return the value 2!

Kind regards

Chris

A1ien51
05-20-2009, 09:41 PM
How many places have you posted this?

Must of been really urgent.

Sounds like you need to play with textContent and a reg exp.

Eric