
Oleh : Abah Razi
بسم الله الرحمن الرحيم
Salah satu tips untuk menampilkan dialog yang berisi URL luar dengan jQuery UI adalah dengan menggunakan iframe seperti tampak pada contoh kode berikut ini :
1 2 3 4 | < button id = "dialog_trigger" >Open</ button > < div id = "dialog" style = "display:none;" title = "Dialog Title" > < iframe frameborder = "0" scrolling = "no" width = "100%" height = "100%" src = "http://google.about.com/" ></ iframe ></ div > |
Kode jQuerynya akan tampak seperti berikut
01 02 03 04 05 06 07 08 09 10 11 12 13 14 | $( "#dialog_trigger" ).click( function () { $( "#dialog" ).dialog( "open" ); }); $( "#dialog" ).dialog({ overflow: 'auto' , autoOpen: false , position: 'center' , title: 'test' , draggable: true , width : 500, height : 400, resizable : true , modal : false , }); |
Leave a Reply