Hi ,

In my javascript function I am trying to redirect to a page which takes an argument and that argument itself is a url. Hence the entire thing getting mesed up. Please help me how can I pass the url so that it treats it as a argument .

My code is below :



Code:
function createfile ()
{

var currenturl = document.URL;
var link = "http://report.systems.com/cgi-bin/mainscript.pl?url="+currenturl;

window.location.href = link ;

}

FYI, the currenturl here is also an url of following type :
"http://report.systems.com/cgi-bin/monitor.pl?path=/usr/test;"

Please also tell me how can I pass two variables as parameters to a redirection statement , for example , likewise above 'url' argument and its value 'currenturl' , if I also want to pass an argument say 'filter' and its value as a javascript variable 'val' .

Let me clarify , how can I write the following function to pass both url and filter :

Code:
function creatfile ()
{
var currenturl = document.URL;
var val = "yes";
var link = "http://report.systems.com/cgi-bin/mainscript.pl?url="+currenturl"?filter="+val;

window.location.href = link ;

}
thanks.