Using simple html and javascript how can I have one html form that asks two questions:

  • Text OppID
  • Dropdown LegalEntity

LegalEntity will have available company1 & company2

When company1 is selected the URL executed is xxx.company1.com?ToppID=(the value of OppID text field)

When company2 is selected the URL executed is xxx.company2.com?ToppID=(the value of OppID text field)


you could try using a table. I hope you understand what i'm trying to say. Sorry for my english.

below is a form in a table with dropdown.

    <table class="dropDownList" style="width:100%">
                    <select name="dropDownOptions" id="feedback_dropdown" style="width:150px;">
                        <option value="Option2">Company1</option>
                        <option value="Option1">Company2</option>

        var el_option = document.getElementById("dropDownList");
        el_option.addEventListener("change", function() {

                if (this.selectedIndex == 1){
                    //event change link 
                } else {
                    //event change link 

        }, false);

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.