ShWolf Posted June 23, 2012 Report Share Posted June 23, 2012 How can I redirect user to the selected value in the dropdown right away after selection? PlurnlopsBurn 1 Quote Link to comment Share on other sites More sharing options...
ShWolf Posted December 6, 2013 Author Report Share Posted December 6, 2013 Insert code into the footer of the DataPage <script type="text/javascript"> v_a = document.getElementById('YOURFIELDID'); if (v_a){ v_a.onchange = function(){ v_a = document.getElementById('YOURFIELDID'); document.location = v_a.options[v_a.options.selectedIndex].value; } } </script> And replace YOURFIELDID with correct dropdown field id. So if you insert this JS in to the Footer of your DataPage and select some value in the dropdown (YOURFIELDID should be replaced with dropdown id), you will be redirected to the selected value (correct URLs should be used as dropdown values). NOTE: This JS doesn't work in the DataPage Preview and iFrame deployment because of iFrame security Quote Link to comment Share on other sites More sharing options...
MayMusic Posted December 6, 2013 Report Share Posted December 6, 2013 Thank you ShWolf! Quote Link to comment Share on other sites More sharing options...
eetimm Posted January 24, 2014 Report Share Posted January 24, 2014 I have a details datapage with a dropdown to select a single customer, and also have a multi-select listbox to choose a range of similar customers for comparison (the customers are sorted in ascending order by revenue). I would like to have my listbox set the focus on the customer selected in the dropdown, so the user will not need to scroll through the entire list. I saw this JS and tried messing with it to see if it could be modified to set the focus when selecting the dropdown, but it does not work that way. Can this even be done in JS or should I just figure out another way? Thanks in advance. ET Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.