0

I have a simple function in the HTML inside of my iframe, also I use a button that executes the function onclick. What I would like to do is have the button on the parent page and work the same way.

    function saveEdits(){
        var editElem1 = document.getElementById("edit1");
        var userVersion1 = editElem1.innerHTML;
            localStorage.userEdits1 = userVersion1;

    <input type="button" value="Save Changes" onclick="saveEdits()"/></br>

What Would I do to put the button on the parent page and have it call the function in the iframe?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.