Javascript Function using DOM Range

I need a Javascript function to be written. Given a div with some html content and a double-click event from a user, the function needs to return the following:

* the word that was double-clicked upon

* the start offset of the word from the beginning of the div (meaning the number of characters of text between the beginning of the div and the beginning of the word).

* the top, left, and height of the selected word, in pixels.

Note that these requirements are trickier than they might sound at first. For example, if the div contains the html "create a <i>super</i>conductor for the experiment" and the user double-clicks on the word "superconductor", then the word will span across multiple nodes. The function must work equally well on Mozilla and IE6/7. Note that in Mozilla, there is no easy way to obtain the offsetTop and offsetLeft of a Range. If you resort to inserting an element to determine these, your code must also remove the element, leaving all document nodes to form the same exact graph they initially had.

You must fulfill the requirements exactly. If there is some edge case that your code does not cover, then it is not really a solution. I would suggest that you not accept the task unless you are *really* familiar with the DOM implementations in FF and IE. The code must also be well-designed, meaning (for example) it can't be sloppy and method bodies must be under 100 lines.

Beceriler: Javascript

Daha fazlasını gör: top graph, number function, graph using c, graph top, graph nodes, graph edge, function number, first graph, example of a requirements document, edge graph, rangeoffsetleft javascript, function range javascript, javascript divcontains function, remove node domrange, dom range, javascript range function, dom range find, dom word clicked upon, range startoffset ie6, using dom range, content meaning, span, resort, mozilla, Implementations

İşveren Hakkında:
( 1 değerlendirme ) Chicago, United States

Proje NO: #199105

Bu iş için 4 freelancer ortalamada $205 teklif veriyor


PLS see the PMB...

in %bids___i_period_sub_35% gün içinde170%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(2 Değerlendirme)

plz chekc pmb

in %bids___i_period_sub_35% gün içinde300%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

Dear poster, I can help you. Please see my private message. Thanks.

in %bids___i_period_sub_35% gün içinde150%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

Dear sir,we are interested in your project and we have just gone through your requirements carefully, we certainly can help to fullfill your [url removed, login to view] are a high-tech conpany with abundant experience and excellent progr Daha Fazla

in %bids___i_period_sub_35% gün içinde200%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)