| 1 |
Revision history for Perl module CGI::Perljax |
| 2 |
|
| 3 |
0.707 (154) | Jan Franczak | 2008-10-07 |
| 4 |
|
| 5 |
Fixed an issue in the declaration of the javascript cache variable as a |
| 6 |
local variable in the exported methods. This was causing NO_CACHE to |
| 7 |
never generate the pjxrand in the query string. |
| 8 |
|
| 9 |
Changed the code so that cache is set as a global javascript variable. |
| 10 |
|
| 11 |
Thanks to Shivanandham Karunanithi for identifying this. |
| 12 |
|
| 13 |
0.706 (153) | Shibi Ns | 2008-09-04 |
| 14 |
|
| 15 |
Wrongly coded one line of code for the fix 0.705 |
| 16 |
|
| 17 |
Changed this: |
| 18 |
|
| 19 |
# return '' if $cgi->isa('header') || $cgi->isa('header_type') ; |
| 20 |
|
| 21 |
To this: |
| 22 |
|
| 23 |
# return '' if $cgi->isa('CGI') || $cgi->isa('CGI::Application') ; |
| 24 |
|
| 25 |
0.705 (152) | Shibi Ns | 2008-08-26 |
| 26 |
|
| 27 |
Changed function call from "can" to "isa" in order this to work with new |
| 28 |
version of CGI 3.37. CGI 3.37 has overloaded the function "can" which causes |
| 29 |
some of the functions to fail. |
| 30 |
|
| 31 |
0.703 (150) | Jan Franczak | 2008-08-20 |
| 32 |
|
| 33 |
Added support for CACHE() which allows default behaviour of disabling page |
| 34 |
cache. |
| 35 |
|
| 36 |
Added fname() support to allow the names of exported functions to be |
| 37 |
specified. |
| 38 |
|
| 39 |
Added skip_header support to prevent two headers being produced for |
| 40 |
applications producing their own headers. |
| 41 |
|
| 42 |
Two new test scripts. |
| 43 |
|
| 44 |
0.701 (141) | bpederse | 2007-01-30 |
| 45 |
|
| 46 |
added short docs about: |
| 47 |
|
| 48 |
onclick=jsfunc([{args:42}],['resultdiv']) |
| 49 |
as an alternative to: |
| 50 |
onclick=jsfunc(['args__42'],['resultdiv']) |
| 51 |
|
| 52 |
added fix for split |
| 53 |
|
| 54 |
made changes from Peter Gordon for CGI::Application |
| 55 |
and added 3 of his test scripts which are 1:1 mappings |
| 56 |
of our test cases. |
| 57 |
|
| 58 |
added changes to getval by Kyraha |
| 59 |
|
| 60 |
always show error regardless of debug level if |
| 61 |
$@ is filled after eval {} |
| 62 |
|
| 63 |
---- OLDER UPDATES BELOW --- |
| 64 |
|
| 65 |
.26 Fri Aug 26 08:07:24 2005 |
| 66 |
original version; created by ExtUtils::ModuleMaker 0.36 |
| 67 |
|
| 68 |
.27 |
| 69 |
removed Perljax.pm |
| 70 |
|
| 71 |
|
| 72 |
.28 2005-09-07 10:14:54 Wed, 07 Sep 2005 |
| 73 |
the user can now send in static parameters on the function call: |
| 74 |
the fnargs has been renamed to 'args' |
| 75 |
the user can use a parameter as : |
| 76 |
onclick=(['args__1234','div'],['result']) |
| 77 |
which will form the url &args=1234&args=valueindiv |
| 78 |
can also rename parameters via: |
| 79 |
onclick=(['parname__'+getVal('div')],['result']) |
| 80 |
which will for the url: &parname=valueindiv |
| 81 |
this is useful for sending to outside scripts which may not use 'args' |
| 82 |
as the cgi parameter name. |
| 83 |
renamed getElem to getVal |
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
.32 2005-09-08 14:49:29 Thu, 08 Sep 2005 |
| 88 |
the url will now be appended to |
| 89 |
so if get parameters are on the initial url, they can be used in the |
| 90 |
registered ajax function |
| 91 |
Lot's of documentation and some code restructures. |
| 92 |
Set CPAN version to 0.32 |
| 93 |
|
| 94 |
|
| 95 |
.37 2005-09-12 10:41:13 Mon, 12 Sep 2005 |
| 96 |
changed perldoc some. |
| 97 |
Added newline/space compresson to show_common_js(). |
| 98 |
Fixed anonymous javascript functions to have semicolons after |
| 99 |
definition. |
| 100 |
Added JSDEBUG triggered compression of user-exported javascript |
| 101 |
wrapper functions. If JSBEDUG is on, the don't compress, otherwise |
| 102 |
compress |
| 103 |
Incremented CPAN version to 0.37 |
| 104 |
|
| 105 |
.43 2005-09-22 09:00:09 Thu, 22 Sep 2005 |
| 106 |
Fixed missing space in a javascript warning message when an HTML |
| 107 |
element id wasn't defined. |
| 108 |
Fixed bug in js code to support 'textarea' fields as well as 'test' |
| 109 |
can now use POST variables!! no url limit |
| 110 |
can take POST variables, previous addition was still broken. |
| 111 |
updated POST methods in javascript |
| 112 |
incremented version string to .43 - POD touchups |
| 113 |
added new example showing multiple returns to a page |
| 114 |
(pjx_manyret.pl, in scripts/ dir) |
| 115 |
|
| 116 |
.46 2005-09-28 14:10:08 -0700 Wed, 28 Sep 2005 |
| 117 |
Added a new example script to show using select boxes, which change |
| 118 |
the value of other select boxes based on what was selected. |
| 119 |
|
| 120 |
.47 2005-09-28 16:49:31 -0700 Wed, 28 Sep 2005 |
| 121 |
added support for multiple select boxes after bug report from |
| 122 |
aztecpawn on sourceforge.net. Now the common javascript will return |
| 123 |
an array of values if there was a multiple selection in a select box |
| 124 |
|
| 125 |
.49 2005-09-29 08:36:37 -0700 Thu, 29 Sep 2005 |
| 126 |
Fixed broken fnsplit so it wouldn't split strings. Restructured |
| 127 |
javascript code for spaces and indents. Need to give Brent my |
| 128 |
vimrc to prevent real tab chars from coming through. Removed |
| 129 |
all tab chars and replaced with spaces. Made lots of changes |
| 130 |
to pjx_combo.pl to better document and organize the html layout. |
| 131 |
|
| 132 |
.52 2005-10-05 11:14:27 -0700 Wed, 05 Oct 2005 |
| 133 |
|
| 134 |
Complete rewrite of POD documentation and expansion of documentation. |
| 135 |
Added heretofore undocumented capability of sending POST instead of |
| 136 |
the default GET. |
| 137 |
|
| 138 |
.55 2005-10-07 09:33:28 -0700 Fri, 07 Oct 2005 |
| 139 |
|
| 140 |
Can now chain functions; ajax[] array holds pjx objects, so pjx |
| 141 |
objects don't keep overwriting themselves. |
| 142 |
Cleaned up javascript custom function code. |
| 143 |
|
| 144 |
.56 2005-10-07 10:35:33 -0700 Fri, 07 Oct 2005 |
| 145 |
|
| 146 |
Changed debugging output for javascript to show multiple URLs is |
| 147 |
there are chained commands. |
| 148 |
Fixed a bug introduced in .55 that broke IE browsers - IE doesn't |
| 149 |
support onload, so switched back to onreadystatechange. |
| 150 |
|
| 151 |
.57 2005-10-10 09:24:37 -0700 Mon, 10 Oct 2005 |
| 152 |
|
| 153 |
Added radio to scripts directory; |
| 154 |
Added ability to handle radios; |
| 155 |
Fixed ghr so it only checks once on page load and returns a closure |
| 156 |
of the correct xmlhttp/activeX request object |
| 157 |
Changed name of 'radio.pl' to 'pjx_radio.pl' |
| 158 |
Version to .58 |
| 159 |
|
| 160 |
.59 2005-10-10 09:35:49 -0700 Mon, 10 Oct 2005 |
| 161 |
|
| 162 |
Version incremented to .59. Modified Changes and MANIFEST. Modified |
| 163 |
output of pjx_radio.pl. |
| 164 |
fix docs in pjx_radio |
| 165 |
Fixed bug reported by anonymous on SF about encodeURIComponent |
| 166 |
encoding '='. Problem was parens were mislocated. |
| 167 |
|
| 168 |
.591 |
| 169 |
fixed .59 bug that didn't fix the encodeURIComponent bug |
| 170 |
|
| 171 |
.60 2005-10-17 12:45:31 -0700 Mon, 17 Oct 2005 |
| 172 |
Fixed problem with javascript in make_function() where sep variable |
| 173 |
was getting overwritten if the processed url contained a '?'. |
| 174 |
Thanks to pavfed98 for identifying this - reported via rt.cpan.org. |
| 175 |
|
| 176 |
Added scripts/pjx_url.pl and scripts/convert_degrees.pl to scripts. |
| 177 |
These were needed to properly test the make_function handling of |
| 178 |
outside URLs (related to above bug). |
| 179 |
|
| 180 |
Added support to pass in additional information to build_html() |
| 181 |
function that gets sent directly to the cgi objects header() call. |
| 182 |
This allows for custom HTML header information to get sent to the |
| 183 |
pages generated in the CGI::Ajax system. Thanks to Jesper Dalberg |
| 184 |
for suggesting this. |
| 185 |
|
| 186 |
Modifiedcorrected docs. |
| 187 |
|
| 188 |
Updated to version 0.60 |
| 189 |
|
| 190 |
.64 2005-10-27 09:45 -0700 Thu, 27 Oct 2005 |
| 191 |
Fixed cross-site scripting vulnerability identified in the <=0.60 |
| 192 |
versions. All users of CGI::Ajax should upgrade asap! If a browser |
| 193 |
submits a request for a CGI::Ajax page that contains a function that |
| 194 |
doesn't exist, a status 400 Bad Request is returned. Additionally, |
| 195 |
STDERR gets some output about this event with a "SECURITY" tag, just |
| 196 |
in case. Thanks to krusch for catching this! |
| 197 |
|
| 198 |
Changed how CGI extra header parameters are passed into the CGI |
| 199 |
object. Now all parameters destined to CGI->header() are added as a |
| 200 |
hashref to the CGI::Ajax->build_html() method, like this for example |
| 201 |
|
| 202 |
$pjx->build_html( $cgi, \&Show_HTML, {-charset=>'UTF-8'} ); |
| 203 |
|
| 204 |
Any pre-0.64 CGI::Ajax script that passed in extra header |
| 205 |
information to the CGI object will be updating. |
| 206 |
|
| 207 |
Modified/corrected docs to explain the above change. |
| 208 |
|
| 209 |
Fixed up javascript code to make all loop variables local. Thanks |
| 210 |
to Mingyi Lui. |
| 211 |
|
| 212 |
.641 2005-10-27 12:54 -0700 Thu, 27 Oct 2005 |
| 213 |
Pod documentations fixups. |
| 214 |
|
| 215 |
Changed fnsplit to better support multiple selects (thanks Mingyi |
| 216 |
Lui) |
| 217 |
|
| 218 |
------------------------------------------------------------------------ |
| 219 |
.65 2005-10-27 12:55 -0700 Thu, 27 Oct 2005 |
| 220 |
|
| 221 |
pod typo corrections |
| 222 |
|
| 223 |
changed javascript fnsplit to better support multiple-selects styles |
| 224 |
|
| 225 |
add pjx_callback.pl to demonstrate the use of a callback function. |
| 226 |
this required a fix in the Ajax.pm code |
| 227 |
|
| 228 |
Fixed up synopsis example POD. |
| 229 |
|
| 230 |
.651 2005-11-02 07:32 -0800 Wed, 02 Nov 2005 |
| 231 |
|
| 232 |
added support for hidden fields. |
| 233 |
|
| 234 |
.652 2005-11-03 13:41 -0800 |
| 235 |
|
| 236 |
fixed type in javascript for handling hidden fields! |
| 237 |
|
| 238 |
updated version and Changes to reflect .652 release |
| 239 |
|
| 240 |
.653 | bcthomas | 2005-11-14 18:42:42 |
| 241 |
|
| 242 |
moved some debugging code around so perl can handle the jdebug |
| 243 |
state. Thanks beanz! |
| 244 |
|
| 245 |
Added a script (pjx_nobuild.pl) to demonstrate not using |
| 246 |
build_html() but to instead handle the various stages of |
| 247 |
the async communication manually. |
| 248 |
|
| 249 |
Fixed up POD |
| 250 |
|
| 251 |
.654 | bcthomas | 2005-11-15 10:38:55 |
| 252 |
|
| 253 |
Added fix for redundant js if test back in. Thanks again beanz |
| 254 |
|
| 255 |
Updated MANIFEST to show new no build_html() script and incremented |
| 256 |
version to 0.654 |
| 257 |
|
| 258 |
0.66 | bcthomas | 2005-11-29 10:22 |
| 259 |
|
| 260 |
POD cleanup/corrections |
| 261 |
|
| 262 |
Added support for other CGI handlers/decoders (like CGI::Simple, |
| 263 |
CGI::Lite, CGI::Minimal, although we can't really test them since we |
| 264 |
are running mod_perl2 only here. |
| 265 |
|
| 266 |
Fixed typo in pjx_url.pl/convert_degrees.pl that was reversing the |
| 267 |
sign on the kelvin degree conversion (thanks Wolfgang Baron!) |
| 268 |
|
| 269 |
Switched home page URL to www.perljax.us |
| 270 |
|
| 271 |
Updated version to 0.66 |
| 272 |
|
| 273 |
0.662 | bcthomas | 2005-12-01 12:15 |
| 274 |
|
| 275 |
POD cleanup/corrections |
| 276 |
|
| 277 |
Added a example script to show proper way to use a javascript |
| 278 |
function to split arguments returned from a perl-exported function. |
| 279 |
scripts/pjx_splitargs.pl |
| 280 |
|
| 281 |
Updated version to 0.662 |
| 282 |
|
| 283 |
0.67 | bcthomas | 2005-12-01 16:29 |
| 284 |
|
| 285 |
reversed quick fix for javascript handling return values from perl |
| 286 |
functions added in 0.662. |
| 287 |
|
| 288 |
now multiple returns to a callback function are handled as |
| 289 |
arguments[0], arguments[1], etc. uses an eval in the javascript |
| 290 |
code, the way it was described in the POD, but wasn't coded. |
| 291 |
|
| 292 |
changed splitargs.pl: added value="" to <input>'s getting the |
| 293 |
return values from the function call to stop weird javascript |
| 294 |
warning |
| 295 |
|
| 296 |
Updated to 0.67 |
| 297 |
|
| 298 |
0.68 | bcthomas | 2005-12-09 11:51:25 |
| 299 |
|
| 300 |
changed splitargs.pl |
| 301 |
|
| 302 |
added value="" to <input>'s getting the return values from the |
| 303 |
function call to stop weird javascript warning |
| 304 |
|
| 305 |
Fixed docs in Ajax.pm to reflect the old way of dealing with arguments |
| 306 |
array in javascript, after brent's fix of this code. Updated changes, |
| 307 |
and MANIFEST. |
| 308 |
|
| 309 |
Added ability to prevent caching (though firefox doesn't seem to cache |
| 310 |
anyway). The keyword is 'NO_CACHE'. |
| 311 |
|
| 312 |
Added to example scripts pjx_NO_CACHE_callee.pl and |
| 313 |
pjx_NO_CACHE_caller.pl, to demonstrate how no caching works. |
| 314 |
|
| 315 |
Fixed IE bug where __pjx____pjx__ doesn't return "" as the second split. |
| 316 |
|
| 317 |
Took a suggestion by 'qbxk' from the perljax.us forums and changed |
| 318 |
the javascript code so only the function names remain the same. |
| 319 |
Also rearranged code for javascript jsdebug() so it cuts down the |
| 320 |
amout of code. Moved getting the script name to Perl code. |
| 321 |
OVerall, these changes result in less repetition in the javascript |
| 322 |
functions. The URL length only includes the script name if it is |
| 323 |
calling itself. |
| 324 |
|
| 325 |
POD cleanup and additions. Added extra level to JSDEBUG to uncompress |
| 326 |
ALL generated javascript. Changed around some js varable names to be |
| 327 |
more understandable. |
| 328 |
|
| 329 |
Corrected several of the demo scripts to not use the original method |
| 330 |
of setting the div id to return results to... |
| 331 |
|
| 332 |
onkeyup=myfunc(['in1'],'out1') |
| 333 |
|
| 334 |
should be.. |
| 335 |
|
| 336 |
onkeyup=myfunc(['in1'],['out1']) |
| 337 |
|
| 338 |
(thanks Jerrod) |
| 339 |
|
| 340 |
Modified Changes and MANIFEST. Changed comments in Todo and README. |
| 341 |
Update version to 0.68 |
| 342 |
|
| 343 |
0.681 | bpederse | 2005-12-12 15:22:32 |
| 344 |
|
| 345 |
fixed the $script regular expression to work on windows; |
| 346 |
|
| 347 |
0.682 | bcthomas | 2006-01-09 09:41 |
| 348 |
|
| 349 |
switched from encodeURIComponent to encodeURI |
| 350 |
|
| 351 |
fixed getVal to have better error checking, plus more inuitive code. |
| 352 |
also, use can now use name= (but getVal still looks for id= first) |
| 353 |
to send in the html element name. all code changes in javascript |
| 354 |
getVal(); This fix should alleviate mistakes where your HTML |
| 355 |
elements don't have an "id" defined, but do have a "name" defined. |
| 356 |
|
| 357 |
Rewrote docs in several areas. Removed gratuitous acks in javascript |
| 358 |
code. |
| 359 |
|
| 360 |
Added documentation about returning multiple arguments from perl to a |
| 361 |
javascript function. |
| 362 |
|
| 363 |
0.683 | bpederse | 2006-01-20 13:27:43 |
| 364 |
|
| 365 |
Add scripts to show the use of JSON objects. |
| 366 |
Fixed radio and multiple-select (slight error); |
| 367 |
Cleaned up fnsplit. |
| 368 |
|
| 369 |
version to 0.683 |
| 370 |
|
| 371 |
0.684 | bpederse | 2006-01-28 |
| 372 |
|
| 373 |
added pjx_loading.pl script. |
| 374 |
|
| 375 |
added function formDump() which returns an array of all form element |
| 376 |
names/ids in the page and sends them to the function: |
| 377 |
|
| 378 |
onclick=jsFunc(formDump(),['out']) |
| 379 |
|
| 380 |
add pjx_formDump.pl to the scripts directory documneting use. |
| 381 |
also changed getVal so that if you send in a function, it will |
| 382 |
return the result of the function, not hte function itself. |
| 383 |
|
| 384 |
also added $() and an alias to getVal() to follow prototype.js |
| 385 |
but, might be a bad idea since even in the HERE delimiters '>>' |
| 386 |
you have to escape the '$'.. |
| 387 |
|
| 388 |
0.69 (105) | bcthomas | 2006-02-16 |
| 389 |
|
| 390 |
fixed typo in pjx_chained.pl |
| 391 |
Updated MANIFEST/Changes for release 0.684 |
| 392 |
|
| 393 |
Added support for spans |
| 394 |
|
| 395 |
Added callback methods in javascript: pjx.prototype.pjxInitialized |
| 396 |
and pjx.prototype.pjxCompleted These methods are called before |
| 397 |
and after, respectively, any xmlhttp request. It was much |
| 398 |
more responsive this way rather than providing a hook into each |
| 399 |
readyState, especially since there is not uniform support for |
| 400 |
the various readyStates in the common browsers. |
| 401 |
|
| 402 |
Changed the pjx_loading.pl script to use the above callbacks, and |
| 403 |
documented it. |
| 404 |
|
| 405 |
Switched from prototype to javascript object notation. This is |
| 406 |
cosmetic, and only changes the way the code looks, not the way it |
| 407 |
functions. |
| 408 |
|
| 409 |
Added the ability to change the encoding that CGI::Ajax uses on input |
| 410 |
elements. The default is encodeURIComponent, but this can be set to |
| 411 |
encode, etc., like so... |
| 412 |
|
| 413 |
$pjx->js_encode_function('escape'); |
| 414 |
|
| 415 |
...where 'escape' can be any of ('escape','encodeURI','encodeURIComponent') |
| 416 |
or a programmer-defined javascript function. |
| 417 |
|
| 418 |
altered MANIFEST to add two new scripts |
| 419 |
scripts/pjx_change_encoding.pl |
| 420 |
scripts/pjx_change_headers.pl |
| 421 |
|
| 422 |
Rearranged Class::Accessor initialization. |
| 423 |
|
| 424 |
|
| 425 |
Fixed select problem mentioned on forums, and changed pjx_formDump.pl as a |
| 426 |
test for that fix. |
| 427 |
|
| 428 |
updated to 0.69 |
| 429 |
|
| 430 |
0.691 (113) | bpederse | 2006-02-19 |
| 431 |
|
| 432 |
fixed decode-ing |
| 433 |
if encoding is 'encode*' , decoding is decode* |
| 434 |
if encoding is escape, decoding is unescape |
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
0.692 (116) | bpederse | 2006-03-08 |
| 439 |
|
| 440 |
Wrapped a rogue debugging comment in an appropriate debugging check. |
| 441 |
|
| 442 |
changed pjx_nobuild to use 'pjxdebugrequest' instead of old |
| 443 |
'__pjxrequest' |
| 444 |
|
| 445 |
version to 0.692 |
| 446 |
|
| 447 |
0.693 (118) | bpederse | 2006-03-16 |
| 448 |
|
| 449 |
- javascript is now inserted at beggining of header, not before |
| 450 |
- the eval in the javascript is gone. replaced by apply. |
| 451 |
- using that apply "this" in a callback will now refer to the |
| 452 |
javascript object. so this.url will give the url of the AJAX request. |
| 453 |
|
| 454 |
0.694 (119) | bcthomas | 2006-03-18 |
| 455 |
|
| 456 |
Added pjx_dynselect.pl to scripts in the dist. This example |
| 457 |
demonstrates the same thing as the pjx_combo.pl example, but it uses a |
| 458 |
simple database to get values, instead of the calling script (as in |
| 459 |
pjx_combo.pl). |
| 460 |
|
| 461 |
fixed all the additional scripts that were missing '<form>' tags. |
| 462 |
|
| 463 |
fixed pjx_combo.pl |
| 464 |
|
| 465 |
for IE compatibility, all options must have a value, for example |
| 466 |
here are the wrong way and the right way for IE... |
| 467 |
|
| 468 |
NO: <option> value </option> |
| 469 |
|
| 470 |
YES: <option value='something'> displayed text </option> |
| 471 |
|
| 472 |
fixed checkboxes - added a check script for them. |
| 473 |
|
| 474 |
updated some indentation in examples |
| 475 |
|
| 476 |
|
| 477 |
0.697 (134) | bpederse | 2006-07-15 |
| 478 |
|
| 479 |
two new demo scripts |
| 480 |
|
| 481 |
can now get input from anything with .innerHTML (pjx_from_span.pl as |
| 482 |
test case). |
| 483 |
|
| 484 |
Changed the default encode function to 'escape' instead of |
| 485 |
'encodeURIComponent'. Hopefully this will alleviate many of the |
| 486 |
problems users are reporting with browser functionality. |
| 487 |
|
| 488 |
|
| 489 |
fixed problem with head/body with arguments (also improved regexp |
| 490 |
speed) |
| 491 |
|
| 492 |
add the ability to send in arguments via javascript objects instead of |
| 493 |
using args__123, now can use {'args':123, 'args':'bcd','test':'the |
| 494 |
value'} |
| 495 |
|
| 496 |
fixed selects. see notes in previous checkin. |
| 497 |
|
| 498 |
added $ENV{SCRIPT_FILENAME} |