Skip to main content
August 30, 2011
Question

passing url variables, url stops at first &

  • August 30, 2011
  • 1 reply
  • 735 views

We are making a url in a string and putting it in a form tag a lot like this

<cfset a='http://a/b/c?x=3&y=02'>

<cfoutput>

   <form action="#a#"method="get">

       etc

   </form>

</cfoutput>

the url in the browser address box stops at the 1st ampersand in the url string

***how can we fix this?

it is an emergency

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    August 30, 2011

    I don't typically do this, but I think that using form GET instead of post

    is going to overwrite the URL vars in the action with the new variables of

    your form fields.

    Put the URL variables in the form or use post.

    August 30, 2011

    Me too, pass form elems and method is post. This situation I have to use method of get though, no control over situation. It's not an emergency anymore since the urls passed ok as links instead of buttons. Hope to have as buttons later. Thank you for answering and for advice.