I am searching how to press the Subscribe button from Youtube Subscribe Form, but I didn’t find anything that can help me… I am new in JS, so I hope that you will help me.
For pressing Subscribe button here, I use this code:
document.getElementById("subscribe-button").click();
Now my question is how to press subscribe button when this is placed in a iframe like bellow?
<html>
<body onload="">
<iframe src="http://www.youtube.com/subscribe_widget?p=aaaa" name="iframesub"
style="overflow: hidden; height: 105px; width: 300px; border: 0;"
scrolling="no" frameBorder="0">
</iframe>
</body>
</html>
Thank you in advance.
This is impossible. The Javascript safety policies do not allow crossdomain access to the document of an embedded (i)frame.