{"id":224,"date":"2012-09-03T13:28:13","date_gmt":"2012-09-03T13:28:13","guid":{"rendered":"http:\/\/jagathm93.itechgenie.com\/?p=224"},"modified":"2012-09-03T13:28:13","modified_gmt":"2012-09-03T13:28:13","slug":"geniealert-a-customized-javascript-alert","status":"publish","type":"post","link":"https:\/\/itechgenie.com\/jagathselvan\/2012\/09\/geniealert-a-customized-javascript-alert\/","title":{"rendered":"GenieAlert-a Customized Javascript Alert Box."},"content":{"rendered":"<p>The GenieAlert provides the features to add custom buttons and functions to be called upon click of each buttons. The Title and the alert icon to be disaplyed can also be configured as per the user need.<\/p>\n<p>Note: Note the default alert box of the javascript will be completely overridden by this utility.<\/p>\n<p>DOWNLOAD:<\/p>\n<p>1. Click Here to download the GenieAlert.<\/p>\n<p>SOURCE:<\/p>\n<p>You can download the source from the following repositories.<\/p>\n<p>1.\u00c2\u00a0<a href=\"https:\/\/github.com\/prakashm88\/geniealert.git\">https:\/\/github.com\/prakashm88\/geniealert.git<\/a><\/p>\n<p>(or)<\/p>\n<p>2.\u00c2\u00a0<a href=\"http:\/\/code.google.com\/p\/geniealert\/source\/checkout\">http:\/\/code.google.com\/p\/geniealert\/source\/checkout<\/a><\/p>\n<p>USAGE:<\/p>\n<p>1. Include the geniealert.js and style.css in the header.<br \/>\n<code><br \/>\n&lt; script src=\"geniealert.0.1.js\" type=\"text\/javascript\" \/&gt;<br \/>\n&lt; link href=\"style.css\" mce_href=\"style.css\" rel=\"stylesheet\" type=\"text\/css\" \/&gt;<br \/>\n<\/code><\/p>\n<p>2. Place all the images in the \u00e2\u20ac\u0153images\u00e2\u20ac\u009d folder.<br \/>\n3. Arguments for the customized alert, Alert Message, Array of Button names, Array of function names (with the arguments if necessary), Title for the alert window, URL for the image to be show in the alert window.<br \/>\n4. On Calling the default alert(\u00e2\u20ac\u0153some text\u00e2\u20ac\u009d) the customized alert windos with default title as \u00e2\u20ac\u0153Alert!\u00e2\u20ac\u009d and an \u00e2\u20ac\u0153information\u00e2\u20ac\u009d icon will be shown.<br \/>\n5. Create a Array of Text to be shown in the Alert Box, Create Array of function names to be called when the corresponding buttons are clciked, a Title for the Alert and the URl of the image to be shown inside the alertbox. (Make sure the image is 32px X 32px).<br \/>\n6. Call the function as follows whereever ncessary.<br \/>\n<code><br \/>\n&lt; script type=\"text\/javascript\" &gt;<br \/>\nfunction YourFunctionName()<br \/>\n{<br \/>\nvar buttonList = [\"Yes\", \"No\", \"Cancel\"] ;<br \/>\nvar buttonListFunc = [\"YesFunction()\", \"NoFunction()\", \"CancelFunction()\"] ;<br \/>\nalert(\"Sample alert with default settings\") ;<br \/>\nalert(\"Click on the following buttons to call the corresponding methods.\", buttonList, buttonListFunc, \"Alert Box\", \"images\/error.png\") ;<br \/>\n}<br \/>\nfunction YesFunction() { \/\/ Your Code here }<br \/>\nfunction NoFunction() { \/\/ Your Code here }<br \/>\nfunction CancelFunction() { \/\/ Your Code here }<br \/>\n&lt; \/script&gt;<\/code><\/p>\n<p>SCREENSHOT:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/itechgenie.com\/myblog\/wp-content\/uploads\/2011\/03\/alertbox.png\" alt=\"\" width=\"415\" height=\"210\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GenieAlert provides the features to add custom buttons and functions to be called upon click of each buttons. The Title and the alert icon to be disaplyed can also be configured as per the user need. Note: Note the default alert box of the javascript will be completely overridden by this utility. DOWNLOAD: 1. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/itechgenie.com\/jagathselvan\/2012\/09\/geniealert-a-customized-javascript-alert\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;GenieAlert-a Customized Javascript Alert Box.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[24,59,60,61,62,63,64,65,85,90,125,126],"class_list":["post-224","post","type-post","status-publish","format-standard","hentry","category-utility","tag-alert-box","tag-css-alert","tag-css-alert-box","tag-custom-alert-css","tag-custom-javascript-alert-box","tag-customize-alert-box-in-javascript","tag-customized-alert-box","tag-customized-alert-window","tag-function-to-make-a-alert-box-with-an-image-styles","tag-genie-green","tag-javascript","tag-javascript-custom-alert"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2Iua7-3C","_links":{"self":[{"href":"https:\/\/itechgenie.com\/jagathselvan\/wp-json\/wp\/v2\/posts\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itechgenie.com\/jagathselvan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itechgenie.com\/jagathselvan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itechgenie.com\/jagathselvan\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/itechgenie.com\/jagathselvan\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":0,"href":"https:\/\/itechgenie.com\/jagathselvan\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"wp:attachment":[{"href":"https:\/\/itechgenie.com\/jagathselvan\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itechgenie.com\/jagathselvan\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itechgenie.com\/jagathselvan\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}