C
c.anandkumar
Hi All -
I am trying to do the following,
1. Get a piece of HTML from a db
2. Display it on my page
with a requirement - clicking on any links in that HTML should not take
me away from the page.
This does not only include links which are formed by <a>nchor tags, but
also other ways of doing it, like,
<span onClick='location.href="http://someurl"'> Blah blah..
</span>
In other words, all the events that can be raised by this piece of html
should be blocked.
Setting all the 'onClick's and 'href's to "#" or blank string is
probably a good idea to start with, but the list of all such possible
causes for an event to be raised, may not be very straightforward to
compile.
I was wondering if there could be any way to nullify/block the events
that can be raised by such a piece of HTML.
Thanks for your input
- Anand
I am trying to do the following,
1. Get a piece of HTML from a db
2. Display it on my page
with a requirement - clicking on any links in that HTML should not take
me away from the page.
This does not only include links which are formed by <a>nchor tags, but
also other ways of doing it, like,
<span onClick='location.href="http://someurl"'> Blah blah..
</span>
In other words, all the events that can be raised by this piece of html
should be blocked.
Setting all the 'onClick's and 'href's to "#" or blank string is
probably a good idea to start with, but the list of all such possible
causes for an event to be raised, may not be very straightforward to
compile.
I was wondering if there could be any way to nullify/block the events
that can be raised by such a piece of HTML.
Thanks for your input
- Anand