{"id":895,"date":"2010-08-27T09:00:23","date_gmt":"2010-08-27T03:30:23","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=895"},"modified":"2010-08-27T09:00:23","modified_gmt":"2010-08-27T03:30:23","slug":"multiplepage_load","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/multiplepage_load\/","title":{"rendered":"Page loads multiple times in Rad Window"},"content":{"rendered":"<p><a title=\"Multiple page load problem\" href=\"https:\/\/jitendrazaa.com\/blog\/microsoft\/net\/page_load-firing-multiple-time-in-radwindow-popup\/\" target=\"_blank\">In Previous article, i have discussed the multiple times firing of telerik Rad Window and its solution at code side<\/a>. (C#)<\/p>\n<p>In this article i will provide solution of same problem in Javascript style. \ud83d\ude42<\/p>\n<p>How to set the problem of loading popup three time&#8230;<\/p>\n<ol>\n<li>Any page must have only one RadWindowManager, if have more than one manager then usually it sets the setting of first manager&#8230;. <strong>Ambiguity<\/strong><\/li>\n<li>ReloadOnShow must be false. Instead of this use below technique.<\/li>\n<\/ol>\n<p>Create a random javascript number and send as a URl parameter while opening from client side, in this way, it will ensure to load page with <strong>reload <\/strong>option. And therefore no need of this flag.<\/p>\n<p><!--more--><\/p>\n<p>I have found that if the Reload is turned on, it will hit the window page twice for some reason (not desired).\u00a0 If you turn the Reload off though, it will never show the updated page if you are reusing the same window.\u00a0 So far, what seems to work best is to add a random number into the url so the window does not use a cached version (see below).\u00a0 It will only hit the page once, and will also actually display the new page.<\/p>\n<p>Client side code:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ Need a random item in the querystring so the RadWindow does not pull from cache.\nvar WinId = &quot;Win&quot; + Math.random().toString();\nvar Url = &quot;query_preview.aspx?id=&quot; + elReportSavedQueryID.value + &quot;&amp;amp;wid=&quot; + WinId;\nvar oManager = GetRadWindowManager();\nvar oWnd = oManager.GetWindowByName(&quot;ExportPreviewWindow&quot;);\n  if (!oWnd){\n   alert(&quot;No window object found!&quot;);\n   return;\n  }\noWnd.SetUrl(Url);\noWnd.Show();\n<\/pre>\n<p>Window Manager in Page:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;radw:radwindowmanager id=&quot;RadWindowManager1&quot; runat=&quot;server&quot; left=&quot;&quot; navigateurl=&quot;&quot;  skinspath=&quot;~\/RadControls\/Window\/Skins&quot; title=&quot;&quot; top=&quot;&quot;&gt;\n  &lt;Windows&gt;\n  &lt;radW:RadWindow ID=&quot;ExportPreviewWindow&quot; DestroyOnClose=&quot;false&quot; Modal=&quot;true&quot;EnableViewState=&quot;False&quot;    VisibleStatusbar=&quot;true&quot; Width=&quot;600px&quot; Height=&quot;400px&quot; NavigateUrl=&quot;&quot; \/&gt;\n  &lt;\/Windows&gt;\n&lt;\/radw:radwindowmanager&gt;\n<\/pre>\n<p><a title=\"Find all Possible solutions\" href=\"http:\/\/www.telerik.com\/community\/forums\/aspnet\/window\/reloadonshow-true-makes-2-call-to-web-server.aspx\" target=\"_blank\"> Find all possible solution at this URL<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Solution of Multiple time page load problem of Telerik Rad Window.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"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,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[21],"tags":[164,193],"class_list":["post-895","post","type-post","status-publish","format-standard","hentry","category-net","tag-radwindow","tag-telerik"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":659,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/rad-tooltip-overlaps-the-target-control-solution\/","url_meta":{"origin":895,"position":0},"title":"Rad Tooltip overlaps the target control &#8211; solution","author":"Jitendra","date":"July 16, 2010","format":false,"excerpt":"Telerik Tooltip Problem - overlaps the target control in case of scrolling","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"Telerik Tooltip, Rad Control Tooltip problem","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/07\/Tooltip-Problem1-300x153.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":761,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/telerik-radwindow-pop-up-problem-in-chrome-and-safari\/","url_meta":{"origin":895,"position":1},"title":"Telerik RadWindow Pop up Problem in Chrome and safari","author":"Jitendra","date":"August 10, 2010","format":false,"excerpt":"Telerik Popup Window Height is not set in Safari and Chrome (Apple Webkit Browsers)","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":720,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/page_load-firing-multiple-time-in-radwindow-popup\/","url_meta":{"origin":895,"position":2},"title":"Clear ASP page cache &#8211; Page_Load() firing multiple time in RadWindow Popup","author":"Jitendra","date":"August 5, 2010","format":false,"excerpt":"How to prevent the multiple Page load event in case Telerik Rad Window Popup is used and Clear ASP page cache.","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":464,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/opening-radwindow-from-another-radwindow-telerik-control\/","url_meta":{"origin":895,"position":3},"title":"Opening RadWindow from another RadWindow \u2013 Telerik Control","author":"Jitendra","date":"July 1, 2010","format":false,"excerpt":"Opening RadWindow from another RadWindow: Sometime it may require opening the radwindow from another radwindow. But believe me; it will not be easy.Problems I faced were: New window opened behind the parent radwindow. New window open in area of parent window only.\u00a0So we cannot resize the window as per required.\u2026","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"Telerik Control in ASP.NET","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/07\/Telerik_Logo.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":467,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/telerik-radschedular-tips-and-tricks\/","url_meta":{"origin":895,"position":4},"title":"Telerik RadSchedular Tips and Tricks","author":"Jitendra","date":"July 1, 2010","format":false,"excerpt":"Change the style of the Today Cell in Month View and Bind Extra Column \/ Add Argument in RadSchedular","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1343,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/telerik-controls-css-lost-on-page-postback\/","url_meta":{"origin":895,"position":5},"title":"Telerik Controls &#8211; CSS Lost on Page Postback","author":"Jitendra","date":"November 9, 2010","format":false,"excerpt":"Telerik Controls - CSS Lost on Page Postback in Chrome and Mozilla firefox","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=895"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/895\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}