Solved

get info from DataBase onBlur event

Posted on 2001-06-18
21
413 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
kamcheungon

please do.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Accepted Solution

by:
ArielB earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
sorry guys, I dont know why it posted so many times...
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
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
Comment Utility
Completed.
Moondancer
Moderator @ Experts Exchange
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

771 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

7 Experts available now in Live!

Get 1:1 Help Now