Use API_GetRecordAsHTML to get a record within an HTML fragment that can be embedded in another Web page.
| Parameter | Value | Required? |
rid |
The record ID of the record to be edited. You can obtain the recordID of any record in a query. (See API_DoQuery). If you use a key field OTHER than the record id (rid), you should use the key parameter rather than rid. |
yes |
jht |
Set to 1 to return the HTML for a table as a JavaScript function named qdbWrite(). You can then embed the HTML table into a Web page by calling the JavaScript function in the area of the Web page where you want the table to display. Omit this parameter if you do not want the HTML return as qdbWrite(). |
no |
dfid |
The dform id of the form used to generate the HTML. The resulting display matches the contents and layout of the form you specify. You can obtain the dfid of a form by previewing or editing the form; the dfid is part of the URL in the browser’s address bar. |
no |
ticket |
A valid authentication ticket. The authentication ticket is returned via the API_Authenticate call. |
yes |
apptoken |
Supply a valid application token. |
yes, if the application requires application tokens |
udata |
A string value that you want returned. It will not be handled by QuickBase but it will be returned in the response. |
no |
The requested record in an HTML fragment.
| Element Name | Value |
action |
Echoes the originating request, for example, API_AddField. |
errcode |
Identifies the error code, if any. (See the Error Codes appendix for a list of possible error codes.) 0 indicates that no error was encountered. |
errtext |
Text that explains the error code. "No error" indicates that no error was encountered. |
udata |
Optional. Contains any udata value supplied in the request. |
POST https://<target_domain>/db/bddfa5nbx
HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_GetRecordAsHTML
<qdbapi>
<udata>mydata</udata>
<ticket>2_bdh78chd4_dpsx_b_dnbypa8d372j5rb6vt6kfdx7ty25</ticket>
<apptoken>dtmd897bfsw85bb6bneceb6wnze3</apptoken>
<rid>2</rid>
<dfid>10</dfid>
</qdbapi>
https://<target_domain>/db/bddnc2idi?act=API_GetRecordAsHTML&rid=18&dfid=10
&ticket=<your_ticket>&apptoken=dtmd897bfsw85bb6bneceb6wnze3
where <target_domain> is the domain against which you are invoking this call, for example, intuit.quickbase.com.
Follow these steps to embed a QuickBase record into a Web page on your Web site:
In the HEAD section of your Web page, add the following code:
<script lang="javascript" src="https://quickbase.com/
db/dddddddd?a=API_GetRecordAsHTML&rid=n&jht=1">
</script>
In the HEAD section of your Web page, add the following style information:
<style>
td.m { font-family:verdana; font-size:70%; }
td.hd { font-family:verdana; font-size:70%; font-weight:bold; color:white;}
</style>
In the area of the Web page where you want the HTML table to display, add the following JavaScript code:
<script lang="javascript">
qdbWrite();
</script>
<html>
<head>
<script lang="javascript" src="https://quickbase.com/
db/5rh82jcq?a=API_GetRecordAsHTML&rid=5&jht=1">
</script>
<style>
td.m { font-family:verdana; font-size:70%; }
td.hd { font-family:verdana; font-size:70%; font-weight:bold; color:white;}
</style>
</head>
<body>
<h1>Example</h1>
<table cellpadding=5 bgcolor=lightgreen>
<tr>
<td valign=top nowrap><b>A QuickBase table<br>embedded
in a<br>page of HTML</td>
<td>
<script lang="javascript">
qdbWrite();
</script>
</td>
</tr>
</table>
</body>
</head>
</html>
© 1999-2013 Intuit Inc. All rights reserved. Legal Notices.