loading external secure website and acquiring the specific id to set the value?

I am trying to create a site where I can retrieve the id of a specific element and set it’s value. I have tried doing this:

<!DOCTYPE html>
<html>
    <head>help</head>
    <script type="text/javascript">
    function getField(){ 
        window.addEventListener('load', function(){
            console.log('hi')
            console.log(document.getElementById('change_request.short_description').value)

        });
        //document.getElementById('change_request.short_description').value='hello';             
    }   

    </script>

    <body>
        <a href="xxxx.com"  target="_blank" onclick="getField()">SNOW CHANGE</a>
              

    </body>
</html>

But my console shows nothing. I am thinking since it is a secure website, I cannot access the id.

But I don’t really know whether this is plausible. My question is how do you load the external website then acquire the specific id to set the value?

Thank you for the help.

18 thoughts on “loading external secure website and acquiring the specific id to set the value?”

Leave a Comment