tags:

views:

77

answers:

1

Hello All

can i detecting keyPress inside an IFRAME using jQuery? when user paste any copy text in ifram i want to check this text, Is this text contain HTML tags or not.

Please help me.

<iframe class="abc">
 <html>
  <head>
  </head>
  <body>
    some text here(This text may contain html tag)
  </body>
  </html>
</iframe>
A: 

is the iframe pointing to the same domain as your main site? if it is pointing to a domain that is not yours, then you cannot do this.

mkoryak
yes,this exist in my domain, even in my form.
Pankaj
@mkoryak: you can use a proxy when displaying another domain in an iframe to overcome the security limitations.
Luper Rouch
@Luper: but then you would need to have a proxy no? that seems a little bit extreme and fraught with problems
mkoryak
Yes, something like apache configured to proxy the distant site, on the same domain as the site hosting the iframe. It's a quite heavy solution, but sometimes you don't have choice if you want to embed another site in an iframe, and still be able to accesss it with javascript.
Luper Rouch