Knock knock knocking on heaven's door...
Ok I'm going to explain just a little bit on how you can split your location url into seperate sets of data which you will be able to access easily...
Well this code will split your url into an array, which you can access easily from 1 variable:
<script type="text/javascript">
if(location.href.match(/http:\/\/(.*)/i)){
data = RegExp.$1.split(/\//i);
}
alert(data[0]);
</script>
Here we are just basically splitting the url into an array of separate pieces. Which would alert the first separate set of your location.
If we were to use your example of "
http://phantom-designs.net/index.php?showuser=331/marketplace/id/wow" this is how the code would work:
The variable
data in the above code now contains each section of the url but split up, you can access each of these different sets by giving the variable a specific number like so:
Saying data[
0] would output the section of your location of "phantom-designs.net"
Saying data[
3] would output the section of your location of "id"
So basically the url would virtually look like this:
"
http://data[ 0]/data[1]/data[2]/data[3]/data[4]"
Using any of those would output what you have chosen in the set. Anything else added to that existing url would just extend those numbers by 1 each time.
