|
NextDB.net | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--net.nextdb.Util
net.nextdb.Util is a collection of useful static functions for parsing forms and general web development.
Defined in api.docs.js
| Constructor Summary | |
net.nextdb.Util()
|
|
| Method Summary | |
<static> void
|
addEvent( obj, type, fn )
Standard cross browser compliant event registry. |
<static> void
|
buildForm(args)
deprecated (see net.nextdb.html.Form) |
<static> void
|
c()
For debugging, this will clear the debug console. |
<static> Date
|
convertFromServerDateFormat(<String> serverDateString)
Converts the string representation of the date from the server to an instance of a JavaScript Date. |
<static> String
|
convertToServerDateFormat(<Date> pDate)
If you are making your own date calls without the help of our calendar object, you must format the date object to the appropriate string date format for the server. |
<static> void
|
createCookie(<String> name,<String> value,<Number> days)
In AJAX applications that consist of many different HTML pages, you can maintain state between pages using cookies to store and retrieve information. |
<static> void
|
eraseCookie(<String> name)
Remove cookie by name. |
<static> Object
|
getAbsoluteLeft(obj)
Gets the left of a dom element relative to page. |
<static> Object
|
getAbsoluteTop(obj)
Gets the top of a dom element relative to page. |
<static> void
|
inspect(<object> n)
quick single level alert of the contents of an object |
<static> Boolean
|
isServerDateFormat(d)
Determines whether a given string has valid server date formatting. |
<static> void
|
p(<Object> txt, level)
For debuggging, this static function will print out the a dynamically generated DIV on the page. |
<static> Object
|
parseForm(<Object> domNode)
Use parseForm to extract an object from an HTML form, for the purpose of performing a Query, Update, Insert or Delete operation, the function returns an object of bound name/value pairs for children of a given DOM element, works with types input[text] input[password] input[hidden] input[checkbox] input[radio] textarea selectwhere the name of the element becomes the column name and the value of the element becomes the new value for the row. |
<static> void
|
purge(<Object> d)
Crockford purge for IE reference breaking. |
<static> Object
|
readCookie(<String> name)
In AJAX applications that consist of many different HTML pages, you can maintain state between pages using cookies to store and retrieve information. |
<static> void
|
removeEvent( obj, type, fn )
Standard cross browser compliant event registry. |
<static> String
|
shareDataModel(<net.nextdb.Connection> conn)
Returns a URL to embed in your app to share your datamodel with the community. |
<static> String
|
shortDateFormat(<Date> date)
Simple utility to format as Dec 16, 2008 8:30 |
<static> void
|
sourceCaptchaImg(<HTMLElement> img, <String> fg, <String> bg)
Pass in an img object reference and this function sources a fresh captcha image from the server. |
<static> Object
|
trim(<object> txt)
Removes trailing spaces from this string. |
<static> Object
|
validateEmail(<Object> email)
Validate email address. |
<static> void
|
visualizeQuery(<Array> rows,<HTMLElement> div)
Uses Google visualization api to render rows from a NextDB Query into sortable table. |
| Constructor Detail |
net.nextdb.Util()
| Method Detail |
<static> void addEvent( obj, type, fn )
<static> void buildForm(args)
<static> void c()
<static> Date convertFromServerDateFormat(<String> serverDateString)
serverDateString -
<static> String convertToServerDateFormat(<Date> pDate)
pDate -
<static> void createCookie(<String> name,<String> value,<Number> days)
name -
value -
days -
<static> void eraseCookie(<String> name)
name -
<static> Object getAbsoluteLeft(obj)
<static> Object getAbsoluteTop(obj)
<static> void inspect(<object> n)
n -
<static> Boolean isServerDateFormat(d)
dateString -
<static> void p(<Object> txt, level)
txt -
<static> Object parseForm(<Object> domNode)
input[text] input[password] input[hidden] input[checkbox] input[radio] textarea selectdomNode - any dom node with parseable child nodes of type input[text] input[password] input[hidden] input[checkbox] input[radio] textarea select
<static> void purge(<Object> d)
d -
<static> Object readCookie(<String> name)
name -
<static> void removeEvent( obj, type, fn )
<static> String shareDataModel(<net.nextdb.Connection> conn)
conn -
<static> String shortDateFormat(<Date> date)
date -
<static> void sourceCaptchaImg(<HTMLElement> img, <String> fg, <String> bg)
img - to source as the captcha.
fg - foreground color
bg - background color
<static> Object trim(<object> txt)
txt -
<static> Object validateEmail(<Object> email)
email -
<static> void visualizeQuery(<Array> rows,<HTMLElement> div)
rows - from the NextDB.net Query
div - to place the table into the page.
|
NextDB.net | ||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||