Jasmine Wiki

Navigation

Wiki Home
Installing Framework
Configuring jasmine.php

Database Module
MySQL
Mysqlix
ODBC
MSSQL

Database Objects
Datagrid
Datasource
Repeater
SQLQuery

Files Module
File
FileSystem
FTP
Attachment
ExcelFile

Graphics Module
Color
Image
Graph


Miscellaneous
Classes:
NumbWordter
Email
Poll
Shield
XMLParser

Functions:
General Functions
HTML Functions
Validation Functions
TrackThisPage

 

HTML Functions

HTML Functions
These functions generate HTML tags. Here is the list of functions.

Layout functions
string center(string text_to_be_centered)
Centers text with div tag.
e.g. echo center('This is centered text');

string div(string div_text, [style_info or style_class])
Generates div tag with the text given. The second option, $style, is optional. It should specify the style that will be applicable to the div tag.
e.g. echo div('KSF developed by Krishna Srikanth',"text-align:center;");

Appearance Functions
string para(string para_text, [style_info or style_class])
Generates para tag with the style specified
e.g echo para('This is paragraph text.','paraStyleClass');

string heading(int heading_size, string heading_text)
Generates heading tag.
e.g. echo heading(1,'This is heading 1 tag');

Similarly, strong(), bold(), em(), italic(), sub(), sup(), small() functions take single parameter, i.e. the text to be displayed, and return the string with tags prefixed and suffixed.

pre(mixed content)
This can be used both for pre tag, as well as print_r() function. If the content is string, a string with pre tags will be attached. If the content is array, or some other, print_r() functionality is implemented and output is directly echoed. In the second case, pre tags are prefixed and suffixed automatically.
e.g.
echo pre('This is pre tag');
pre($myArray);

Other Elements
hr(), br() and nl() take no parameters and display horizontal rule, break tag and new line character respectively.
hr() will display
.
br() will display .
nl() will display new line character -- \n.

string hyperlink(string link_text, string link_url, [string link_target])
Displays anchor link. Third parameter is optional.
e.g. echo hyperlink('This is link text', 'linkPage.php', '_blank');

string img(string image_url, [int width, int height, string altText]);
Displays image tag.
e.g. echo img('homePage1.gif', 245, 120, 'This is alt text for image');

Specifying CSS and JS files to include in HTML page
string css (string css_file_url);
e.g. echo css('styles/myStyles.css');

string js (string js_file_url);
e.g. echo js('../scripts/jscripts.js');

Javascript functions
string javascript(string code)
Attaches script (javascript) tag before and after the code.
e.g. echo javascript('document.myForm.myField.focus()');

void alert([string alert_message])
Generates javascript alert with the message passed.
e.g. alert('This is alert message');

Meta Functions
string metaKeywords(string meta_keywords);
e.g. echo metaKeywords('keywords, for, my, web, application');

string metaDescription(string meta_description)
e.g. echo metaDescription('This is the description for my web application.');
(c) 2008 Jasmine Framework. A Creation by Krishna Srikanth.