Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

get info from DataBase onBlur event

Posted on 2001-06-18
21
Medium Priority
?
440 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Find out what you should include to make the best professional email signature for your organization.
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 …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

972 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