In my previous post about "Using responseText in Ajax Call" on of the reader post a question of how to execute the sub query from the first query. Here is the question "I'm looking for the best way for the user to be able to click on any of the returned results in order to invoke a query. For example, the results being returned right now are a list of Product Categories. The user should be able to click on any of those categories to get a list of products in that category." In this post what I have made some modification to my last post to achieve the desire result. Here is the look of the form , I have divided the result area into two half area so when user click on the parent record then the detail of the parent record is shown in that detail area.
And here is the OrderList function on the main form. where I have to display the result or you can say the page where the employee detail is displayed. This function is similar to the ShowCustomer function except for the few minor things. First I have change the country query string parameter to employeeid parameter. and second difference is the call of the on change event handler which in this case is the OrderCallstateChanged, where I am assigning the return responseText to the sub detail div which is the divEmployeeOrders div.
Hope this will solve your problem. You can download the source code from here.
All and any comments / bugs / suggestions are welcomed!