Guest User

Untitled

a guest
Jul 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <form name="myform" method="post">
  2. <button onclick="Setview()">Click me</button>
  3. <input type="hidden" name="view" id="view"></input>
  4. </form>
  5.  
  6. <script type="text/javascript">
  7. function Setview()
  8.   {
  9.      oFormObject = document.forms['myform'];   
  10.      oFormObject.elements["view"].value = 'youryiew';  //change this value to view you want to rederict  
  11.      document.forms["myform"].submit();
  12.  
  13.   }
  14.    
  15. </script>
Add Comment
Please, Sign In to add comment