Posts that jimmydu3 is monitoring

Subscribe to Posts that jimmydu3 is monitoring 1 post found

Apr 16, 2007
vOidSenses 109 posts

Topic: rewrite a link?

var link1 = origlink.replace(/(.+)passage=(.+)\%3b(.+)/,"$1passage=$2");
var link2 = origlink.replace(/(.+)passage=(.+)\%3b(.+)/,"$1passage=$3");

this is not the script that you want but it can be what you are looking for, this takes string (that you must get using your code) that contains the original link, then it creates two more vars using the replace method, which is looking for different parts of the link, i think it's self explanatory, take a look, if it doesn't work it might be because of the url-encoding characters, %3d is in fact a ;

look here for more info http://www.w3schools.com/tags/ref_urlencode.asp