Code
function QueryString(path)
{
this.path = path;
this.toString = function()
{
result = this.path + "?";
for(element in this)
{
if(typeof this[element] != 'function' && element != 'path')
{
result += element + "=" + this[element] + "&";
}
}
return result;
}
this.toLink = function(text)
{
return "<a href=\"" + this.toString() + "\">" + text + "</a>";
}
}
myObj = new QueryString("http://codebehind.dk");
myObj.w = 100;
myObj.rx = 1000;
myObj.ry = 1000;
...
...
document.writeln(myObj.toLink("codebehind.dk"));
