<?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: KV Store Tutorial - Delete Button Fails in Firefox in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173517#M16697</link>
    <description>&lt;P&gt;Could you debug it?&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2015 14:26:02 GMT</pubDate>
    <dc:creator>dgladkikh_splun</dc:creator>
    <dc:date>2015-03-12T14:26:02Z</dc:date>
    <item>
      <title>KV Store Tutorial - Delete Button Fails in Firefox</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173514#M16694</link>
      <description>&lt;P&gt;I'm creating some forms that rely on the ability to delete or update an individual record in a KV store.  Walking through the KV store tutorial, Step 5 for creating the DELETE functionality does not seem to work.  Does anyone with experience using KV stores know what the issue could be?  I've copied the code verbatim from the tutorial.  I can fully manipulate the records using &lt;CODE&gt;curl&lt;/CODE&gt;, however, using the method described in the tutorial fails without an error that I can find.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        // 
        // DELETE BUTTON
        //

        // Call this function when the Delete Record button is clicked
        $("#deleteRecord").click(function() {
            // Get the value of the key ID field
            var tokens = mvc.Components.getInstance("default");
            var form_keyid = tokens.get("KeyID");

            // Delete the record that corresponds to the key ID using
            // the del method to send a DELETE request
            // to the storage/collections/data/{collection}/ endpoint
            service.del("storage/collections/data/mycollection/" + encodeURIComponent(form_keyid))
                .done(function() { 
                    // Run the search again to update the table
                    search1.startSearch(); 
                });
        }); 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2015 14:00:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173514#M16694</guid>
      <dc:creator>IngloriousSplun</dc:creator>
      <dc:date>2015-03-10T14:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: KV Store Tutorial - Delete Button Fails in Firefox</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173515#M16695</link>
      <description>&lt;P&gt;Which version of Firefox are you using? I just verified with 36.0.1 and 38.0a2 (2015-03-10) for Mac - works fine for me.&lt;BR /&gt;
Could you just try to use this page from latest step and see if it works?  &lt;A href="http://dev.splunk.com/view/SP-CAAAEZ2"&gt;http://dev.splunk.com/view/SP-CAAAEZ2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2015 15:39:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173515#M16695</guid>
      <dc:creator>dgladkikh_splun</dc:creator>
      <dc:date>2015-03-10T15:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: KV Store Tutorial - Delete Button Fails in Firefox</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173516#M16696</link>
      <description>&lt;P&gt;I'm using 35.0.1 on Windows 7, and I copied the code from that link verbatim and I'm still having the issue where records persist when I try to delete them.  &lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 13:56:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173516#M16696</guid>
      <dc:creator>IngloriousSplun</dc:creator>
      <dc:date>2015-03-12T13:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: KV Store Tutorial - Delete Button Fails in Firefox</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173517#M16697</link>
      <description>&lt;P&gt;Could you debug it?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 14:26:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173517#M16697</guid>
      <dc:creator>dgladkikh_splun</dc:creator>
      <dc:date>2015-03-12T14:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: KV Store Tutorial - Delete Button Fails in Firefox</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173518#M16698</link>
      <description>&lt;P&gt;I looked through the developer console during the process and I didn't see any errors.  I didn't see the request go out for the delete operation either, but I'm not sure whether I should since its making a REST call on the local system.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 14:57:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173518#M16698</guid>
      <dc:creator>IngloriousSplun</dc:creator>
      <dc:date>2015-03-12T14:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: KV Store Tutorial - Delete Button Fails in Firefox</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173519#M16699</link>
      <description>&lt;P&gt;Ok, I found the issue in tutorial, add &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;return false;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;as the last statement of deleteRecord button handler, so it should be like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$("#deleteRecord").click(function() {
             // Get the value of the key ID field
             var tokens = mvc.Components.getInstance("default");
             var form_keyid = tokens.get("KeyID");

             // Delete the record that corresponds to the key ID using
             // the del method to send a DELETE request
             // to the storage/collections/data/{collection}/ endpoint
             service.del("storage/collections/data/mycollection/" + encodeURIComponent(form_keyid))
                 .done(function() { 
                     // Run the search again to update the table
                     search1.startSearch(); 
                 });
             return false;
         }); 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will prevent browser to submit the page (and do refresh of the page) which prevents current page to submit AJAX call before page reload. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 22:48:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/KV-Store-Tutorial-Delete-Button-Fails-in-Firefox/m-p/173519#M16699</guid>
      <dc:creator>dgladkikh_splun</dc:creator>
      <dc:date>2015-03-12T22:48:14Z</dc:date>
    </item>
  </channel>
</rss>

