Last active
December 2, 2016 19:48
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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