Creating Modal Dialog Using Jquery

Well few days ago I came across a requirement where on button click user should be asked for confirmation about the action in a modal window. Well we don't have such component in Visualforce!. But hey! Wait! I guess the jquery has it! Why dont we use that one ?

So started mixing Visualforce with Jquery and Result? A modal dialog box!


Well Don get scared its very easy to implement!

Just go to apex/showDialog page for demo and press the showDialog button.

To summarize you can just open a modal window by just calling the openDialog method included in the showDialog page,make sure that you include necessary files while you implement the same in your VF page.

Exp : openDialog('This is a custom dialog','Alert')" ;
Where the first argument is the dialog body and the second is the Dialog title.

9 comments:

  1. By reading this article, many things have piled up in my mind which made me to think about it.
    SAP training in Mumbai
    SAP course in Mumbai

    ReplyDelete
  2. This was among the best posts and episode from your team it let me learn many new things. data scientist course in mysore

    ReplyDelete
  3. Really an awesome blog and informative content. Keep sharing more content with us. Thanks for sharing with us.
    Data Science Training Institute in Hyderabad

    ReplyDelete
  4. Two full thumbs up for this magneficent article of yours. I've really enjoyed reading this article today and I think this might be one of the best article that I've read yet. Please, keep this work going on in the same quality.data science training in rohtak

    ReplyDelete