{"id":9088,"date":"2014-08-28T05:08:55","date_gmt":"2014-08-27T19:08:55","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9088"},"modified":"2014-08-28T05:08:55","modified_gmt":"2014-08-27T19:08:55","slug":"jquery-ui-modal-dialog-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/jquery-ui-modal-dialog-primer-tutorial\/","title":{"rendered":"jQuery UI Modal Dialog Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/Modal\/\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"jQuery UI Modal Dialog Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/Modal\/ModalDialog.jpg\" title=\"jQuery UI Modal Dialog Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">jQuery UI Modal Dialog Primer Tutorial<\/p><\/div>\n<p>A lot of the things people like about the Web are to do with JavaScript and client-side activities.   Adding to that experience are Javascript libraries packed full of features.    Probably the best known of these is jQuery.<\/p>\n<p>Read more about the powerful jQuery Javascript library <a target=_blank title='jQuery spiritual home' href='http:\/\/jquery.com\/'>here<\/a> (at its spiritual home) and <a target=_blank title='jQuery information' href='http:\/\/en.wikipedia.org\/wiki\/jQuery'>here<\/a> (at Wikipedia) &#8230; and in the previous relevant <a target=_blank href='#judpt' title='jQuery UI Dialog Primer Tutorial'>jQuery UI Dialog Primer Tutorial<\/a> as shown below, which simulated the alert, confirm and prompt Javascript windows using jQuery functionality.<\/p>\n<p>Today we have a modal dialog box which is movable, and this is a step up from the alert Javascript box, which can sometimes &#8220;get in the way&#8221; of something you want to see below.   With this jQuery solution you get the best of both worlds, if you do not want to move on without getting an &#8220;answer&#8221; from the user, but also want the user to be able to see what is shown below, that, maybe, they will be able to reach if they &#8220;answer&#8221;.   Have put the word answer in double quotes, because, today&#8217;s modal dialog box is most like the Javascript alert box, where, to answer, you can only press the &#8220;OK&#8221; button.<\/p>\n<p>Click <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/Modal\/'>on picture above<\/a> to go to jQuery page for a (live run) tutorial on a UI feature of jQuery called Modal Dialog.<\/p>\n<p>Link to today&#8217;s HTML\/Javascript\/jQuery downloadable code you could call <a target=_blank title='jQuery information' href='http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/Modal\/modal_dialog.html_GETME' title='modal_dialog.html'>modal_dialog.html<\/a>.<\/p>\n<p>Link to jQuery information <a target=_blank title='jQuery information' href='http:\/\/en.wikipedia.org\/wiki\/jQuery'> &#8230; via Wikipedia, from where quote above is derived<\/a>.<br \/>\nLink to jQuery spiritual home page  <a target=_blank title='jQuery spiritual home' href='http:\/\/jquery.com\/'> &#8230; via jQuery Foundation<\/a>.<br \/>\nLink to jQuery download page  &#8230; <a target=_blank title='Download' href='http:\/\/jqueryui.com\/download\/'>download jQuery UI code used, here<\/a>.<\/p>\n<p>Regarding this topic I really like <em>&#8220;JavaScript &amp; Ajax&#8221; seventh edition by Tom Negrino and Dori Smith<\/em> pages 432 and 433. The code in this book was followed closely, with small amendments.<\/p>\n<hr \/>\n<p id='judpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=1127' title='jQuery UI Dialog Primer Tutorial'>jQuery UI Dialog Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"jQuery UI Dialog Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/jQuery_Dialog-1of.jpg\" title=\"jQuery UI Dialog Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">jQuery UI Dialog Primer Tutorial<\/p><\/div>\n<p>A lot of the things people like about the Web are to do with JavaScript and client-side activities.   Adding to that experience are Javascript libraries packed full of features.    Probably the best known of these is jQuery.<\/p>\n<blockquote><p>jQuery is a multi-browser JavaScript library designed to simplify the client-side scripting of HTML.[4] It was released in January 2006 at BarCamp NYC by John Resig. It is currently developed by a team of developers led by Dave Methvin. Used by over 55% of the 10,000 most visited websites, jQuery is the most popular JavaScript library in use today.[5][6]<\/p>\n<p>jQuery is free, open source software, licensed under the MIT License.[7] jQuery&#8217;s syntax is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plug-ins on top of the JavaScript library. This enables developers to create abstractions for low-level interaction and animation, advanced effects and high-level, theme-able widgets. The modular approach to the jQuery library allows the creation of powerful dynamic web pages and web applications.\n<\/p><\/blockquote>\n<p>Click <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/'>on picture above<\/a> to go to jQuery page for a tutorial on a UI feature of jQuery called Dialog.<\/p>\n<p>Link to jQuery information <a target=_blank title='jQuery information' href='http:\/\/en.wikipedia.org\/wiki\/jQuery'> &#8230; via Wikipedia, from where quote above is derived<\/a>.<br \/>\nLink to jQuery spiritual home page  <a target=_blank title='jQuery spiritual home' href='http:\/\/jquery.com\/'> &#8230; via jQuery Foundation<\/a>.<br \/>\nLink to jQuery download page  &#8230; <a target=_blank title='Download' href='http:\/\/jquery.com\/download\/?rdfrom=http%3A%2F%2Fdocs.jquery.com%2Fmw%2Findex.php%3Ftitle%3DDownloading_jQuery%26redirect%3Dno'>download jQuery here<\/a>.<br \/>\nLink to jQuery UI Dialog page  &#8230; <a target=_blank title='jQuery UI Dialog' href='http:\/\/jqueryui.com\/dialog\/'>jQuery UI Dialog<\/a> (one of many jQuery UI ideas).<\/p>\n<p><button onmouseover='xb1 = document.getElementById(\"b1\"); xb1.innerHTML = \"&lt;iframe width=500 height=300 src=http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/mydialog.html&gt;&lt;\/iframe&gt;\";' style=\"background-color: red;\" target=_blank href='http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/mydialog.html' onclick='window.open(\"http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/mydialog.html\");'>Basic dialog<\/button><\/p>\n<div id='b1'><\/div>\n<p><button onmouseover='xb1 = document.getElementById(\"b2\"); xb1.innerHTML = \"&lt;iframe width=500 height=300 src=http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/myconfirmdialog.html&gt;&lt;\/iframe&gt;\";'  style=\"background-color: yellow;\" target=_blank href='http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/myconfirmdialog.html' onclick='window.open(\"http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/myconfirmdialog.html\");'>Confirm dialog<\/button><\/p>\n<div id='b2'><\/div>\n<p><button onmouseover='xb1 = document.getElementById(\"b3\"); xb1.innerHTML = \"&lt;iframe width=500 height=300 src=http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/mydialogform.html&gt;&lt;\/iframe&gt;\";'  style=\"background-color: green;\" target=_blank href='http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/mydialogform.html' onclick='window.open(\"http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/mydialogform.html\");'>Dialog Form<\/button><\/p>\n<div id='b3'><\/div>\n<p><a target=_blank style=\"background-color: red;\" href='http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/mydialog.html_GETME'>Download source code and rename to mydialog.html<\/a> and <br \/><a target=_blank style=\"background-color: yellow;\" href='http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/myconfirmdialog.html_GETME'>Download programming source code and rename to myconfirmdialog.html<\/a> and <br \/><a target=_blank style=\"background-color: green;\" href='http:\/\/www.rjmprogramming.com.au\/Javascript\/jQuery\/Dialog\/mydialogform.html_GETME'>Download source code and rename to mydialogform.html<\/a><\/p>\n<p><\/p>\n<p><strong><em>Did you know &#8230;<\/em><\/strong><br \/>\nJavaScript makes a great easy-access Calculator?<\/p>\n<p>Try typing the lines below into the address bar of your favourite browser:<\/p>\n<p>Javascript: eval(512 \/ 380);<br \/>\nJavascript: eval(512 * 380);<br \/>\nJavascript: eval(512 &#8211; 380);<br \/>\nJavascript: eval(512 + 380);<br \/>\nJavascript: eval(512 % 380);<\/p>\n<p>These days we spend so much time on the Internet it is a much quicker way to get to a calculator!\n<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d1127' onclick='var dv=document.getElementById(\"d1127\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=Javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d1127' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d9088' onclick='var dv=document.getElementById(\"d9088\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=jQuery\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d9088' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A lot of the things people like about the Web are to do with JavaScript and client-side activities. Adding to that experience are Javascript libraries packed full of features. Probably the best known of these is jQuery. Read more about &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/jquery-ui-modal-dialog-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,17,37],"tags":[549,652,663,997,1319],"class_list":["post-9088","post","type-post","status-publish","format-standard","hentry","category-elearning","category-gui","category-tutorials","tag-gui","tag-javascript","tag-jquery","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/9088"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=9088"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/9088\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=9088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=9088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=9088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}