Node DOM Manipulation On The Page After A POST
Can i change the webpage the user is currently at after he forms a POST request? I am using Node serverside (maybe that is relevant). The problem is that i can only do one response
Solution 1:
I finally did this. You put both pages inside the one page. The two contents go to separate divs.
Then you use something like this code:
<script>
document.querySelector('.div2').style.display = "none";
document.querySelector('form').addEventListener("submit", function(e){
document.querySelector('.div1').style.display = "none";
document.querySelector('.div2').style.display = "block";
});
</script>
Post a Comment for "Node DOM Manipulation On The Page After A POST"