Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recognizing click on a div
Message
From
14/03/2016 21:19:18
 
 
To
14/03/2016 20:56:08
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01633076
Message ID:
01633083
Views:
40
Ok, so this takes care of it:

http://jsfiddle.net/DUhP6/181

Basically, I have to go up to chain until I find a specific div I can rely on.

The click on the outside container would then be as follow:
document.getElementById('outer-container').onclick = function(e) {
loTarget=e.target
while (loTarget.parentNode)
{
   loTarget=loTarget.parentNode
   if (loTarget.id=='DivIFrame')
   {
      return false
   }
}
alert('Clicked on outside window')
}
If someone knows a better or simpler way, feel free to share.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform