Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Dialogbox div render twice when page loads
posted

Hi, My codes are as below in as mvc view.

<input type="button" name="btnOpen" id="btnOpen" value="Open Dialog" />
<%= Html.Infragistics()
.Dialog()
.ContentID("divDialog")
.State(DialogState.Closed)
.Modal(true)
.Height("740px")
.Width("1040px")
.CloseOnEscape(true)
.Resizable(false)
.Draggable(false)
.Render() %>


<div id="divJobs">
   <script>
     alert('test');
     </script>
</div>

When page is load it fires two times.

Is that bug? Does anyone have idea about this?

Thanx

Dharmendra

Parents
No Data
Reply
  • 60
    Suggested Answer
    posted

    Finally I ended up to not to go with igDialog instead I used jquery dialogbox.

    I found that jquery dialogbox is having same issue but there is  a solution. On button click I have removed the script tag by finding it from dialogbox before opening it and everything works well.

    $("#btnOpen").click(function () {

             $("#DivPickInstr").find("script").remove(); //Did the trick hope this help some one :)
             $("#DivPickInstr").dialog({
                   model: true,
                   height: 650,
                   width: 950,
                   resizable: false,
             });

    });

    Thank you,
    Dharmendra Mistry

Children
No Data