Handle undefined URL values correctly.

This commit is contained in:
Joel Martin 2010-04-10 15:52:08 -04:00
parent 4b835baeb9
commit 85b7a7d411
1 changed files with 3 additions and 5 deletions

View File

@ -32,11 +32,9 @@
<script> <script>
window.onload = function() { window.onload = function() {
var uri = new URI(window.location); var uri = new URI(window.location);
$('host').value = uri.getData("host"); $('host').value = uri.getData("host") || '';
$('port').value = uri.getData("port"); $('port').value = uri.getData("port") || '';
if (uri.getData("password")) { $('password').value = uri.getData("password") || '';
$('password').value = uri.getData("password");
}
} }
</script> </script>