ajaxed v2.0.1 API Documentation
Info: You are browsing the API docs of a previous ajaxed version.Click here if you want the latest API docs (2.1.1)
buffering, callbackFlagName, callbackType, contentType, DBConnection, debug, defaultStructure, headerFooter, loadPrototypeJS, onlyDev, plain, title
ajaxedHeader, draw, error, execJS, getLocation, iif, isCallback, isPostback, loadCSSFile, loadJSFile, QS, QSHas, QSP, QST, return, returnValue, RF, RFA, RFE, RFHas, RFP, RFT, throwError, write, writeln
<!--#include virtual="/ajaxed/ajaxed.asp"-->
<%
set page = new AjaxedPage
page.title = "my first ajaxed page"
page.draw()
sub main()
'the execution starts here
end sub
%>
<% sub pagePart_one() %>
<strong>some bold text</strong>
<% end sub
sub main() %>
<div id="container"></div>
<button onclick="ajaxed.callback('one', 'container')">load page part one</button>
<% end sub %>
<%
sub callback(action)
if action = "add" then page.return(2 + 3)
end sub
%>
<%
sub main()
id = page.QS("id") ' = request.queryString("id")
name = page.RF("name") ' = request.form("name")
save = page.RFHas("save") 'checks if "save" is not empty
'automatically try to parse a querystring value into an integer.
id = str.parse(page.QS("id"), 0)
end sub
%>
clientCursor, connection, dbType, defaultConnectionString, numberOfDBAccess, stringFieldTypes
close, count, delete, getRecordset, getRS, getScalar, getUnlockedRecordset, getUnlockedRS, insert, insertOrUpdate, open, openDefault, SQLSafe, toggle, update
<%
'container with an array as datasource
set dc = (new DataContainer)(array(1, 2, 3))
'container with a dictionary as datasource
set dc = (new DataContainer)(lib.newDict(1, 2, 3))
'container for a recordset
set dc = (new DataContainer)(lib.getRS("SELECT * FROM table"))
%>
<%
set dc = (new DataContainer)(array(1, 2, 3))
'check if a given value exists in the container
dc.contains(2)
'its even possible in one line
((new DataContainer)(array(1, 2, 3))).contains(2)
%>
attributes, col, columnsCount, css, cssClass, customControls, data, fullsearch, fullsearchValue, ID, name, nullSign, onRowCreated, pkColumn, recordLink, recordLinkF, recsPerPage, row, selection, sort, sorting, sql
draw, newColumn, sortedBy
<%
set dt = new Datatable
set page = new AjaxedPage
page.draw()
sub init()
dt.sql = "SELECT * FROM user"
dt.sort = "firstname"
end sub
sub callback(a)
dr.draw()
end sub
sub main()
dt.draw()
end sub
%>
<% dt.newColumn("firstname", "Firstname")%>
<%
set c = dt.newColumn("firstname", "Firstname")
c.cssClass = "colFirstname"
%>
<%
dt.selection = "multiple"
dt.onRowCreated = "onRow"
sub onRow(callerDT)
callerDT.row.selected = callerDT.row.number <= 10
end sub
%>
attributes, autoDrawItems, commonFieldText, commonFieldValue, cssClass, datasource, dataTextField, dataValueField, disabled, ID, multiple, multipleSelectionType, name, onItemCreated, selectedValue, size, style, tabIndex, uniqueID, valuesDatasource
draw, getNew, getNewItem, toString<% (new Dropdown)("SELECT * FROM table", "name", "selected").toString() %><% (new Dropdown)(lib.range(1, 12, 1), "month", month(date())).toString() %>
allTo, body, component, componentsOrdered, dispatch, errorMsg, html, mailer, mailServer, mailServerPassword, mailServerUsername, onlyValidEmails, recipients, sendersEmail, sendersName, subject, supportedComponents
addAttachment, addRecipient, addRecipients, emailName, newWith, quickSend, send
<%
'simple number
output = (new JSON)("myNum", 2, false)
'generates {"myNum": 2}
'array with different datatypes
output = (new JSON)("anArray", array(2, "x", null), true)
'generates "anArray": [2, "x", null]
'(note: the last parameter was true, thus no surrounding brackets in the result)
%>
browser, dev, env, fso, live, logger, page, version
arrayize, contains, detectComponent, error, exec, getFunction, getGUID, getUniqueID, iif, init, newDict, options, path, random, range, requestURL, require, sleep, throwError, URLDecode
<%
'by default we disable the logging
AJAXED_LOGLEVEL = 0
sub envDEV()
'but we enable it on the dev environment
AJAXED_LOGLEVEL = 1
end sub
%>
colorize, defaultStyle, logfile, logLevel, msgPrefix, path, prefix
clearLogs, debug, error, info, log, logsOnLevel, warn
<%
lib.logger.debug("some debug message")
lib.logger.warn("a warning like e.g. use method A instead of B")
lib.logger.info("user logged in")
lib.logger.error("some error happend")
%>
debug, description, failed, items, language, link, publishedDate, theCache, timeout, title, url
addItem, draw, generate, load, loadNew, reflect, setCache
<%
set r = new RSS
r.url = "http://somehost.com/somefeed.xml"
r.load()
if r.failed then lib.error("could not read feed. could be down or wrong format")
for each it in r.items
str.write(r.title & "<br>")
next
%>
<%
set output = new StringBuilder
output("some text")
output("some other text")
%>
<%= output.toString() %>
arrayToString, ASCIICode, capitalize, change, clone, defuseHTML, divide, end, endsWith, ensureSlash, existsIn, format, getHiddenInput, HTMLEncode, humanize, isAlphabetic, isValidEmail, JSEncode, matching, multiArrayToString, nullIfEmpty, padLeft, padRight, parse, rReplace, shorten, splitValue, SQLSafe, startsWith, stripTags, swapCase, toCharArray, toFloat, toInt, trimComplete, trimEnd, trimStart, trimString, URL, write, writeEnd, writef, writeln
allEnvs, debug, lineBreak, requestTimeout
assert, assertEqual, assertHas, assertHasNot, assertInDelta, assertInFile, assertInstanceOf, assertMatch, assertNot, assertNotEqual, assertNothing, assertNotInFile, assertResponse, fail, info, run
<!--#include virtual="/ajaxed/class_TestFixture/testFixture.asp"-->
<%
set tf = new TestFixture
tf.run()
sub test_1()
tf.assert 1 = 1, "1 is not equal 2"
'Lets test if our home page works
tf.assertResponse "/default.asp", empty, "<h1>Welcome</h1>", "Welcome page seems not to work"
end sub
%>
cleanParse, content, fileName, placeHolderBegin, placeHolderEnd, UTF8
add, addVariable, delete, getAllButFirstLine, getFirstLine, returnString, save
<%
set t = new TextTemplate
t.filename = "/sometemplatefile.txt"
t.add "name", "John Doe"
email.subject = t.getFirstLine()
email.body = t.getAllButFirstLine()
%>
<<< BLOCK DETAILS >>>
Name: <<< NAME >>>
<<< BLOCKEND DETAILS >>>
reflectItemPostfix, reflectItemPrefix, valid
add, getDescription, getErrorSummary, getInvalidData, isInvalid, reflect
<%
set v = new Validator
if lastname = "" then v.add "lastname", "Lastname cannot be empty"
if str.parse(age, 0) <= 0 then v.add "age", "Age must be a number and greater than 0"
if v then
save()
else
str.write(v.getErrorSummary("<ul>", "</ul>", "<li>", "</li>"))
end if
%>
Version 2.1.1 Released
—
4593 days ago