Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How stop onclickevent when page is loaded or refreshed

$
0
0
Hi I am trying to send an email when a button is clicked.This works fine except that when the page is refreshed the email action is triggered. How do i stop that from happening. Thanks in advance //search for sending email var search4 = new SearchManager({ "id": "search4", "status_buckets": 0, "latest_time": "$latest$", "search": "|inputlookup timeline_lookup | eval KeyID = _key | eval timestamp=strftime(time_stamp/1000,\"%m/%d/%y %H:%M:%S\") | sort -time_stamp | head 1| sendemail to=\"foobar@gmail.com\" subject=\"foobar" from=\"foorbar@gmail.com\" message=\"hello world\" sendresults=true", "earliest_time": "0", "cancelOnUnload": true, "app": utils.getCurrentApp(), "auto_cancel": 90, "preview": true, "runWhenTimeIsUndefined": false }, {tokens: true}); // Button to trigger action // Calls search4 $(document).ready(function() { $("#sendNotification").click(function() { search4.startSearch(); return false; }); });

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>