Modifying a third-party / external (JS) Script

1

I need to use an external script that generates a form (so far so good, it's working) ... Once the script is inserted into the page, I need the form's labels (generated by the script) to be responsive (I think a window.onresize ) ... But how do I do that, since I do not have access to the script that generates the form?

I put window.onresize on the page but it has no effect on the form.

IputanHTMLinascriptthatgeneratesaform...Theformitselfworks,butIneededtomakeitresponsive.

Icreatedascriptofwindow.onresizeandpointedthegetElementbyIdtothedividofthescriptIwanttochange,butiterror

<scripttype="text/javascript">
window.onload = function(){
    document.getElementById('hot-spot-isc-0faaa9d5ee2e31146d01').innerHTML = document.body.offsetWidth;

}
window.onresize = function(){
    document.getElementById('hot-spot-isc-0faaa9d5ee2e31146d01').innerHTML = document.body.offsetWidth;

    var bodyWidth = document.body.offsetWidth;
    if( bodyWidth>800 )
        fs = ( bodyWidth-800 )/10;
    else
        fs = 0;

    document.getElementsByTagName('h1')[0].style.fontSize = (fs+20)+'px';
    document.body.style.fontSize = (fs+12)+'px';
}
</script>
    
asked by anonymous 11.04.2017 / 22:29

0 answers