Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
| Search | Today's Posts | Mark Forums Read
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 9th, 2006, 07:34 AM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default AJAX and AutoPostBack

Hello Everyone and thanks for your help in advance. I am working on an application that utilizes AJAX to help populate a .Net webform. Here is generally how it works:

The form has a TextBox named ClientNumber. The textbox has an onkeyup attribute added that allows the user to type in a client name which in turn calls an AJAX function to create the appearance of an autocomplete dropdown box. When the user clicks on an item in the autocomplete list, it then populates the ClientNumber textbox with the corresponding client number. What I want to accomplish if possible, is to then have the autopostback (onchange) attribute of the textbox turned on so that when the numeric value is sent to the textbox, the autopostback will then occur, do a database lookup, and populate the rest of the fields on the form. However, when I do this, it does not seem to work properly. It seems to take the alpha input for the postback rather than waiting for the AJAX function to return the numeric value. Because of this, the database lookup fails. I am hoping there is some way to accomplish this as it would be much easier for the user to use the AJAX lookup and automatically populate the entire form rather than having to manually submit the form. Any help on this topic would be greatly appreciated. Thanks.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind two dropdown without autopostback xs2bharat ASP.NET 1.0 and 1.1 Basics 20 May 6th, 2007 02:23 AM
AutoPostBack problem liorlankri ASP.NET 1.x and 2.0 Application Design 1 December 22nd, 2004 09:45 AM
Listbox w/o Autopostback collie ASP.NET 1.0 and 1.1 Basics 3 November 21st, 2003 01:57 PM
AutoPostBack stu9820 ASP.NET 1.0 and 1.1 Professional 7 September 9th, 2003 03:59 PM
linkbutton and autopostback jtyson ASP.NET 1.0 and 1.1 Basics 0 July 10th, 2003 11:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.