Forums
This topic is locked
Dynamic URL redirect
Posted 14 Mar 2007 19:04:02
1
has voted
14 Mar 2007 19:04:02 Bobby Purcella posted:
Hi All. I have read this post and still no joywww.dmxzone.com/forum/topic.asp?topic_id=20992
I am using DW8 and on my update form I want it to go back to the page they came from (Not the same page every time) so on line 3 I put
Dim strPreviousPage
strPreviousPage = Request.ServerVariables("HTTP_REFERER"
response.Write(strPreviousPage)
It showes the correct page -- All is good so far <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
then on line 75
' append the query string to the redirect URL
Dim MM_editRedirectUrl
'MM_editRedirectUrl = "fred.asp"
MM_editRedirectUrl = strPreviousPage
If (Request.QueryString <> "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
'Response.Redirect(MM_editRedirectUrl)
Response.Redirect(strPreviousPage)
End If
End If
When I hit the submit button <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>
ADODB.Command error '800a0d5d'
Application uses a value of the wrong type for the current operation.
Can someone please give me a hand with this?
Thanks
B