It changes src in iframe



  • function closeMusic() {
                        var music = window.parent.document.getElementById("music");
                        music.style.display = "none";
                        var content = window.top.document.getElementById("content");
                        content.src = "../../bands/rrr/rrr.php";
                        }
    
    
    
    <form class="delButton" id="delAlbButton" method="post" action="../../../../scripts/php/deletealbum.php">
                            <input type="hidden" value="'.$BN.'" id="BNforDel" name="BN"/>
                            <input type="hidden" value="'.$AN.'" id="ANforDel" name="AN"/>
                            <input type="submit" onClick="closeMusic();" value="DEL">
    </form>
    

    Crypt to remove the page

    and js f-y, which suddenly iframe uploads the page

    gives Failed to load resource: the server responded with a http://localhost/bands/rrr/rrr.php status of 404 (Not Found)

    The path is clearly indicated.

    Even though it's right and different

    the right. http://localhost/NetFM/bands/rrr/rrr.php

    Please help me. What's the problem?



  • For onClick="closeMusic();" Use it. onsubmit

    var form = document.getElementById('delAlbButton');
    

    form.onsubmit = function(){
    closeMusic();
    }

    Use absolute path (absolute path) for URL.

    content.src = "http://localhost/NetFM/bands/rrr/rrr.php";




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2