You'll want to create a variable like so:
code:
var idnumber = "2";
(obviously you'll want to set that variable only when you select the id number. Now when you do that, you'll want to take the part where you open the url, and add idnumber to it, like this:
code:
"www.game.com/profileview.php?ID=" + idnumber;