Discussions

 View Only
  • 1.  Is there an existing javascript function to redraw a table?

    Posted 09-25-2017 20:11
    I would like to delete records and have the table refresh asychonously. 

    Right now, I have a table with each row containing a delete button. I can use javascript to make an API call that will delete the record the button is associated to. However, is there a Quickbase javascript function I could call to "redraw" or "refresh" the current table instead of refreshing the page. 

    This is mostly for better user experience.  


  • 2.  RE: Is there an existing javascript function to redraw a table?

    Posted 09-25-2017 20:15
    What is the source of the data you want to import?  Is it from another table?  if so, then you can use API_RunImport.


  • 3.  RE: Is there an existing javascript function to redraw a table?

    Posted 09-27-2017 15:04
    i don't want to import anything, its a just a delete button. 


  • 4.  RE: Is there an existing javascript function to redraw a table?

    Posted 09-25-2017 21:36
    For the most part QuickBase is designed to reload pages to display new data and not as a single page application which refreshes data through background AJAX calls. However, there are libraries and techniques that are widely available that would allow you to create the feature your describe but you would have to write and splice the relevant code into the QuickBase page yourself using an injection technique.


  • 5.  RE: Is there an existing javascript function to redraw a table?

    Posted 09-27-2017 15:06
    Thanks you. 


  • 6.  RE: Is there an existing javascript function to redraw a table?

    Posted 09-27-2017 19:16
    Paul, is this syntax what you are looking for?  It does the URL and then refreshes the record or report you are on.

    var text URL= URLRoot() & "db/" & [_DBID_TABLE_1] & "?act=API_EditRecord"
    & "&rid=" & URLEncode ([Record ID#])
    & "&_fid_7=" & URLEncode ([Status])
    & "&apptoken=" & "XXXX";


    "javascript:" &
    "$.get('" & 
    $URL & 
    "',function(){" &
    "location.reload(true);" &
    "});" 
    & "void(0);