Skip to content

Instantly share code, notes, and snippets.

@igoralves1
Last active December 2, 2016 19:48
Show Gist options
  • Save igoralves1/01453854dcaa61db595a45100d5d659d to your computer and use it in GitHub Desktop.
Save igoralves1/01453854dcaa61db595a45100d5d659d to your computer and use it in GitHub Desktop.
JS - Redirect to a page, when change values in drop-down list, select
<script>
$(function(){
$(document).on("change", "#spa_list", function(){
var spaID = $(this).val();
//alert(spaID);
window.location = "history.php?var1=3&spaIDjS="+spaID;
}); //End of $(document).on("change", ...
});//End of $(function(){
</script>
<script>
$(function(){
$("#btn_send").on("click", function(e){
e.preventDefault();
$('form').attr('action','myPage.php');
});
});//End of $(function(){
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment