// Get URL parameters
// Return a specialized Param Value
Function geturlparameters (paramname)
{
Try
{
VaR Surl = (registry.doc ument. url. tostring ());
// Alert (Surl );
If (Surl. indexof ("? ")> 0)
{
VaR arrparams = Surl. Split ("? ");
VaR arrurlparams = arrparams [1]. Split ("&");
VaR arrparamnames = new array (arrurlparams. Length );
VaR arrparamvalues = new array (arrurlparams. Length );
VaR I = 0;
For (I = 0; I <arrurlparams. length; I ++)
{
VaR sparam = arrurlparams [I]. Split ("= ");
Arrparamnames [I] = sparam [0];
If (sparam [1]! = "")
Arrparamvalues [I] = Unescape (sparam [1]);
Else
Arrparamvalues [I] = "undefined ";
}
For (I = 0; I <arrurlparams. length; I ++)
{
// Alert (arrparamnames [I] + "=" + arrparamvalues [I]);
If (arrparamnames [I] = paramname. tostring ())
{
Return arrparamvalues [I];
}
}
}
Else
{
Return "undefined ";
}
}
Catch (E)
{
Return NULL;
}
}
// Transfer XML by URL parameters
// Location. href = "frmpenaltyinvoice. aspx? PID = create & xml = "+ escape (XML );
// By URL string // var xml = geturlparameters ("XML"); // This having max parameter size limited // with browser (ie, Firefox ...)