Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View details of results on same page

Status
Not open for further replies.

mazdaman

Programmer
Oct 17, 2003
55
GB
I have a result set displayed on a page and would like to click on the individual items and have the details displayed on the same page next to the main results and be able to do this with each item - there will only be 6 or 7. Will it have to be in a frame or is there any other way of doing it ... cheers

"Only the dead will see the end of war" Plato
 
Cheers - have you any examples. Will iframe be OK on a MAC
 
You dont need to use a frame or iframe to accomplish what you want.

forgive meif this is rough but lunch is nearly over.....

step one the first rs

Code:
<%
<%
Dim GetStatus
Dim GetStatus_numRows

Set GetStatus = Server.CreateObject("ADODB.Recordset")
GetStatus.ActiveConnection = YOUR STRING
GetStatus.Source = "SELECT *  FROM dbo.OrderHeaders  WHERE OrderID = '"& (selectorders.Fields.Item("expr1").Value) &"'"
GetStatus.CursorType = 0
GetStatus.CursorLocation = 2
GetStatus.LockType = 1
GetStatus.Open()

GetStatus_numRows = 0

While NOT GetStatus.EOF

' write the results out

Response.Write(GetStatus("ID"))


' If statement to see which one is selected
If Request.QueryString("show") = "" Then

else

' next we have another rs to show the details
Dim UserDetails
Dim UserDetails_numRows

Set UserDetails = Server.CreateObject("ADODB.Recordset")
UserDetails.ActiveConnection = YourString
UserDetails.Source = "SELECT *  FROM etc"
UserDetails.CursorType = 0
UserDetails.CursorLocation = 2
UserDetails.LockType = 1
UserDetails.Open()

UserDetails_numRows = 0

' Write out the details if selected

Response.Write(UserDetails("OrderDetails"))

' move to the next record
GetStatus.MoveNext()

'end inner loop
end if

'end the while
wend
'close the connections
UserDetails.Close()
GetStatus.Close()
%>

This is a down and dirty way to do it, you need to also pass a value over to select the right 'details' record.

it should look similar to this...

ID Name Email
-----------------------------------------
01 Glen Glen@
02 Steve Steve@
Steve has 6 orders in the system
03 Chris chris@

It is a good idea to loop the 'details part in a separate table, but thats up to you.

I hope that this helps........

Let me know if it doesnt make sense.

Thanks

Glen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top