Syntax working on desktop but not android
-
This is probably not related to WP but I am using WP so I thought I would ask anyway.
Let us say I want to resize an iframe, the normal syntax that works on a desktop does not work on an android tablet.
I am probably missing something stupid, but if anyone could shed some light I would greatly appreciate it.Here is a simple example that illustrates the issue.
The script below placed in a page displays a youtube video and a button to resize it. On my desktop it works fine, but on my android tablet, clicking the button does not do anything.
Is there a different syntax I need to use to change the iframe size with the button?<script type=”text/javascript”>
function refreshSize()
{
document.getElementById(‘myvideo’).width= 100;
document.getElementById(‘myvideo’).height = 100;
}
</script>
<input type=”button” value=”Resize!” onclick=”refreshSize();” />
<iframe id=”myvideo” src=”http://www.youtube.com/embed/Vem_BfEgeUw” height=”250″ width=”500″ >
</iframe>Thank you for any feedback
The topic ‘Syntax working on desktop but not android’ is closed to new replies.