Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7768257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:52:30+00:00 2026-06-01T15:52:30+00:00

I am currently executing AJAX query stores on each onblur if this.value is not

  • 0

I am currently executing AJAX query stores on each onblur if this.value is not equal to ”, but for users tabbing through a form and not changing anything, this is an insane amount of database query hits for nothing (and yes, I check for changes on the actual database query script, but still).

Here’s what I’m doing currently:

<input type="text" name="EUName" id="EUName" value="[whateverdynamicvalue]"
class="contentextformtxt" onblur="if (this.value == '') 
{this.value = '[whateverdynamicvalue]';} else { UpdateEUData();return false; } " />

With the else obviously submitting the form via AJAX.

What I thought about doing was using OnFocus to capture what the content was when the User OnFocuses, and then checking it against this.value OnBlur to see if anything has changed. I’m not sure if I’m on the right track (not very good at javascript) but here’s what I have so far.

<input type="text" name="EUAddress1" id="EUAddress1" value=" [whateverdynamicvalue] "
class="contentextformtxtlarge" onblur="if (this.value == '' || this.value == originalfvalue)
{this.value = ' [whateverdynamicvalue] ';} else { UpdateEUData();return false; } " 
onfocus="Var originalfvalue = this.value" />

I’m not sure if that’s a best practice or not, but either way, it doesn’t work. Any suggestions on how to fix would be awesome! Bottom line, I’m just trying to figure out a way to cut down on the server traffic. I originally was just comparing it to the dynamic value, but the problem is if someone changes the value from value x to value y, and then tries to change it back to value x, obviously comparing it to the dynamic value will not allow it to update because it still thinks the value IS value x, not that it has been changed to value y. Hence why I’m trying to figure out the javascript route.

Any help will be much appreciated in advance!
JE

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:52:31+00:00Added an answer on June 1, 2026 at 3:52 pm

    Use the onchange event. It is triggered when the user tabs or clicks out of the field, but unlike onblur it only happens if the value was actually changed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Ajax call that currently needs to be synchronous. However, while this
Say I have a command line C program which is currently executing, and I
I want to perform a printf() to display when the currently executing code was
Is there a way to get the name of the currently executing test from
I'm currently having following error message when executing a .sql file with about 26MB
I'm currently facing a weird problem while executing a command from my bash script.
I'm currently evaluating Drools Flow as a workflow engine for executing up to hundreds
I'm currently working on a page which makes use of the MS Ajax UpdatePanel.
I executing a function like this, <script type=text/javascript> $(document).ready(function() { getEntities(Clients/GetClients, 0, formatClientsResult); var
I can't figure out how to inspect a currently executing function using inspect /

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.