Date:  04/23/2014 11:31:59 AM Msg ID:  004684
From:  FoxWeb Support Thread:  004682
Subject:  Re: Master Table / Child Table
Conceptually this solution is fine, but I recommend that you use a javascript library like jQuery to implement ajax, so as to avoid having to account for differences between the various browsers and browser versions.
FoxWeb Support Team email
Sent by Ali Koumaiha on 04/23/2014 10:31:35 AM:
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?