I am displaying 3 iframes in a single page, I want to make my page such that if click a button in the 1st iframe the page changes in the 2nd iframe, and if I click the button in 2nd iframe the page changes in the 3rd iframe and vice-versa. Can anybody help me to accomplish it or give a hint how to do so? As of now I have created a separated page for which have iframe code for all the 3 frames. Below is the example
            Asked
            
        
        
            Active
            
        
            Viewed 335 times
        
    0
            
            
        - 
                    Are all websites under the same domain? – kalucki23 Jun 19 '22 at 11:59
- 
                    I am trying to make resume/portfolio website, it isn't hosted yet – Ansh Tyagi Jun 19 '22 at 12:01
- 
                    Anyways, this should help you https://stackoverflow.com/questions/9153445/how-to-communicate-between-iframe-and-the-parent-site – kalucki23 Jun 19 '22 at 12:02
1 Answers
0
            
            
        Well this can only be achieved using JavaScript. In this case I assume you are using plain HTML,CSS and vanilla JavaScript, DOM manipulation is the best way to do so. For better understanding you can share the code. Thankyou.
 
    
    
        Basit Mir
        
- 97
- 5
- 
                    yup, i am using plain HTML, CSS, isn't there any easy way to do so, here is link to my website code (https://drive.google.com/drive/folders/1zFHYewaa8MdVgQQO5vS_703uKITbqqSr?usp=sharing) – Ansh Tyagi Jun 19 '22 at 12:06
- 
                    Well its not that difficult but you need JavaScript. I saw your code. using JavaScript you can to change the value"src" attribute in the iframe tag to your desired page (e.g page.html) by making a click event on any item in another iframe. – Basit Mir Jun 19 '22 at 12:37
- 
                    As of now I am not certain about what exactly you want things to happen in your website but from what I understand using javaScript is only way in my opinion. – Basit Mir Jun 19 '22 at 12:39
 
    