Click here to Skip to main content
Licence 
First Posted 12 Nov 2002
Views 100,409
Bookmarked 34 times

Get data from database without refreshing the page

By | 13 Nov 2002 | Article
works in all browsers

Introduction

The flow of the application is interrupted by page reloads whenever the client communicates with the server. Here is the simple solution to this problem, you can get data from a database without refreshing page. I tested this application with all browsers and it worked fine.

Zip file contains:

  • Default.asp (HTML interface)
  • getAllMembers.asp (gets all data from database)
  • db.mdb (User information database)

Following function calls another page to get information (data) from the database. Pass "First name" and "Last Name" to getAllMembers.asp page.

function getAllMembers()
{
    var FirstName;
    var LastName;
    var memberName;
    FirstName = document.frmUsers.txtFirstName.value;
    LastName =  document.frmUsers.txtLastName.value;
    memberName = "firstName="+ FirstName +"&lastName="+ LastName;
    window.open("getAllMembers.asp?"+ memberName,"lstNames",
        "width=200,height=100,left=200,top=300")
}

In getAllMembers.asp page, use window.opener.document.frm. This method is used to pass all values to the list box on main page.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Amol Rajmane

Web Developer

United States United States

Member


  • A Software Professional with five years of experience as Software Engineer in Analysis, Design and Development of software applications using ASP/JavaScript/SQL Server 2000.
  • Rich development experience in Internet/Intranet based applications using ASP, MS SQL Server, JavaScript and tools like Visual InterDev 6.0.
  • Expertise in ASP, VBScript, JavaScript, HTML, XML, COM, and SQL Server.
  • Experience in analyzing and handling complex Database Design.
  • He holds BS in Electronics Engineering.


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionHow to retrieve all results from a site? Pinmemberindyan_guy21:18 26 Sep '08  
GeneralHelp me: ASp Source code to generate ecard system in our website Pinmemberanuj vohra20:32 30 Sep '05  
GeneralASP Databases PinmemberAdeelAnsari0:16 2 Mar '04  
Generalasp PinsussAnonymous13:51 24 Oct '03  
GeneralMan old school stuff... PinsussAnonymous22:59 18 Nov '02  
GeneralOkay, but what if... PinmemberMarc Merritt4:44 18 Nov '02  
GeneralRe: Okay, but what if... PinmemberJediBaron7:51 18 Nov '02  
GeneralRe: Okay, but what if... PinmemberAmol Rajmane8:04 18 Nov '02  
GeneralHorrible article PinmemberMark Janveaux15:38 14 Nov '02  
GeneralRe: Horrible article PinmemberVictor Vogelpoel20:23 14 Nov '02  
GeneralInteresting approach ... PinmemberDejan Petrovic12:30 14 Nov '02  
Generalummmmm Pinmemberdclark6:21 14 Nov '02  
GeneralRe: ummmmm PinmemberAmol Rajmane6:49 14 Nov '02  
Generalpune "WebDezigner" before 4 years PinsussAnonymous22:59 31 Jan '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120517.1 | Last Updated 14 Nov 2002
Article Copyright 2002 by Amol Rajmane
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid