Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Artifact ID: | 540d953402a5e1c214ae240c0efa4218e9fc641c |
---|---|
Page Name: | home |
Date: | 2013-10-16 21:36:47 |
Original User: | carlosru |
Mimetype: | text/x-markdown |
Parent: | 8549f76e14817ea6a53e646561727023929ccecd (diff) |
Next | 9079f5c47396bbbe9351ab4193e645a1742b4b2b |
<head>
<style type="text/css">
body { font-family:arial, verdana}
.codigo{ color:#C00000;}
</style>
</head>
<body >
PreprecessorJS
PreprecessorJS is a simple parser to transform simple tokens into <script></script> tags, and rewrites the generated markup,or better said is a kind of preprocessor like php, jsp, asp but using the native javascript as language.
Download : PreprocessorJS Zip File Download : PreprocessorJS tar.gz FileExample:
The default pair of tokens used for preprocessorJS (PJS) are "{?" and "?}" and for assignament {?=(
So for example:
var where="in the wonderland";
?}
<h2>The book is {?=(name);?} {?=(where);?} </h2>
And the tokens are mixed and embeded in a html page, that will be preprocessed loading
the preprocessorJS.js javascript on the load event in the body tag and calling changeIt() function.
<script src="./lib/preprocessorJS.js" type="text/javascript"></script>
</head>
<body onload="changeIt();">
The resulted markup will be something like:
You can also have very simple if-block like this
<p>Some markup..</p>
{? } else { ?};
<p>Other markup...</p>
?}
Finally in this version, you can have just GET parameters comming from a HTML Form.
Using the array parms['parName'] where 'parName' is the parameter corresponding to the
name of the elements in your form.
var name=
var name=params
?}
This is licenced under Apache 2.0
And the repository is a Fossil one on SCM processJS
Please, donate
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="RA782FJ6V3ZE4">
<input type="image" src="https://www.paypalobjects.com/en_US/MX/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
</form>
or contribute to improve it or use it without any warranty, just
in the spirit to have a handy tool that could help!.
This script was developed by carlosru@factware.info , please use Fossil site. To rise bugs, and ask for a user to contribute to the project.