top.location.href doesn't send the full URL

top.location.href doesn't send the full URL

Hey 

I want to write a function which reads out an entered URL from a input field and sends this URL as query string to the next site.

Here is my jQuery Code:
  1. $(document).ready(function() {
  2. $("#myform").on('submit',(function() {
  3.        var url = $("#user-url").val();
  4.        url = encodeURIComponent(url);
  5.        top.location.href = "index.php?application.php&url="+url;
  6. }));
  7. });

and the HTML Part:

  1. <form form id="myform">
  2.         <input type="text" id="user-url"/>
  3.         <button type="submit" class="grey">Submit</button>
  4. </form>


The Script redirects me to the following URL: index.php?
No trace of a query string or the "application.php"-File.

I hope someone can help me 
Thanks in advance!