now i'm exploring json. storing this url for future reference:
http://www.learn-ajax-tutorial.com/Json.cfm
http://www.w3schools.com/jsref/jsref_encodeuricomponent.asp
http://www.php.net/manual/en/function.json-decode.php
Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts
Monday, November 28, 2011
Sunday, October 16, 2011
Javascript (remove character outside bracket)
i want to extract some information from text
for example. My Name Is Abu (19) years old
final output is 19
searching thru i found this code
this is near but cannot add spaces or bracket on regex search
finally i remove space using this code
reference: http://lawrence.ecorp.net/inet/samples/regexp-format.php
for example. My Name Is Abu (19) years old
final output is 19
searching thru i found this code
pattern = /([a-z]+)([0-9]+)([A-Z]+)([0-9]+)/;
subject = 'test1234TEST1234';
matches = subject.match(pattern);
match1 = matches[1];
match2 = matches[2];
match3 = matches[3];
match4 = matches[4];
alert(match1);
alert(match2);
alert(match3);
alert(match4);
this is near but cannot add spaces or bracket on regex search
finally i remove space using this code
bb = "AAA AAA AAA(asdasd0 )asdasd asdasd";alert(bb.replace(/[\(\) ]/g,""));
reference: http://lawrence.ecorp.net/inet/samples/regexp-format.php
Sunday, December 27, 2009
Memasukkan colum ke dalam table menggunakan javascript
Tujuan : Memasukkan kolum baru ke dalam table menggunakan javascript.
<table width="800" border="1" id="jadual">
<tr><td> </td></tr></table><script>// Memasukkan hello world ke dalam table jadual// By apis17function insert_column(){try {var jadual = document.getElementById("jadual");var baris = jadual.insertRow(0);var kotak = baris.insertCell(0);kotak.innerHTML = "Hello world!";}catch (ex) {// mengesan javascript erroralert(ex);}}</script><label><input onClick="javascript:insert_column();" type="submit" name="button" id="button" value="Submit"></label>
Sunday, June 05, 2005
sending SMS via internet
i spend much time to set word counter under my sms web here.
Error: this.form has no properties (using firefox javascript console)
Error: Object required (using ie6 browser)
Code: 0
solution:
* forgot to place <form.... > </form> opening tags for textarea options.
finally my sms word counter working normally :)
Error: this.form has no properties (using firefox javascript console)
Error: Object required (using ie6 browser)
Code: 0
solution:
* forgot to place <form.... > </form> opening tags for textarea options.
finally my sms word counter working normally :)
Friday, May 27, 2005
md5 cryptography..
this is great! you can generate md5 secure hash function with javascript
http://pajhome.org.uk/crypt/md5/md5src.html
http://apis17.serveftp.com/experiment/
http://pajhome.org.uk/crypt/md5/md5src.html
http://apis17.serveftp.com/experiment/
Subscribe to:
Posts (Atom)