Note that there are some explanatory texts on larger screens.

plurals
  1. POSet radio button value by manipulating URL
    primarykey
    data
    text
    <p>I'm sure all of you manipulated parameterized URLs to change how a particular website (that you didn't create) looks. For instance, you want to see more than the maximum number of results on a page, so you do something like:</p> <pre><code>http://www.example.com/search.jsp?results=1000 </code></pre> <p>Or to jump quickly to the 1500th result:</p> <pre><code>http://www.example.com/search.jsp?startat=1500&amp;results=50 </code></pre> <p>So with that in mind, I am trying to create a link to some search results of a webpage, but I need to set the value of a radio button to get the results I am looking for. I found the field names by using Chrome Developer Tools because the parameters do not show in the URL, even though I can search by manipulating the URL using the fields I found. So far I have:</p> <pre><code>http://www.example.com/blah/search.jsp?vstr4=A123456789 </code></pre> <p>where <code>vstr4</code> is the text field to search within. But there is also a radio button, <code>vint2</code>. In the HTML,</p> <pre><code>&lt;input type=​"radio" name=​"vint2" value=​"0" checked &gt;​ "Type 1" &lt;input type=​"radio" name=​"vint2" value=​"1"&gt;​ "Type 2" </code></pre> <p>In this case, <code>Type 1</code> is default, but I need the radio button set to <code>Type 2</code> to get what I am looking for. So my question is, <strong>how can I set the radio button at index 1's checked property?</strong> I've tried stuff like:</p> <pre><code>http://www.example.com/blah/search.jsp?vstr4=A123456789&amp;vint2=1 </code></pre> <p>and</p> <pre><code>http://www.example.com/blah/search.jsp?vstr4=A123456789&amp;vint2[1]checked="checked" </code></pre> <p>and similar. I'm not sure how to access the properties of a particular index of a radio button. Thanks.</p>
    singulars
    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.
    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