i have linkbuton in asp .net aspx page. open page using jquery ui dialog in page.
from code opens page put event handler on button in newly opened page close page.
my problem event triggers if button isn't clicked. window appears second , disappears.
here code:
if (hdnshowvote.val() == "true" && vote == null) { $("#divmodal1").dialog({ height: 500, width: 800, modal: true, hide: "fade", closeonescape: true, closetext: "", title: "vote", dialogclass: 'modalbare' }) $("#ifrvote").attr("src", "customervote.aspx"); $("#ifrvote").ready(function () { $("#ifrvote").contents().find("#btnclose_customervote").click(closevote()); alert($("#ifrvote").contents().find("body").length); }); }
any ideas why happening?
it because setting function execute on document.ready of page referred $("#ifrvote")
Comments
Post a Comment