<?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: Get events into splunk using Javascript SDK - Internet Explorer 8 in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88058#M1264</link>
    <description>&lt;P&gt;..do I really need a proxy server to get this work?&lt;/P&gt;</description>
    <pubDate>Thu, 24 Oct 2013 11:20:28 GMT</pubDate>
    <dc:creator>aljazr</dc:creator>
    <dc:date>2013-10-24T11:20:28Z</dc:date>
    <item>
      <title>Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88047#M1253</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to send data into splunk index, using &lt;STRONG&gt;&lt;CODE&gt;splunkjs.Service.Index.submitEvent&lt;/CODE&gt;&lt;/STRONG&gt; method, as shown in the &lt;A href="http://dev.splunk.com/view/splunk-sdk-javascript/SP-CAAAEJ3"&gt;example&lt;/A&gt; (look for "To add data directly to an index" paragraph). It works fine under FF and Chrome, but not in IE8.&lt;/P&gt;

&lt;P&gt;When trying to execute &lt;STRONG&gt;&lt;CODE&gt;myindexes.item("test_index")&lt;/CODE&gt;&lt;/STRONG&gt;, the &lt;STRONG&gt;&lt;CODE&gt;myindexes&lt;/CODE&gt;&lt;/STRONG&gt; is null. I verified that it is OK and non-null before the fetch callback is executed. &lt;/P&gt;

&lt;P&gt;In the console, I see an error saying &lt;STRONG&gt;&lt;CODE&gt;"Error in parsing JSON"&lt;/CODE&gt;&lt;/STRONG&gt;, without any additional data/params.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Edit:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I have no IE8 to reproduce it right now. When running in IE10 everything is working fine (like FF and Chrome). But, when choosing compatibility view (which simulates IE7), the problem does occur. This can be reproduced easily, no specific configuration is required.&lt;/P&gt;

&lt;P&gt;the code is very simple (almost purely copied from the example):&lt;/P&gt;

&lt;P&gt;&lt;CODE language="javascript"&gt;&lt;BR /&gt;
var http = new splunkjs.ProxyHttp("/proxy");&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;// Create a Service instance and log in &lt;BR /&gt;
var service = new splunkjs.Service(http, {&lt;BR /&gt;
    username: "admin",&lt;BR /&gt;
    password: "changeme",&lt;BR /&gt;
    scheme: "https",&lt;BR /&gt;
    host: "localhost",&lt;BR /&gt;
    port:"8089",&lt;BR /&gt;
    version:"5.0"&lt;BR /&gt;
});&lt;/P&gt;

&lt;P&gt;// Get the collection of indexes&lt;BR /&gt;
var myindexes = service.indexes();&lt;BR /&gt;
// Get an index to send events to&lt;BR /&gt;
myindexes.fetch(function(err, myindexes) {&lt;BR /&gt;
    var myindex = myindexes.item("main");&lt;BR /&gt;
    // Submit an event to the index&lt;BR /&gt;
    myindex.submitEvent("A new event", {&lt;BR /&gt;
        sourcetype: "mysourcetype"&lt;BR /&gt;
    }, function(err, result, myindex) {&lt;BR /&gt;
        console.log("Submitted event: ", result);&lt;BR /&gt;
    });&lt;BR /&gt;
}); &lt;BR /&gt;
&lt;/P&gt;

&lt;P&gt;The normal network traffic goes like this ("output_mode=json" is omitted for readability):&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
(1) POST /proxy/services/auth/login&lt;BR /&gt;
    request body contains username and password&lt;BR /&gt;
    response contains a sessionKey&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;(2) GET /proxy/services/data/indexes?count=0&lt;BR /&gt;
    response contains a list of indexes details&lt;/P&gt;

&lt;P&gt;(3) POST /proxy/services/receivers/simple?sourcetype=mysourcetype&amp;amp;index=main&lt;BR /&gt;
    request body contains the text of the event to be indexed&lt;BR /&gt;
    response contains a confirmation about the indexed event&lt;BR /&gt;
&lt;/P&gt;

&lt;P&gt;When fails, the network traffic stops after the &lt;STRONG&gt;first&lt;/STRONG&gt; request. the response seems to be alright: &lt;CODE&gt;{"sessionKey":"................................"}&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 18:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88047#M1253</guid>
      <dc:creator>yitzarad</dc:creator>
      <dc:date>2013-07-08T18:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88048#M1254</link>
      <description>&lt;P&gt;Can you put the code snippet that you are using? Also, does IE8 let you see what the network request/response is that it is making?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 17:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88048#M1254</guid>
      <dc:creator>ineeman</dc:creator>
      <dc:date>2013-07-09T17:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88049#M1255</link>
      <description>&lt;P&gt;ineeman,&lt;BR /&gt;
pasting it here is limited in charcters amount, so I'll edit the original question, if you don't care.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 18:15:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88049#M1255</guid>
      <dc:creator>yitzarad</dc:creator>
      <dc:date>2013-07-09T18:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88050#M1256</link>
      <description>&lt;P&gt;can somebody reproduce this, in order to confirm that it's not a special case of me?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2013 17:54:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88050#M1256</guid>
      <dc:creator>yitzarad</dc:creator>
      <dc:date>2013-07-11T17:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88051#M1257</link>
      <description>&lt;P&gt;i'm able to reproduce it. where should I open a bug?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2013 10:33:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88051#M1257</guid>
      <dc:creator>yitzarad</dc:creator>
      <dc:date>2013-08-02T10:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88052#M1258</link>
      <description>&lt;P&gt;Sorry I have no answer for you..but one question... I am doing the same thing but stacked in firs step... how do you attach splunk.js file (script) to application.js or site.. I tried quite everything but without success... I tried with &lt;SCRIPT type="text/javascript" src="https://community.splunk.com/YOUR_PATH/splunk.js"&gt;&lt;/SCRIPT&gt; in xml but nothing... I tried with&lt;BR /&gt;&lt;BR /&gt;
   var head= document.getElementsByTagName('head')[0];&lt;BR /&gt;
   var script= document.createElement('script');&lt;BR /&gt;
   script.type= 'text/javascript';&lt;BR /&gt;
   script.src= 'C:/Program files/splunk/etc/apps/HCtest/appserver/static/splunk-sdk/client      /splunk.min.js';&lt;BR /&gt;
   head.appendChild(script);&lt;/P&gt;

&lt;P&gt;...in application.js&lt;/P&gt;

&lt;P&gt;...and got script on page but also error "Not allowed to load local resource:"&lt;/P&gt;

&lt;P&gt;thanks for advice.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2013 11:25:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88052#M1258</guid>
      <dc:creator>aljazr</dc:creator>
      <dc:date>2013-10-17T11:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88053#M1259</link>
      <description>&lt;P&gt;Do you try to run it under a web server, or a local html placed in file://...?&lt;/P&gt;

&lt;P&gt;If using a web server, you should be able to open a Web Developer Console (F12 or something) and see whether the browser create a GET request for this js file or not. If yes, you should get HTTP "200 OK" or "404 Not Found".&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2013 18:03:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88053#M1259</guid>
      <dc:creator>yitzarad</dc:creator>
      <dc:date>2013-10-17T18:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88054#M1260</link>
      <description>&lt;P&gt;I try under web server.&lt;/P&gt;

&lt;P&gt;If I add &lt;SCRIPT&gt; in xml, nothing happen. If I try with editing application.js I get error &amp;amp;quot;Not allowed to load local resource&amp;amp;quot;. I am guessing that maybe I didn&amp;amp;#39;t put &amp;amp;quot;client&amp;amp;quot; folder of splunk sdk in right directory (I put it in static directory of an app).&amp;lt;/p&amp;gt;&lt;/SCRIPT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 05:52:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88054#M1260</guid>
      <dc:creator>aljazr</dc:creator>
      <dc:date>2013-10-18T05:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88055#M1261</link>
      <description>&lt;P&gt;OK, i solved this one, script splunk.js is on the page and no error is shown. I solved by adding src in url... &lt;A href="https://mycomp:8000/"&gt;https://mycomp:8000/&lt;/A&gt;... (instead of C:/...).&lt;BR /&gt;
But the joy was only for a short time... next error: Uncaught ReferenceError: splunkjs is not defined  ....&lt;/P&gt;

&lt;P&gt;is out there any detailed walkthrough of using Splunk SDK javascript?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 09:51:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88055#M1261</guid>
      <dc:creator>aljazr</dc:creator>
      <dc:date>2013-10-18T09:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88056#M1262</link>
      <description>&lt;P&gt;Ok, I solved this too ... but not shure if in most elegant way... ...ole! new error found &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ... if you dont mind, could you be so kind to tell me exactly step by step what should I do to get this 'monster' work?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 11:11:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88056#M1262</guid>
      <dc:creator>aljazr</dc:creator>
      <dc:date>2013-10-18T11:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88057#M1263</link>
      <description>&lt;P&gt;..now i have problems with authentication ...&lt;BR /&gt;
GET &lt;A href="http://local:8000/en-GB/proxy/services/auth/login?output_mode=json"&gt;http://local:8000/en-GB/proxy/services/auth/login?output_mode=json&lt;/A&gt; 404 (Not Found)&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 12:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88057#M1263</guid>
      <dc:creator>aljazr</dc:creator>
      <dc:date>2013-10-18T12:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get events into splunk using Javascript SDK - Internet Explorer 8</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88058#M1264</link>
      <description>&lt;P&gt;..do I really need a proxy server to get this work?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2013 11:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Get-events-into-splunk-using-Javascript-SDK-Internet-Explorer-8/m-p/88058#M1264</guid>
      <dc:creator>aljazr</dc:creator>
      <dc:date>2013-10-24T11:20:28Z</dc:date>
    </item>
  </channel>
</rss>

