XTIPS

Tips Mail Tools
GuestBook Link Exchange
Home Page

NEW XT FUNCTIONS RELEASED

Povilas has released several NEW Xt functions that can be used from xhtml/html and wml the most complex is handling of HTTP GET arguments and is covered in a fairly technical posting on xtboard to read this click HEREThe others are a countdown generator and a random number generator a function to return the current url and a function to return the referer url
_____
XT COUNTDOWN
function format
_____

<xt id="countdown" format="format" from="now 1" to="now 2"/>


_____
format=years months days hours minutes or seconds
now 1andnow 2= yesterday today tomorrow or a date in mm//dd/yy/ or dd month yy form or a time hh:mm:ss and it seems just about any way you can describe a date or time! The parser also understands timezone names ie. BST PST UTC etc and things like "last tuesday"! SO IF IN DOUBT TRY IT IT MIGHT WORK!
for the technical explaination see HERE (full web site) or HERE (via google transcoder)
_____
EXAMPLES
<xt id="countdown" format="days" from="now" to="25th december"/>

THERE ARE 300 DAYS TILL CHRISTMAS

_____
<xt id="countdown" format="seconds" from="12:05 pm 23rd june 1960" to="now"/>

I HAVE BEEN ALIVE FOR 2041180057 SECONDS


_____
RANDOM NUMBERS
_____
FUNCTION FORMAT
<xt:random from="val1" to="val2"/>
_____
The function will produce a random number between val1 and val2 inclusive
_____
Due to the way the function is cached multiple calls on one page using the same input values will produce the same output.

<xt:random from="0" to="1000000"/> =992487

<xt:random from="0" to="1000000"/> =992487

To cure this add another operator/argument pair the name can be anything I chose X

<xt:random from="0" to="1000000" x="1"/> =455242

Change the value of x to change the output.

<xt:random from="0" to="1000000" x="2"/> =52719

The value of x can be almost anything.

<xt:random from="0" to="1000000" x="aardvark"/> =523971

You can also retrieve values used on the same page by using the same values for x

x="1" =455242
x="2" =455242
x="aardvark" =523971


Function to return the current url
This XTfunction has 3 outputs
<xt id="url"/>
http://theoldmans.madpath.com/xtra
<xt id="url" type="path" />
/xtra
<xt id="url" type="domain" />
theoldmans.madpath.com
function to return the referer url
This function is browser dependant
Local="y" only local urls are returned . This can be omited if not required
Default="http://default url" the default url for non supporting browsers or the page is accessed from the address bar or for off site referer when local is set
<xt id="referer" local="y" default="http://DEFAULT"/>
USE AS A BACK BUTTON
This is the code of the back button on this site
Random Partner

BACK

©2009 - 2025Theoldman
JOIN XTBOARD
X T B O A R D
THE MOBILE WORLD IS
X T G E M