Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Are you sure it gets the same ID? Because it shouldn't.</p> <p>Why don't you update it to </p> <pre><code>javascript:openPopUp(this); </code></pre> <p>or add from code-behind:</p> <pre><code>RadComboBox1.OnClientSelectedIndexChanged = "openPopUp('" + RadComboBox1.ClientID + "')"; </code></pre> <p>This means that openPopUp will always have the correct reference to you current combo box (first example) or combo box id (second example).</p> <p>LATER EDIT:</p> <p>I've just made some tests.</p> <p>First, I created a user control with the following code:</p> <pre><code>Options here: &lt;asp:DropDownList runat="server" ID="ddlOptions"&gt; &lt;asp:ListItem Text="option 1"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="option 2"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="option 3"&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;a href="javascript:linkit('&lt;%=ddlOptions.ClientID%&gt;')"&gt;Link here&lt;/a&gt; </code></pre> <p>Then I created a page with:</p> <pre><code> &lt;uc1:test runat="server" ID="test1" /&gt;&lt;br /&gt; &lt;uc1:test runat="server" ID="test2" /&gt; &lt;script language="javascript" type="text/javascript"&gt; function linkit(id) { alert(document.getElementById(id).value); } &lt;/script&gt; </code></pre> <p>Where uc1:test is the control described earlier.</p> <p>If I select different options on the dropdown list and click the link, I get the correct selected options (different for each link).</p> <p>Isn't this the same problem you are having?</p>
 

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