' ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ' Copyright (c) 2001 James P. MacLennan All Rights Reserved ' Questions? Comments? Suggestions? Let me know ... www.cazh1.com ' This program is free software; you can redistribute it and/or modify ' it under the terms of the GNU General Public License as published by ' the Free Software Foundation; either version 2 of the License, or ' (at your option) any later version. ' ' This program is distributed in the hope that it will be useful, ' but WITHOUT ANY WARRANTY; without even the implied warranty of ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ' GNU General Public License for more details. ' ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- function WriteParameter(sTheOneIWant) ' Returns a query string parameter by name Dim sURL Dim aURLParms Dim sParmName Dim sParmValue Dim sReturnValue ' Get the incoming parameters sURL = Request.ServerVariables("QUERY_STRING") ' Split it up into separate parameters aURLParms = split(sURL, "&") ' Loop through that array, looking for the name sReturnValue = ">>" & sParamName & "<< not found in the URL " for x = 1 to ubound(aURLParms) i = instr(aURLParms(x), "=") j = len(aURLParms(x)) sParmName = left(aURLParms(x), i - 1) sParmName = Replace(sParmName , "%20", " ") sParmValue = right(aURLParms(x), j - i) sParmValue = Replace(sParmValue , "%20", " ") if sParmName = sTheOneIWant then sReturnValue = sParmValue x = ubound(aURLParms) end if next Response.Write sReturnValue end function