Python Mechanize: selecting an option

May 18, 2013 in answer

0 votes, 0.00 avg. rating (0% score)

ANSWER:

This will make it that when you choose a different option in the select element, it will post back to the server with the value selected.

$(function()
    $("select").on("change", function()
        __doPostBack('D1',$(this).val())
    );
});

This will change the value of the option to 3. So that the text option2 appears.

$(function()
    $("select").val('3')
);

HennyH from http://stackoverflow.com/questions/16624945