jquery jump menu strips out everything after "?" -


I have a simple jump menu that I have found. It worked great until I wanted to go to it on a page "?" In the URL, this "?" After everything strips out so why when i mywordpresspage /? If I try to go to Id = 1, the jump menu takes me to mywordpresspage /.

I do not know a lot about jquery ... I mostly work with php.

Here is the code:

  & lt; Script type = "text / javascript" charset = "utf-8" & gt; $ (Document) .ready (function () {$ ('site_quick_jump'). Change (function () {if ($ (this) .val ()! = '') {$ ('# Site_quick_jump_form'). Attr 'Action', $ (this) .val ()); // $ ('# site_quick_jump_form'). Submit (); // Go!}});}); // Doctor Prepared & lt; / Script & gt; & Lt; Form id = "site_quick_jump_form" method = "get" action = "" & gt; Browse Survey: & amp; Nbsp; & Lt; Select class = "site_quick_jump" & gt; & Lt; Options & gt; & Lt; / Options & gt; & Lt; Option value = "mywordpresspage /? Id = 1" & gt; My WordPress Page 1 & lt; / Option & gt; & Lt; Option value = "mywordpresspage /? Id = 2" & gt; My WordPress Page 2 & lt; / Option & gt; & Lt; Option value = "mywordpresspage /? Id = 3" & gt; My WordPress Page 3 & lt; / Option & gt; & Lt; / Select & gt; & Lt; / Form & gt;    

OK, this requires quick explanation of the parameters on the web. When you make a request, you can send the parameter in two ways:

  1. Receive: Sent as part of the parameter url ("example.com/?foo=bar")
  2. Post: Parameter "Behind the Scenes" ("example.com", {foo: bar})

    When you submit a request (I.e. when you are submitting anything $ ('# site_quick_jump_form'). Submit () ) as the parameter in the URL after "?".

    * * Edit * *

    A The potential solution is to switch to POST :) Since that seemed to work for that OP, I will not tell other options in length, but you may also have:

    • Your PHP code Just look at all the parameters and reassemble them in the URL
    • Separate your JS code from the query string (window.lation.search) and send it as a separate field < Is / ul>

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -