Solved

get info from DataBase onBlur event

Posted on 2001-06-18
21
429 Views
Last Modified: 2008-03-17
Hi,


How can get info from a DataBase on an onBlur event of input text.

I do not want to post/get all of the page in order to perform this action.
Is it possible to post/get only 1 input text, so that only his value will change.

I do not want the user to notice that an http post/get was made.


   Toda.
0
Comment
Question by:kingasa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +4
21 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 6203822
You get data from a database on the SERVER, not the CLIENT, and the only way to update it is to run the server page and refresh the browser.

The only way you wouldn't have to do that is if ALL the possible entries were downloaded to the client, and swapped into a form field where necessary.
0
 
LVL 8

Expert Comment

by:edemcs
ID: 6203842
what I would do, even though you don't prefer this method, but it works, is onBlur, refresh the page, pass all of the text field values over and repopulate the page with them so it looks as if the page never changed, a call to the database will be made, and you can then populate the specific text box with the new information attained from the database.  If you need a code example, let me know.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6203928
A page refresh on a slow connection is not going work like that the browser will look like it is hung unless you give the user an indication of what you are doing.

Cd&
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:edemcs
ID: 6203937
That is not true for all cases.  It depends on the contents of your page and the size of your query, and how well the query is designed.  I've used this method before and it works well.  I don't know the type of content your page has though, so you'll have to make that decision.
0
 

Expert Comment

by:kamcheungon
ID: 6204293
kingasa, you can try this if you want a solution that works in older browser:

1) Make your page a frames. Top frame is your form, occupy all the space. Bottom frame is a hidden frame.

2) You bottom frame should be as simple as possible. It should contains a form that post to the server. The result will come back, formatted as a javascript object that contains the data you needed for the form in the Top frame.

3) When onBlur, fires the submit method of the bottom frame form.

4) The bottom frame's result page will contain a function that update the form elements in the top frame.

This is just a general idea of how to solve the problem. In additin to using frame, you can use a Java Applet, or even a Flash file to query the result. Also, in IE, you can use RDS to maintain a connection to the db, then you can use ADO to do all the database query, and then retrieve the result using JavaScript.

If you need detail instruction, let me know.
0
 

Author Comment

by:kingasa
ID: 6204434
kamcheungon

please do.
0
 

Accepted Solution

by:
ArielB earned 50 total points
ID: 6205999
This article should give you a complete understanding of how to handel data changes in form, and get data from the DB on the server side

http://www.programmersresource.com/articles/listbox.asp
0
 

Expert Comment

by:ArielB
ID: 6206001
This article should give you a complete understanding of how to handel data changes in form, and get data from the DB on the server side

http://www.programmersresource.com/articles/listbox.asp
0
 

Expert Comment

by:ArielB
ID: 6206002
This article should give you a complete understanding of how to handel data changes in form, and get data from the DB on the server side

http://www.programmersresource.com/articles/listbox.asp
0
 

Expert Comment

by:ArielB
ID: 6206005
sorry guys, I dont know why it posted so many times...
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6218441
I will delete comments not pertinent to the technical issue here.  Have maintained a copy, if needed.

Moondancer
Community Support Moderator @ Experts Exchange
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6218468
Completed.
Moondancer
Moderator @ Experts Exchange
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question