<?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: Parsing URL Paramaters in Web Framework in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Parsing-URL-Paramaters-in-Web-Framework/m-p/175582#M2340</link>
    <description>&lt;P&gt;Today I had the same use case to implement and I posted my solution here: &lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/114196/how-to-pass-tokens-in-url-using-the-new-web-framework.html#answer-236429"&gt;http://answers.splunk.com/answers/114196/how-to-pass-tokens-in-url-using-the-new-web-framework.html#answer-236429&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2015 11:49:49 GMT</pubDate>
    <dc:creator>peter_krammer</dc:creator>
    <dc:date>2015-05-15T11:49:49Z</dc:date>
    <item>
      <title>Parsing URL Paramaters in Web Framework</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Parsing-URL-Paramaters-in-Web-Framework/m-p/175580#M2338</link>
      <description>&lt;P&gt;I have a simplexml dashboard that I want to drilldown into a django/web framework dashboard and pass along some parameters in the URL. How can the web framework dashboard receive/parse these parameters for use in a search?&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2014 15:32:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Parsing-URL-Paramaters-in-Web-Framework/m-p/175580#M2338</guid>
      <dc:creator>jamesvz84</dc:creator>
      <dc:date>2014-05-22T15:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing URL Paramaters in Web Framework</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Parsing-URL-Paramaters-in-Web-Framework/m-p/175581#M2339</link>
      <description>&lt;P&gt;I was able to achieve this like so:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;URL:&lt;/STRONG&gt; ....myserver:8000/dj/en-us/myapp/mydashboard/?app=myapp&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Inside javascript section (within the require(xxx) block):&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&amp;amp;]" + name + "=([^&amp;amp;#]*)"),
    results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}

var application= getParameterByName('app');
tokens.set("application", application);
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Then in block managers section:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{% searchmanager
    id="dropdown_results"
    app="myapp"
    search='search application="$application$"'|token_safe
    preview=True
    autostart=True
    earliest_time="$earlyval$"|token_safe
    latest_time="$lateval$"|token_safe
%}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 May 2014 16:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Parsing-URL-Paramaters-in-Web-Framework/m-p/175581#M2339</guid>
      <dc:creator>jamesvz84</dc:creator>
      <dc:date>2014-05-22T16:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing URL Paramaters in Web Framework</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Parsing-URL-Paramaters-in-Web-Framework/m-p/175582#M2340</link>
      <description>&lt;P&gt;Today I had the same use case to implement and I posted my solution here: &lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/114196/how-to-pass-tokens-in-url-using-the-new-web-framework.html#answer-236429"&gt;http://answers.splunk.com/answers/114196/how-to-pass-tokens-in-url-using-the-new-web-framework.html#answer-236429&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 11:49:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Parsing-URL-Paramaters-in-Web-Framework/m-p/175582#M2340</guid>
      <dc:creator>peter_krammer</dc:creator>
      <dc:date>2015-05-15T11:49:49Z</dc:date>
    </item>
  </channel>
</rss>

