<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Closing and redirecting a modal in ArcGIS Hub Questions</title>
    <link>https://community.esri.com/t5/arcgis-hub-questions/closing-and-redirecting-a-modal/m-p/1162636#M5169</link>
    <description>&lt;P&gt;Is it possible to create a button at the end of a modal that closes it, but also redirects the user to a different page? Basically the modal has a disclaimer, where at the end the user has to "Agree" with the terms, which should close the modal, but also open up a different page.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Edit: this code should work in Bootstrap 4, unfortunately I couldn't find a Bootstrap 3 version.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;a&lt;/SPAN&gt; &lt;SPAN class=""&gt;href&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"link"&lt;/SPAN&gt; &lt;SPAN class=""&gt;class&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"btn btn-primary"&lt;/SPAN&gt; &lt;SPAN class=""&gt;target&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"_blank"&lt;/SPAN&gt; &lt;SPAN class=""&gt;data-dismiss&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"modal"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;I Agree&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;a&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Apr 2022 17:08:04 GMT</pubDate>
    <dc:creator>AJ_devaccount</dc:creator>
    <dc:date>2022-04-12T17:08:04Z</dc:date>
    <item>
      <title>Closing and redirecting a modal</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/closing-and-redirecting-a-modal/m-p/1162636#M5169</link>
      <description>&lt;P&gt;Is it possible to create a button at the end of a modal that closes it, but also redirects the user to a different page? Basically the modal has a disclaimer, where at the end the user has to "Agree" with the terms, which should close the modal, but also open up a different page.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Edit: this code should work in Bootstrap 4, unfortunately I couldn't find a Bootstrap 3 version.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;a&lt;/SPAN&gt; &lt;SPAN class=""&gt;href&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"link"&lt;/SPAN&gt; &lt;SPAN class=""&gt;class&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"btn btn-primary"&lt;/SPAN&gt; &lt;SPAN class=""&gt;target&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"_blank"&lt;/SPAN&gt; &lt;SPAN class=""&gt;data-dismiss&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"modal"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;I Agree&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;a&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 17:08:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/closing-and-redirecting-a-modal/m-p/1162636#M5169</guid>
      <dc:creator>AJ_devaccount</dc:creator>
      <dc:date>2022-04-12T17:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Closing and redirecting a modal</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/closing-and-redirecting-a-modal/m-p/1166088#M5189</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/522809"&gt;@AJ_devaccount&lt;/a&gt;&amp;nbsp;- not at this time, please log an ENH request with support or post to ArcGIS Ideas. This way the community will be able to follow/upvote your request.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 13:36:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/closing-and-redirecting-a-modal/m-p/1166088#M5189</guid>
      <dc:creator>BrianRollison</dc:creator>
      <dc:date>2022-04-20T13:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Closing and redirecting a modal</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/closing-and-redirecting-a-modal/m-p/1313013#M5795</link>
      <description>&lt;P&gt;Try this on Bootstrap 3 ..&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!-- Modal content --&amp;gt;
&amp;lt;div class="modal" id="myModal"&amp;gt;
  &amp;lt;div class="modal-dialog"&amp;gt;
    &amp;lt;div class="modal-content"&amp;gt;
      &amp;lt;!-- Modal body --&amp;gt;
      &amp;lt;div class="modal-body"&amp;gt;
        &amp;lt;!-- Disclaimer content goes here --&amp;gt;
      &amp;lt;/div&amp;gt;
      
      &amp;lt;!-- Modal footer --&amp;gt;
      &amp;lt;div class="modal-footer"&amp;gt;
        &amp;lt;button type="button" class="btn btn-default" data-dismiss="modal"&amp;gt;Close&amp;lt;/button&amp;gt;
        &amp;lt;a href="link" class="btn btn-primary" id="agreeButton"&amp;gt;I Agree&amp;lt;/a&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;!-- Button to trigger the modal --&amp;gt;
&amp;lt;button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal"&amp;gt;Open Modal&amp;lt;/button&amp;gt;

&amp;lt;!-- JavaScript to handle the "I Agree" button click --&amp;gt;
&amp;lt;script&amp;gt;
document.getElementById('agreeButton').addEventListener('click', function() {
  // Redirect the user to the specified link
  window.location.href = 'link';
});
&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 28 Jul 2023 11:06:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/closing-and-redirecting-a-modal/m-p/1313013#M5795</guid>
      <dc:creator>nehakakar</dc:creator>
      <dc:date>2023-07-28T11:06:32Z</dc:date>
    </item>
  </channel>
</rss>

