[Javascript] getting the id of the parent tag

Sachin Zingade sachinz at dpsl.net
Sun Jul 13 23:50:58 CDT 2003


Hi,

I need to get the id of the parent tag when i select some text from that
tag.

Example:

<p id="209202920290"> This is test para This is test para This is test para
This is test para</p>

So when i select " test para " i should get "209202920290".


Next requirement is

<p id="209202920290"> This testststst <i> This is test para </i> test
para</p>

So when i select " is test para"  which is inside the italic tag , i should
get "209202920290".

If any one can reply it would be great

Sachin Z




More information about the Javascript mailing list