Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server.UrlEncode open in a new window

Status
Not open for further replies.

Lucas68

Programmer
May 9, 2001
14
BR
Hi.
I've been a member for more than 2 years now and I guess this is my first post!
Sorry I couldn't come up with a more challenging one...
Here it goes:
How can I make this script open in a new window?

Response.Redirect("trackclicks.asp?Id=" & CountClick & "&CCT=" & ClicksNow & "&5779=" & CID & "&Url=" & Server.UrlEncode(RedirectTo) & "")

Where RedirectTo = Request("Url")

Here's the whole script:

<%
CountClick = Request(&quot;Id&quot;)
RedirectTo = Request(&quot;Url&quot;)
If CountClick = &quot;&quot; OR RedirectTo = &quot;&quot; Then
Response.Redirect(&quot;404Error.asp&quot;)
Else
Set MyConn=Server.CreateObject(&quot;ADODB.Connection&quot;)
MyConn.Open &quot;DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=&quot; & Server.MapPath(&quot;webbanners.mdb&quot;)
Set RS=Server.CreateObject(&quot;ADODB.RecordSet&quot;)
Query = &quot;SELECT * FROM Clients WHERE AdID=&quot;&CountClick&&quot;&quot;
RS.Open Query, MyConn, 3, 3
ClicksNow = RS(&quot;ClicksNow&quot;)
CID = RS(&quot;CustomerID&quot;)
RS.Close
Set RS = Nothing
MyConn.Close
Set MyConn = Nothing
Response.Redirect(&quot;trackclicks.asp?Id=&quot; & CountClick & &quot;&CCT=&quot; & ClicksNow & &quot;&5779=&quot; & CID & &quot;&Url=&quot; & Server.UrlEncode(RedirectTo) & &quot;&quot;)
End If
%>


Thnx,

Lucas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top