Skip to main content
Participating Frequently
February 25, 2009
Question

Deleting URL Parameters

  • February 25, 2009
  • 4 replies
  • 511 views
Hey,
I have a number of drill-down pages that pass URL parameters to get the relevant detail for the previous page. The only trouble is this leads to a long URL path of parameters. Is there any way I can remove them as you drill down?
This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Inspiring
February 25, 2009
kliq316 wrote:
> Hey,
> I have a number of drill-down pages that pass URL parameters to get the
> relevant detail for the previous page. The only trouble is this leads to a long
> URL path of parameters. Is there any way I can remove them as you drill down?

One other thing to consider, if it works, why does the length of the URL path really matter?

--
Danilo Celic
| http://blog.extensioneering.com/
| WebAssist Extensioneer
| Adobe Community Expert
kliq316Author
Participating Frequently
February 26, 2009
Here's the code: (I can't leave it as it is, as when i submit an update record to diverts to the summary page, still carrying the addressID, so if you click on another ID it doesn't work).

It's the lngAddressID that I don't want to carry over.

' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "address.asp"
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)
End If
End If
%>
Inspiring
February 25, 2009
kliq316 wrote:
> Hey,
> I have a number of drill-down pages that pass URL parameters to get the
> relevant detail for the previous page. The only trouble is this leads to a long
> URL path of parameters. Is there any way I can remove them as you drill down?

It will depend on how you have your links set up, but all you should need to do is to pass along only the query string parameters that you want to pass along, and not the entire query string. Please post a link to your page and someone might be able to suggest a better way to do this in your specific case.

A PHP example to only pass along a query string parameter named "ID":
<a href="detail.php?ID=<?php (isset($_GET['ID'])?$_GET['ID']:'') ?>" >View item</a>

The link code would be a little bit different depending on the source of the ID value, such as from a recordset or session variable, but the concept is the same.

--
Danilo Celic
| http://blog.extensioneering.com/
| WebAssist Extensioneer
| Adobe Community Expert