Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try using jQuery, it takes a lot of the cross-browser issues out of the equation. Something like this:</p> <pre><code>&lt;select name="lstLanguage" id="lstLanguage"&gt; &lt;OPTION VALUE=""&gt;-- Generic default ---&lt;/OPTION&gt; &lt;OPTION ID="Arabic" VALUE="AR"&gt;Arabic&lt;/OPTION&gt; &lt;OPTION ID="German" VALUE="D"&gt;German&lt;/OPTION&gt; &lt;/select&gt; &lt;div id='Ind_URL'&gt;http://example.com/?Language_Code=&lt;/div&gt; &lt;div id='Ind_W_URL'&gt;http://example.com/?Language_Code=&lt;/div&gt; &lt;div id='Login_URL'&gt;http://example.com/?Language_Code=&lt;/div&gt; </code></pre> <p>With JavaScript included like this:</p> <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"&gt;&lt;/script&gt; &lt;script&gt; $(function(){ $('#lstLanguage').bind('change', function(){ langCode = $(this).find('option:selected').val(); divIDs = [ 'Ind_URL', 'Ind_W_URL', 'Login_URL' ]; for (i in divIDs) { currentDiv = $('#'+divIDs[i]); // Cache original div contents, so that the select menu can be changed more than once. if (typeof currentDiv.data('contents') == 'undefined') { divContents = currentDiv.text(); currentDiv.data('contents', divContents); } else { divContents = currentDiv.data('contents'); } currentDiv.empty().append(divContents.replace('Language_Code=','Language_Code='+langCode)); } }); }); &lt;/script&gt; </code></pre> <p>Can play around with it here: <a href="http://jsfiddle.net/sDFHg/" rel="nofollow">http://jsfiddle.net/sDFHg/</a></p> <p>Is that the sort of thing you were looking for?</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