Pass Custom action Form Object selected records to html view for loop?

Pass Custom action Form Object selected records to html view for loop?

I have a custom action that executes for a collection of records. 
(ie, I select several records in a view and execute the custom action.)

This uses a form object with record ID's.

My function is as follows and it opens an HTML View:
  1. void Shipping.Order_Batch(Purchase_Request_Form ID, int Order_Number)
  2. {
  3.     openUrl("#View:Order_Batch_HTML&ID=" + ID + "&Order_Number=" + input.Order_Number, "popup window");
  4. }

I want to pass the list of record ID's into the Html view and use the selected records as my criteria of a for loop that creates a table with data from each of the IDs in the form object.

I just dont know how to use the record ID's passed to the view. I think they are passed properly as the URL shows as follows:
.../#View: Order_Batch_HTML&ID=Purchase_Request_Form [ID in (1185428000003455148,1185428000003455156) ]&Order_Number=19559


How can I use the ID's (1185428000003455148 and 1185428000003455156) as the two records to loop through in my html view for loop?  


Currently my html view displays all records in the form  Purchase_Request_Form, I'm not sure how to restrict it based on the record ID's brought in from the custom function.

The code for my html view is as follows:

  1. htmlpage Order_Batch_HTML(ID, Order_Number)
    displayname = "Order Batch HTML View"
    content
    <%{

    for each Order in Purchase_Request_Form
        {%>  
    <br>
    <%=Order.Order_Number%>
    <br>  

    <%}
     
     }%>

Please any help here would be much appreciated. If you could either help me directly or pass me to documentation that would help.

Thanks
Matt