<?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 Re: How do I import an external script in advanced xml? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-import-an-external-script-in-advanced-xml/m-p/158753#M9780</link>
    <description>&lt;P&gt;Thanks, but I don't have access to add to the /appserver/static directory. Maybe I'm overthinking this. I'm trying to use bootstrap modal and it works in simple xml. I just can't get it to work using advanced xml. I was thinking that maybe it was because the calling of the modal.js script. That's my best guess. &lt;BR /&gt;
&lt;A href="http://blogs.splunk.com/2014/02/24/using-bootstrap-modal-with-splunk-simple-xml/"&gt;http://blogs.splunk.com/2014/02/24/using-bootstrap-modal-with-splunk-simple-xml/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Feb 2015 21:43:44 GMT</pubDate>
    <dc:creator>dlee360</dc:creator>
    <dc:date>2015-02-26T21:43:44Z</dc:date>
    <item>
      <title>How do I import an external script in advanced xml?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-import-an-external-script-in-advanced-xml/m-p/158751#M9778</link>
      <description>&lt;P&gt;I know in simple xml, you can add a script="xx.js" in the dashboard tag, but how do I add an external script in advanced xml?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2015 15:15:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-import-an-external-script-in-advanced-xml/m-p/158751#M9778</guid>
      <dc:creator>dlee360</dc:creator>
      <dc:date>2015-02-24T15:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import an external script in advanced xml?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-import-an-external-script-in-advanced-xml/m-p/158752#M9779</link>
      <description>&lt;P&gt;Inside application.js....  (&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Module/Simplecustomizations"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.1/Module/Simplecustomizations&lt;/A&gt;)&lt;BR /&gt;
After checking your current view name... you can do it using jquery &lt;BR /&gt;
 &lt;STRONG&gt;Below code is to include a css file&lt;/STRONG&gt; &lt;BR /&gt;
        &lt;EM&gt;(You can place your js file into ../appserver/static of your application)&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; switch (Splunk.util.getCurrentView()) {
       case "simple_alert_list_new":
             jQuery("&amp;lt;link rel=\"stylesheet\" type=\"text/css\" href=\"/static/css/bootstrap.min.css\"/&amp;gt;").appendTo("head");
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Feb 2015 11:38:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-import-an-external-script-in-advanced-xml/m-p/158752#M9779</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-02-26T11:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import an external script in advanced xml?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-import-an-external-script-in-advanced-xml/m-p/158753#M9780</link>
      <description>&lt;P&gt;Thanks, but I don't have access to add to the /appserver/static directory. Maybe I'm overthinking this. I'm trying to use bootstrap modal and it works in simple xml. I just can't get it to work using advanced xml. I was thinking that maybe it was because the calling of the modal.js script. That's my best guess. &lt;BR /&gt;
&lt;A href="http://blogs.splunk.com/2014/02/24/using-bootstrap-modal-with-splunk-simple-xml/"&gt;http://blogs.splunk.com/2014/02/24/using-bootstrap-modal-with-splunk-simple-xml/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2015 21:43:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-import-an-external-script-in-advanced-xml/m-p/158753#M9780</guid>
      <dc:creator>dlee360</dc:creator>
      <dc:date>2015-02-26T21:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import an external script in advanced xml?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-import-an-external-script-in-advanced-xml/m-p/158754#M9781</link>
      <description>&lt;P&gt;If you don't have rights to  create appserver/static directory.. you can use the bootstrap.js available inside splunk.. All the resources present inside "exposed" (&lt;EM&gt;ie, C:\Program Files\Splunk\share\splunk\search_mrsparkle\exposed&lt;/EM&gt;) &lt;BR /&gt;
are exposed in splunk as static resouces...&lt;BR /&gt;
Url Patter to refer this is :&lt;BR /&gt;
          &lt;A href="http://localhost:8000/en-GB/static/js/contrib/jquery/jquery.js"&gt;http://localhost:8000/en-GB/static/js/contrib/jquery/jquery.js&lt;/A&gt;&lt;BR /&gt;
ie,&lt;BR /&gt;
       &lt;LINK rel="stylesheet" href="https://answers.splunk.comstatic/css/bootstrap.min.css" /&gt;&lt;BR /&gt;
       &lt;SCRIPT src="https://community.splunk.com/static/js/contrib/bootstrap-2.3.1.min.js"&gt;&lt;/SCRIPT&gt;&lt;BR /&gt;
And you can inject the HTML code for the model using jquery or pure JavaScript by adding few line in application.js...&lt;/P&gt;

&lt;P&gt;But, Make sure you are appending the script file after including the  ...&lt;BR /&gt;
Above is just up to my knowledge.. There may be some other options too...&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2015 05:34:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-import-an-external-script-in-advanced-xml/m-p/158754#M9781</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-03-02T05:34:26Z</dc:date>
    </item>
  </channel>
</rss>

