Created
January 4, 2013 23:30
-
-
Save SlexAxton/4458459 to your computer and use it in GitHub Desktop.
The worst JavaScript I've ever mistaken for working code.
This file contains 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 type="text/javascript"> | |
(function() { | |
("#URL").change(function() { | |
if ((this).val()) { | |
window.open((this).val()); | |
("#formElement").submit(); | |
} | |
}); | |
}); | |
</script> | |
<form id="formElement" method="get" action="#"> | |
<select name="URL" id="URL" onchange="window.location.href= this.form.URL.options[this.form.URL.selectedIndex].value"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment