Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is input form appending "?" when enter key is pressed?
    primarykey
    data
    text
    <p>My site is <a href="http://bfcards.edicypages.com/" rel="nofollow">here:</a> When entering text in the search input form the page refreshes and appends "?" to the url.</p> <p>However, when the search link is pressed, everything works fine. Its really boggling my mind as to why it is appending "?" as I haven't included that code anywhere. The intended behavior is for it to click the link instead of refreshing the page.</p> <pre><code>$(document).ready(function() { $("#coolIrisSearch").keydown(function(e) { if(e.keyCode === 13) { $("#searchbutton").click(); return false; } }); doCoolIrisSearch = function() { cooliris.embed.setFeedURL( 'http%3A%2F%2Fpipes.yahooapis.com%2Fpipes%2Fpipe.run%3FSearch%3D'+encodeURIComponent($('#coolIrisSearch').val())+'%26_id%3D5f4545ce4062c36e4c5d9a8763b3167e%26_render%3Drss' ); filter(); }; }); </code></pre> <p>Ok found the answer. The form field is pretty strict. You can't remove the "submit" input field and change it into a link. Or else, the output will do what it was doing previously - appending "?" and the name attribute of the first input field. This is the correct version:</p> <pre><code> &lt;form name="searchForm"&gt; &lt;input type="text" name="coolIrisSearch" id="coolIrisSearch" onfocus="this.value=''" /&gt; &lt;input type="submit" value="search" onclick="doCoolIrisSearch();return false;" /&gt; &lt;/form&gt; </code></pre> <p>While this version will cause the url to append "?coolIrisSearch=" and reload the page.</p> <pre><code>&lt;form name="searchForm"&gt; &lt;input type="text" name="coolIrisSearch" id="coolIrisSearch" onfocus="this.value=''" /&gt; &lt;/form&gt; </code></pre> <p>Hope someone else finds this helpful.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload