Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. want to prevent un-intentional button clicks to query report

want to prevent un-intentional button clicks to query report

Scheduled Pinned Locked Moved Web Development
helpdatabasequestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ashu_sharma21
    wrote on last edited by
    #1

    Hi, I m facing a peculiar problem in report section of my web site. To give you an idea, I log every click on button 'View Report', present on my report page, in a table just to track wut reports are being used most frequently. What happens is, if the user clicks the 'View Report' button in multiple successions, multiple insertion goes to the table with just minute difference in seconds [some times just milliseconds differ]. How should I prevent this from happening? record should not get inserted if the query and data hasnt changed. Please help !

    R 1 Reply Last reply
    0
    • A ashu_sharma21

      Hi, I m facing a peculiar problem in report section of my web site. To give you an idea, I log every click on button 'View Report', present on my report page, in a table just to track wut reports are being used most frequently. What happens is, if the user clicks the 'View Report' button in multiple successions, multiple insertion goes to the table with just minute difference in seconds [some times just milliseconds differ]. How should I prevent this from happening? record should not get inserted if the query and data hasnt changed. Please help !

      R Offline
      R Offline
      raouls
      wrote on last edited by
      #2

      why don't you get the reports pages to log the event, instead of the button? then you know for certain that they've viewed that report. or you could perhaps have a session variable with the latest query data, and when they click on the button, check if the current query data is the same as the last query data, and afterwards set the latest data to the current data. -- Raoul Snyman Saturn Laboratories e-mail: raoul.snyman@saturnlaboratories.co.za web: http://www.saturnlaboratories.co.za/ blog: http://blog.saturnlaboratories.co.za/ linux user: #333298

      A 1 Reply Last reply
      0
      • R raouls

        why don't you get the reports pages to log the event, instead of the button? then you know for certain that they've viewed that report. or you could perhaps have a session variable with the latest query data, and when they click on the button, check if the current query data is the same as the last query data, and afterwards set the latest data to the current data. -- Raoul Snyman Saturn Laboratories e-mail: raoul.snyman@saturnlaboratories.co.za web: http://www.saturnlaboratories.co.za/ blog: http://blog.saturnlaboratories.co.za/ linux user: #333298

        A Offline
        A Offline
        ashu_sharma21
        wrote on last edited by
        #3

        Thanks Raoul ! Please throw some light how shall i implement this.. "why don't you get the reports pages to log the event, instead of the button?" My requirement is, i must log every report query that goes to the server. Please suggest if i can acheive this with your suggestion. Regards ---------- Ashu Sharma Web Analyst eBizneeds :~: stimulating innovation by technology m: +91 9414255790 t: +91 141 510 5201, 2 f: +91 141 510 5203 e: asharma@tech.ebizneeds.net w: www.ebizneeds.com

        R 1 Reply Last reply
        0
        • A ashu_sharma21

          Thanks Raoul ! Please throw some light how shall i implement this.. "why don't you get the reports pages to log the event, instead of the button?" My requirement is, i must log every report query that goes to the server. Please suggest if i can acheive this with your suggestion. Regards ---------- Ashu Sharma Web Analyst eBizneeds :~: stimulating innovation by technology m: +91 9414255790 t: +91 141 510 5201, 2 f: +91 141 510 5203 e: asharma@tech.ebizneeds.net w: www.ebizneeds.com

          R Offline
          R Offline
          raouls
          wrote on last edited by
          #4

          i'm not sure what you're currently doing, but let's say that the user selects a report from a drop down list, and when they click on the button, the application directs them to another page with the report. now what you can do is when that report page loads, get it to log the event. i'm not sure what you're using, so let's see an example in c#: private void Page_Load(object sender, System.EventArgs e) {   if (!IsPostBack)   {     EventLogger.LogEvent(reportId, queryData);     // generate report here   } } reportId: some sort of identifier to say which report it is. queryData: the data used in the query and to generate the report. EventLogger: my event logging class LogEvent: a static ("Shared" in vb.net i think) method that logs the event. hope this helps. -- Raoul Snyman Saturn Laboratories e-mail: raoul.snyman@saturnlaboratories.co.za web: http://www.saturnlaboratories.co.za/ blog: http://blog.saturnlaboratories.co.za/ linux user: #333298

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups