Posted
over 13 years
ago
by
Glen
This routine is strange in that it reads as if it should accept an array yet it returns an object. JS does not guarantee maintaining the order of elements of an object, and while it may work on some browsers, it should not be relied on. So it is
|
Posted
over 13 years
ago
by
austin
base64_encode mangles utf8 binary data this line:
data = this.utf8_encode(data + '');
if the string is already utf8 it encodes it MORE and the resulting binary is unintelligible.
a fix i used for this is:
if(!isutf8)
{
data =
|
Posted
over 13 years
ago
by
Hans Henrik
this code isn't even close to complete.
like
æ=æ
ø=ø
å=å
Æ=Æ
Ø=Ø
Å=Å
and there's lots of others missing 2 :p
|
Posted
over 13 years
ago
by
Nitin Balsaraf
How can i include Validation.php file in javascript and also have to call validate( with some parameters) function from javascript. I have to pass parameters from javascript to validate function.
How to do this please suggest me?????
|
Posted
over 13 years
ago
by
JosmogyfugHof
|
Posted
over 13 years
ago
by
Martins
this function breaks ¹ ² ³ symbols
|
Posted
over 13 years
ago
by
Tim Younger
blast, i tried to solve it concisely without needing to loop twice. this one actually works though:
if (arr instanceof Array) { var retArr = []; for(k in retObj) {retArr.push(retObj[k])}; return retArr; }
|
Posted
over 13 years
ago
by
Tim Younger
might want to return an array if param was an array. i'm sure there is a more secure way to evaluate if the param was an array, but is_array is overkill for native support.
if ('number'==typeof arr.length && isFinite(arr.length)) {return Array.prototype.slice.call(retObj);}
|
Posted
over 13 years
ago
by
friv 4 school
Nice share. Thanks a lots.
|
Posted
over 13 years
ago
by
Conix Inc
i want to use it
|