Question
Insert record with a page anchor jump on redirect
I'm doing a basic form insert record with a redirect to the
same page. The only reason I have a redirect to the same page is
the form is at the bottom of the page and I want to add an anchor
and direct back down the page. I've been messing around with the DW
code and haven't had any luck getting it to work. Does anyone have
an idea how to redirect to the anchor? Here's the error:
Application uses a value of the wrong type for the current
operation.
Here's how I've been trying it:
Dim MM_editRedirectUrl
MM_editRedirectUrl = "edit.asp"
Dim MM_jump
MM_jump = "anchor=#jumpHere"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString & "#jumpHere"
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString & "#jumpHere"
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
Here's how I've been trying it:
Dim MM_editRedirectUrl
MM_editRedirectUrl = "edit.asp"
Dim MM_jump
MM_jump = "anchor=#jumpHere"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString & "#jumpHere"
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString & "#jumpHere"
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If