{"id":115,"date":"2016-04-22T23:27:51","date_gmt":"2016-04-22T23:27:51","guid":{"rendered":"https:\/\/itgroove.net\/bangimportant\/?p=115"},"modified":"2023-02-24T21:39:35","modified_gmt":"2023-02-24T21:39:35","slug":"dynamically-resize-sharepoint-modal-dialogs","status":"publish","type":"post","link":"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/","title":{"rendered":"Dynamically Resize SharePoint Modal Dialogs"},"content":{"rendered":"<p>My colleague <a href=\"https:\/\/mccalec.itgroove.net\">Alec<\/a> and I ran into an issue today where SharePoint was having difficulty rendering modal dialogs at the correct size. The dialogs were too small for the content they contained, and therefore some undesired scroll bars appeared. Nobody wants that!<\/p>\n<p>Thanks to <a href=\"http:\/\/chadschroeder.blogspot.ca\/2012\/10\/sharepoint-2010-easy-dynamic-resize-of.html\">Chad Schroeder&#8217;s post<\/a> for a nifty little fix:<\/p>\n\n\n<pre class=\"wp-block-code\"><code>function resizeDLG() {\nvar dlg = SP.UI.ModalDialog.get_childDialog();\nif (dlg != null) {\ndlg.autoSize();\n}\n}\nsetTimeout(resizeDLG, 500);<\/code><\/pre>\n\n\n\n<p>Add that to your Master Page and tweak as necessary for your purposes, and when SharePoint loads a page as a dialog it should size itself properly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My colleague Alec and I ran into an issue today where SharePoint was having difficulty rendering modal dialogs at the correct size. The dialogs were too small for the content they contained, and therefore some undesired scroll bars appeared. Nobody wants that! Thanks to Chad Schroeder&#8217;s post for a nifty little fix: Add that to &hellip; <a href=\"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/\"><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[4,7,8,9,10],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Dynamically Resize SharePoint Modal Dialogs - Archive<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dynamically Resize SharePoint Modal Dialogs - Archive\" \/>\n<meta property=\"og:description\" content=\"My colleague Alec and I ran into an issue today where SharePoint was having difficulty rendering modal dialogs at the correct size. The dialogs were too small for the content they contained, and therefore some undesired scroll bars appeared. Nobody wants that! Thanks to Chad Schroeder&#8217;s post for a nifty little fix: Add that to &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/\" \/>\n<meta property=\"og:site_name\" content=\"Archive\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-22T23:27:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-24T21:39:35+00:00\" \/>\n<meta name=\"author\" content=\"Matt Lonpre (Alumni)\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matt Lonpre (Alumni)\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/\",\"url\":\"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/\",\"name\":\"Dynamically Resize SharePoint Modal Dialogs - Archive\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/archive\/#website\"},\"datePublished\":\"2016-04-22T23:27:51+00:00\",\"dateModified\":\"2023-02-24T21:39:35+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/archive\/#\/schema\/person\/0deb86ff016aebc76f86a79a0e7236d0\"},\"breadcrumb\":{\"@id\":\"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog Archive\",\"item\":\"https:\/\/regroove.ca\/archive\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dynamically Resize SharePoint Modal Dialogs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/archive\/#website\",\"url\":\"https:\/\/regroove.ca\/archive\/\",\"name\":\"Archive\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/archive\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/archive\/#\/schema\/person\/0deb86ff016aebc76f86a79a0e7236d0\",\"name\":\"Matt Lonpre (Alumni)\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/archive\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f084e0ef8fd6992834b5b085b737a7a2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f084e0ef8fd6992834b5b085b737a7a2?s=96&d=mm&r=g\",\"caption\":\"Matt Lonpre (Alumni)\"},\"url\":\"https:\/\/regroove.ca\/archive\/author\/mlongpre\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dynamically Resize SharePoint Modal Dialogs - Archive","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/","og_locale":"en_US","og_type":"article","og_title":"Dynamically Resize SharePoint Modal Dialogs - Archive","og_description":"My colleague Alec and I ran into an issue today where SharePoint was having difficulty rendering modal dialogs at the correct size. The dialogs were too small for the content they contained, and therefore some undesired scroll bars appeared. Nobody wants that! Thanks to Chad Schroeder&#8217;s post for a nifty little fix: Add that to &hellip;","og_url":"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/","og_site_name":"Archive","article_published_time":"2016-04-22T23:27:51+00:00","article_modified_time":"2023-02-24T21:39:35+00:00","author":"Matt Lonpre (Alumni)","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Matt Lonpre (Alumni)"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/","url":"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/","name":"Dynamically Resize SharePoint Modal Dialogs - Archive","isPartOf":{"@id":"https:\/\/regroove.ca\/archive\/#website"},"datePublished":"2016-04-22T23:27:51+00:00","dateModified":"2023-02-24T21:39:35+00:00","author":{"@id":"https:\/\/regroove.ca\/archive\/#\/schema\/person\/0deb86ff016aebc76f86a79a0e7236d0"},"breadcrumb":{"@id":"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/regroove.ca\/archive\/2016\/04\/22\/dynamically-resize-sharepoint-modal-dialogs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Archive","item":"https:\/\/regroove.ca\/archive\/"},{"@type":"ListItem","position":2,"name":"Dynamically Resize SharePoint Modal Dialogs"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/archive\/#website","url":"https:\/\/regroove.ca\/archive\/","name":"Archive","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/archive\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/archive\/#\/schema\/person\/0deb86ff016aebc76f86a79a0e7236d0","name":"Matt Lonpre (Alumni)","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/archive\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f084e0ef8fd6992834b5b085b737a7a2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f084e0ef8fd6992834b5b085b737a7a2?s=96&d=mm&r=g","caption":"Matt Lonpre (Alumni)"},"url":"https:\/\/regroove.ca\/archive\/author\/mlongpre\/"}]}},"_links":{"self":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts\/115"}],"collection":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/comments?post=115"}],"version-history":[{"count":5,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":204,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts\/115\/revisions\/204"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/media?parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/categories?post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/tags?post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}