title: javascript object HTMLIFrameElement error
body: <p>i am trying to get the selected value from the iframe.</p>
  
  <p>Here i have a i frame,in that i am entering the text.</p>
  
  <p>When i select a part of text from iframe and click button that calls java script function,
  i am getting the error in alert </p>
  
  <pre><code>[object HTMLIFrameElement]
  </code></pre>
  
  <p>how can i solve this?</p>
  
  <p>JavaScript Function Code:</p>
  
  <pre><code>function popup(obj, code){
  alert(obj);
  alert(code);
  wrapText(obj, '&lt;+code+&gt;', '&lt;/+code+&gt;');
  }
  </code></pre>