Date:  04/23/2014 10:31:35 AM Msg ID:  004683
From:  Ali Koumaiha Thread:  004682
Subject:  Re: Master Table / Child Table
I figured it out.
In may fwx page 
InvoiceListing.fwx (my page)


function loadXMLDoc(tnIID)
var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
  }"POST", "getInvoiceDetail.fwx?tnIID="+ escape(tnIID), true);






<div id="invDetail></div>

then, I have another script, that takes a paramter and does this:
Private lnIID
lnIID    = request.querystring("tnIID")
if empty(lnIID)

text to lcSQL noshow
    Execute GetInvoiceDetailByIID ?lnIID       
if SQLError()
    response.write('Error retrieving invoice detail')


<table width="100%" border="1">
     <td>Item Number</td>
     <td>Item Description</td>
     <td>Tax Amnt</td>
     <td>Serial Number</td>
     <td>Mobile No.</td>    
  select curInvDetail
Sent by Ali Koumaiha on 04/23/2014 09:13:37 AM:
 I am trying to figure out the best way to do this.
I have an fwx page, has an html table (grid) with rows from a master table.
first column is invoice#.
at the bottom, i have another html table, that should display the detail of the invoice.
i can put the data on both, and use a querystring and get the invoice# of selected record and display.  All is good.
But, the page is "refershing" and the user doesn't see the selected row any more.
so, what i want to accomplish, is to try to load the child table using maybe javascript or ajax without doing a post on the client side or refreshing the browser using normal post.
can you simply point me in the right direction? how i can do a postback using ajax from a onlick of a record or a row inside an html table?