Note that there are some explanatory texts on larger screens.

plurals
  1. POUpdate dropdown selected value to hyphen(-) as soon as text box clicked
    primarykey
    data
    text
    <p>I have an amount dropdown, whose initial selected value is $10, and an amount textbox, project requirement is as soon as the user start typing in the textbox the dropdown value should change to "-" and as soon as again the user clicks on dropdown the value in textbox should be blank and the hyphen should be removed, please suggest how to achieve this. Below is the code(no script written so far): </p> <pre><code>&lt;div class="selectContainer ui-grid-a" id="DD2"&gt; &lt;select class="left" name="card1SelectAmount" data-mini="true" id="giftCardAmount1" style="width: 30%;padding-left: 20px" onclick="dropDownClicked()"&gt; &lt;option value="10" selected="selected"&gt;$10&lt;/option&gt; &lt;option value="15"&gt;$15&lt;/option&gt; &lt;option value="20"&gt;$20&lt;/option&gt; &lt;option value="25"&gt;$25&lt;/option&gt; &lt;option value="30"&gt;$30&lt;/option&gt; &lt;option value="35"&gt;$35&lt;/option&gt; &lt;option value="40"&gt;$40&lt;/option&gt; &lt;option value="45"&gt;$45&lt;/option&gt; &lt;option value="50"&gt;$50&lt;/option&gt; &lt;option value="75"&gt;$75&lt;/option&gt; &lt;option value="100"&gt;$100&lt;/option&gt; &lt;option value="150"&gt;$150&lt;/option&gt; &lt;option value="200"&gt;$200&lt;/option&gt; &lt;option value="250"&gt;$250&lt;/option&gt; &lt;option value="300"&gt;$300&lt;/option&gt; &lt;option value="350"&gt;$350&lt;/option&gt; &lt;option value="400"&gt;$400&lt;/option&gt; &lt;option value="450"&gt;$450&lt;/option&gt; &lt;option value="500"&gt;$500&lt;/option&gt; &lt;/select&gt; &lt;/div&gt; &lt;div class="ui-grid-b"&gt; &lt;input type="number" name="card1EnterAmount" id="giftCardAmountInput1" class="right" placeholder="OR - Enter Amount" style="width: 30%; padding-right:20px; height: 20%" onmousedown="enterAmt()"/&gt; &lt;/div&gt; </code></pre>
    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.
 

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