开发者

Focus Textfield in iframe (Tricky!)

I'd like to set focus to a textfield on my website. There are 2 problems:

  1. The textfield is located in an external page (on which i have no control over). It's embedded in my page using iframe.
  2. The textfield has a own random id generated every time the page is loaded.

This is the HTML code of the textfield which i want to focus()


<div class="UIComposer_InputShadow"><textarea placeholder="Discuss this event" onfocus="window.UIComposer &amp;&amp; UIComposer.focusInstance(&quot;c4d1cd73d90f2f8884818513&quot;);" name="status" id="c4d1cd73d90f2f8884818513_input" title="Discuss this event" class="UIComposer_TextArea     DOMControl_placeholder">Discuss this event</textarea></div>

Note that "c4d1cd73d90f2f8884818513_input" and c4d1cd73d90f2f888481851开发者_JAVA百科3 are randomly generated values.

It would be so great if anyone could help me out with this,

Thanks so much! ;)

Greetz,

Camillo


Sorry, there is no way you can do this: The Same Origin Policy prevents you from any and all access to that external iframe.


I'm guessing this is for a Facebook plugin. Even if you could do this, I doubt Facebook wants you manipulating elements within their plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜