Skip to content Skip to sidebar Skip to footer

Press Youtube Subscribe Form Button Inside Of Iframe

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 pr

Solution 1:

You won't be able to manipulate the content of an external i-frame. It is called the Same Orgin Policy. You are going to need to ask the user to click on the button.

That would be a really bad practice to click on button without user's consent.

--EDIT--

If you want to subscribe the user to your channel without the user clicking on the button, read the documentation about the Youtube API on how to subscribe a user to a channel. That's your best bet.

Hope that helps.

Solution 2:

This is impossible. The Javascript safety policies do not allow crossdomain access to the document of an embedded (i)frame.

Post a Comment for "Press Youtube Subscribe Form Button Inside Of Iframe"