title: JavaScript iframe onmouseup triggered by highlighting
body: <p>I am playing around with events and I am trying to make an event that is triggered when text in my iframe is highlighted.  I thought I might try to use the <code>onmouseup</code> event:</p>
  <pre><code>&lt;div id=&quot;instapaper_div&quot; onmouseup=&quot;handleEvent(event)&quot;&gt;
      &lt;iframe id=&quot;instapaper&quot; src =&quot;http://www.instapaper.com/m?u=&lt;%= @content %&gt;&quot; width=&quot;90%&quot; height=&quot;90%&quot;&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  
  
  &lt;script type=&quot;text/javascript&quot;&gt;
  
      function handleEvent(oEvent) {
          alert(&quot;Event!!&quot;)
      }
  &lt;/script&gt;
  </code></pre>
  <p><em>The <code>&lt;%= @content %&gt;</code> is a properly working piece of embedded Ruby in case anyone was wondering what that was, but it's not relevant to the question here.</em></p>
  <p>If I click anywhere outside of the iframe on the web page (this div section is the entire body of my overall html file which isn't posted here),  it correctly displays the alert &quot;Event!!&quot;.  However, if I click inside the iframe, which is where I want the event to actually occur, nothing happens.  How do I get it to register this event inside the iframe?  I tried using <code>onmouseup</code> inside the iframe tag but that did not work.  Also, if <code>onmouseup</code> is not the best way to recognize a &quot;text highlighted&quot; event for the iframe which is what I want, what event should I be using and how do I use it?</p>