I have a dropdown outside the iframe
<select id="ModuleDropDown">
<option>Hello world</option>
</select>
and I have an iframe like this
<iframe id="EditorFrame" src="UploadTemplates.aspx" frameborder="0" style="height: 900px;
width: 1000px" scrolling="auto"></iframe>
the code of UploadTemplate.aspx is:
<asp:Button ID="UploadButton" runat="server" Text="Upload"" />
so now my question is that how can I get the value of dropdown in iframe using jQuery I tried this but it doesn't help me
$("#UploadButton").click(function () {
alert($("#ModuleDropDown").val());
});
but when I click the button I got undefined
instead of value of dropdown please help me