Skip to main content
May 18, 2012
Answered

Remove url parameter

  • May 18, 2012
  • 1 reply
  • 2681 views

Hi All,

I have a page it contains some url parameters. When I submit this page, url parameters will also be submitted.

After submission, action page encounters some error because of isDefined("url.XXX").

Therefore, is it possible to remove "url.XXX" in action page so that isDefined("url.XXX") will remain return false?

    This topic has been closed for replies.
    Correct answer Adam Cameron.

    If you don't want things in the URL scope... don't pass parameters in the query string.

    Or alter your logic from simply:

    isDefined("URL.XXX")

    to include the additional criteria that you wish to consider, eg:

    if (!someCriteriaThatMakesTheURlParamIrrelevant){

         if (isDefined("URL.XXX")){

              // some stuff

         }

    }else{

         // some other stuff

    }

    NB: isDefined() is a bit of a legacy and someonwhat imprecise function.  You're better off using structKeyExists().

    --

    Adam

    1 reply

    Adam Cameron.Correct answer
    Inspiring
    May 18, 2012

    If you don't want things in the URL scope... don't pass parameters in the query string.

    Or alter your logic from simply:

    isDefined("URL.XXX")

    to include the additional criteria that you wish to consider, eg:

    if (!someCriteriaThatMakesTheURlParamIrrelevant){

         if (isDefined("URL.XXX")){

              // some stuff

         }

    }else{

         // some other stuff

    }

    NB: isDefined() is a bit of a legacy and someonwhat imprecise function.  You're better off using structKeyExists().

    --

    Adam

    May 21, 2012

    Spend much time on solving it. Finally, I can remove the parameter in query string successfully.