Support » Fixing WordPress » Weird Search Results URL — X & Y Coordinates!

Viewing 6 replies - 1 through 6 (of 6 total)
  • It’s due to using an image for the submission button..

    Do your form tag like so…
    <form id="exampleForm" name="exampleForm" onSubmit="this.submit();return false;">

    Changing ID and Name to the correct values etc….

    It’ll only resolve the problem under Firefox and IE though..

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Actually, just take the name and id off of the submit button. You don’t need all that extra stuff in the request, just the s parameter. Without an id or name, the submit button will still submit, but it won’t get its information sent back in the url.

    Thanks for the info
    I removed the name and id from the submit button

    But now when I click submit it goes to

    I would like for it to goto when nothing is typed in.

    Any ideas how to do this?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Well, firstly, that’s not possible. The search is going to be ?s=whatever and that’s all there is to it. You can’t make it do pretty for search. Standards issue. You might be able to do it with javascript, but it’s complex and anyway wouldn’t work without some server side code as well.

    Second, looking at the specs, I’m not sure you can get the x and y to totally go away. That’s just what an image input does.

    that’s because of using an image typed input for the form submission:

    <form ... >
      <input type="image" src="image/btn.png" ... />

    replace that image typed input with a submit typed input while you’re using CSS to set it’s background:

    <input type="submit" value=" " class="searchSubmit" ... />
    background: url(image/btn.png) center no-repeat;
    border: 0;

    Thank you for this thread!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Weird Search Results URL — X & Y Coordinates!’ is closed to new replies.