Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms 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 August 13th, 2004, 04:24 AM
Registered User
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dekel78
Default filling a form using asp code...

Hello,

I'm trying for days to solve the issue.

I want that after you click the button, to fill the textboxes from DB

<input type="button" value="a" onclick="txtName.value<%= CustName%>"

basically, i want to select a customer from a listbox, and then search after all his details in the db and write them in a textbox.

thanks in advance
 
Old August 13th, 2004, 04:37 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear your question is very confusing as you give the value in Button and then say in text box. You should make it very clear



(:_:)

Numan
--------------------------------------------------
Love is the most precious thing of this world. So find and grab it!
 
Old August 13th, 2004, 04:46 AM
Registered User
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dekel78
Default

ok, sorry

i have a form with a listbox and 3 textboxes.
when you select a customer from the listbox, i want to search this customer in my DB and then fill the textboxes with the data that i found.

I tried to write a javascript function using ASP code but i dont know
how to use the variable from the function to the asp code...

for example:
<%

  Dim sJscript


  sJscript = ""
  sJscript = sJscript & "<script>"
  sJscript = sJscript & "function GetName(CusName) {"
  sJscript = sJscript & "alert(CusName)" & VBcrlf
  sJscript = sJscript & "return(CusName)"
  sJscript = sJscript & "}"
  sJscript = sJscript & "</script>"

  Response.write sJscript

  %>
how can i use the CusName in ASP?

any advice?

 
Old August 13th, 2004, 05:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

On Selection of value from listbox, you got to post that to the server and request the value from listbox using which you need to query the db and populate the 3 text boxes. Hope this is what you are looking for.

Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem filling up a form Tomi Struts 0 July 8th, 2008 03:44 AM
Macro for Auto-filling a pre-made Word form dan_thorman Excel VBA 0 January 25th, 2007 10:46 AM
Filling and submitting web form by C# application Mystic C# 0 May 2nd, 2006 04:29 AM
Filling a form in specified time (Reply ASAP) software_developer_kk Classic ASP Basics 1 March 29th, 2005 04:20 AM
Auto Filling Combo on Form penta Access 2 December 3rd, 2004 06:14 AM





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