[jQuery] Re: get param from URL

2009-05-04 Thread Charlie
window.location.search will return "p=item" window.location.hash will return "id=1" simple test in firebug: alert(window.location.hash); gozigo_milis gozigo_milis wrote: Dear all, Can u give me script with jquery how to get URL after # Example : index.php?p=item#id=1 How can

[jQuery] Re: get param from URL

2009-05-04 Thread Charlie
window.location.hash.substring(1); this will take out the "#" sign, Charlie wrote: window.location.search will return "p=item" window.location.hash will return "id=1" simple test in firebug: alert(window.location.hash); gozigo_milis gozigo_milis wrote: Dear all,

[jQuery] Re: GET PARAM FROM URL WITH JQUERY

2009-04-29 Thread Martijn Houtman
On Apr 29, 2009, at 2:45 PM, gozigo_milis gozigo_milis wrote: example : http://www.matrix.com/index.php?p=gallery#page=1 how can I get page=1 (parameter after sign #) window.location.hash

[jQuery] Re: GET PARAM FROM URL WITH JQUERY

2009-04-29 Thread gozigo_milis gozigo_milis
I hava script like thisscript type=text/javascript function get_param_name(){ var regexS = ([\\#][^]*); var regex = new RegExp(regexS); var results = regex.exec(window.location.hash); var ret; if(results == null){ ret = ; }else{ ret=results[0].replace(#,); } return ret; }