Solved

get info from DataBase onBlur event

Posted on 2001-06-18
21
416 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

912 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now