Data Display Question

Results 1 to 2 of 2

Thread: Data Display Question

  1. #1
    Johnathon Guest

    Default Data Display Question

    The ASP Gods have granted me the wisdom to have a user search a database using specific fields and then all the recordsets that match some or all of the fields are returned in on HUGE table. <BR><BR>Believe me this sucker is big and very hard to distinguish between more than on record.<BR><BR>My Question is - Since there is so much data what I would like to do is just display the important facts like "Company Name, City, State" and then the user can click on "Company Name" and that displays the rest of the data by itself - "Address, Phone, Fax, Email, Website" etc.<BR><BR>Can anyone point me in the right direction on this? I feel that I am half way there but now I am at my limits.<BR><BR>Things that I am unsure of:<BR>1. How to create the link?<BR>2. How to make that link display the rest of the info in the database.

  2. #2
    Franco Guest

    Default RE: Data Display Question

    Johnathon<BR><BR>As granpa used to say... what you need is to create a table with the bare essentials (eg company name) are all hyperlinks eg.<BR><BR>&#060;TABLE&#062;<BR>&#060;TR&#062;&#06 0;TH&#062;Company name&#060;/TH&#062;&#060;/TR&#062;<BR>&#060;%<BR>Do Until objRs.EOF<BR><BR>Response.Write "&#060;TR&#062;&#060;TD&#062;&#060;A HREF=javascript:GetCompanyDetails(" & objRs("CompanyID") & ")&#062;" & objRs("CompanyName") & "&#060;/A&#062;&#060;/TD&#062;&#060;/TR&#062;"<BR><BR>objRs.MoveNext<BR>Loop<BR>%&#062; <BR><BR>&#060;/TABLE&#062;<BR><BR>The next thing you need is a (Jscript) function which picks up the CompanyID and transfers it to a new ASP page. Something like the below will do the trick:<BR><BR>function GetCompanyID(intCompanyID) {<BR>"CompanyDetails.asp?CompanyID=" + intCompanyID) which will open up a new window with company details.<BR><BR>In classic Blue Peter fashion, you&#039ll have created a CompanyDetails.asp page which reads in the company ID through querystring, queries the database anew and produces the company details WHERE CompanyID = whatever was passed through.<BR><BR>Give it a buzz. If you get stuck, keep going. If you get really stuck, put the weapon of choice down and e-mail me.<BR><BR>Franco<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts