My Documents are a mixture of XML and HTML Tags. where HTML tags are pulled from xhtml namespace and mine are from various namspaces.
I wanna take user interaction events from XML Nodes of my Document.
I First tried <do:landingTime xhtml:onclick="fnc">20:48:29.45</do:landingTime>
with no Luck. But <xhtml:span onclick="fnc">
works.
So is there any solution/tricks/hacks/backdoor to take events from my xml Nodes.
views:
58answers:
1
+2
A:
You need to add the click events using Javascript and accept answers to your questions.
SLaks
2010-06-06 17:32:56
Can you give a bit more explanation ??
2010-06-06 18:25:49
You can use Javascript to attach event handlers by calling `attachEvent` / `addEventListener`. The simplest way to do this is using [jQuery](http://jquery.com).
SLaks
2010-06-06 19:09:46
But jQuery doesn't seem to work if I pull html tags from xhtml namespace
2010-06-07 10:21:28
You need to escape the `:`, like this: `$('ns\\:tag')`
SLaks
2010-06-07 22:13:33