Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 28th, 2006, 12:02 PM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default retrieve data dynamically

ASP programming : I have text box "ItemId" and "ItemDescription" After I put data in to ItemId and I press Tab (on change event) button, I want to display ItemDescription automatically(this data retrieve from Database).Could you please advise me how to do it .If you have sample source code,that will be great.Thanks

 
Old May 28th, 2006, 06:55 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

IMO pressing tab is not very intuative. Why not just enter the "itemID" and click a show details button like a regular form? People who are on the wrong side of the digital divide are not aware of the tab button, nor what it does. Additionaly you wouldnt place an onChange event on a input type="text" area. These are commonly used for <select> type form elements. Here is a crazy thought; why not populate a <select> list from the Data base, do you need to enter it manually? This way you can use the onChnage method. You would do something like:


SQL = "SELECT ..."
Set getInfo = Conn.Execute(SQL)

<SELECT NAME="reportType" onChange="Javascript:updateForm.submit();">
<% if not getInfo.EoF then %>
       <option value="0">Select a Group Report</option>
<% do until getInfo.Eof %>
      <option value="<%= getInfo(0) %>"<% if cint(getInfo(0)) = cint(whatReportType) then response.write " selected " end if %>><%= getInfo(1) %></option>
<% getInfo.moveNext
       loop
   else %>
      <option value="0">No report types found</option>
<% end if %>
</SELECT>

Wind is your friend
Matt
 
Old May 28th, 2006, 11:02 PM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I need to enter item id manually.I can not use <select> type because it has too much data to display.Could you please advice.Thanks

 
Old May 28th, 2006, 11:21 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

There were several questions in my post. Did you see this one?

;;;Why not just enter the "itemID" and click a show details button like a regular form?

Based on my understanding of your requirement this is what I would do. I assume you dont need instruction on how to submit a regular form?

Wind is your friend
Matt




Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve data from word table Paul_Tic Access VBA 2 May 26th, 2006 11:31 AM
cannot retrieve data because of redirecting artuc General .NET 0 December 18th, 2004 02:52 AM
Retrieve data Snib C++ Programming 2 November 6th, 2004 11:09 AM
trying to retrieve data from another page Calibus Classic ASP Databases 3 July 17th, 2004 11:51 PM
data retrieve from three tables mateenmohd SQL Server 2000 2 October 7th, 2003 04:26 AM





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