[ASP/VBscript] Preserve querystring in "get" form ?

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default [ASP/VBscript] Preserve querystring in "get" form ?

    Maybe a stupid question, but how can I preserve an existing querystring when using the "get" method to process the form.

    When using "post" the current querystring is automatically preserved, but when using "get" the current querystring gets replaced with the values of the form fields. So the form fields are not added to the querystring, but instead replace the original.

    --
    Marja Ribbers-de Vroed

    Company website:
    [url]www.webwaresystems.nl[/url]
    Dreamweaver extensions:
    [url]www.flevooware.nl/dreamweaver/[/url]


    Marja Ribbers Guest

  2. Similar Questions and Discussions

    1. How to replace first and last "," in a string in asp vbscript?
      How can I replace first as well as last "," in a string? Mystring = ",3,2,5,6,1,65,22," I would like CorrectedString = "3,2,5,6,1,65,22" I...
    2. querystring problem after using header("Location:xxx")
      On "page1.php?aaa=1" I do a redirect to remove the variables in the querystring that I don't need anymore: header("Location: page1.php?bbb=1") ;...
    3. Acrobat Form Submit error: changes VALUE="true" to "0"
      I wrote an HTML page with a form. In the form I had many inputs as in: <INPUT TYPE="radio" NAME="Q1" VALUE="true"> and <INPUT TYPE="radio"...
    4. #25366 [NEW]: form buttons of type "image" dont send "submit" $_POST variable in IE
      From: jordanolsommer at imap dot cc Operating system: Windows XP PHP version: 4.3.2 PHP Bug Type: Variables related Bug...
    5. Request.Form("Field Name") Versus Request.QueryString("Field Name")
      I want to know what's the differences between Request.Form("Field Name") and Request.QueryString("Field Name") OR they function exactly the...
  3. #2

    Default Re: [ASP/VBscript] Preserve querystring in "get" form ?

    Use a hidden box. eg

    <input type="hidden" name="foo" value="<%=Request.Querystring("foo")%>"/>

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004


    Julian Roberts Guest

  4. #3

    Default Re: [ASP/VBscript] Preserve querystring in "get" form ?

    Hi Jules,

    Yes, I thought about that.
    But the querystring is not the same for all pages and I've created a generic way of handling most pages in my CMS.
    So I would need a generic way of preserving the current querystring on all pages as well.

    --
    Marja Ribbers-de Vroed

    Company website:
    [url]www.webwaresystems.nl[/url]
    Dreamweaver extensions:
    [url]www.flevooware.nl/dreamweaver/[/url]


    "Julian Roberts" <newsg@charon.co.uk> wrote in message news:d14e71$5lv$1@forums.macromedia.com...
    > Use a hidden box. eg
    >
    > <input type="hidden" name="foo" value="<%=Request.Querystring("foo")%>"/>
    >
    > --
    > Jules
    > [url]http://www.charon.co.uk/charoncart[/url]
    > Charon Cart 3
    > Shopping Cart Extension for Dreamweaver MX/MX 2004
    >
    >
    Marja Ribbers Guest

  5. #4

    Default Re: [ASP/VBscript] Preserve querystring in "get" form ?

    You could create a generic routine to loop through the Querystring
    collection and write out the values as hidden boxes:

    <%
    Sub PreserveQuerystring
    for each fld in Request.Querystring
    Response.Write "<input type=""hidden"" name="""& fld & """ value=""" &
    Request.Querystring(fld) & """/>"
    next
    End Sub
    %>

    and call it thus

    <%Call PreserveQuerystring%>

    inside the form.

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004


    Julian Roberts Guest

  6. #5

    Default Re: [ASP/VBscript] Preserve querystring in "get" form ?

    Yes, that's a possibility. Thanks.

    --
    Marja Ribbers-de Vroed

    Company website:
    [url]www.webwaresystems.nl[/url]
    Dreamweaver extensions:
    [url]www.flevooware.nl/dreamweaver/[/url]


    "Julian Roberts" <newsg@charon.co.uk> wrote in message news:d14mi6$jlj$1@forums.macromedia.com...
    > You could create a generic routine to loop through the Querystring
    > collection and write out the values as hidden boxes:
    >
    > <%
    > Sub PreserveQuerystring
    > for each fld in Request.Querystring
    > Response.Write "<input type=""hidden"" name="""& fld & """ value=""" &
    > Request.Querystring(fld) & """/>"
    > next
    > End Sub
    > %>
    >
    > and call it thus
    >
    > <%Call PreserveQuerystring%>
    >
    > inside the form.
    >
    > --
    > Jules
    > [url]http://www.charon.co.uk/charoncart[/url]
    > Charon Cart 3
    > Shopping Cart Extension for Dreamweaver MX/MX 2004
    >
    >
    Marja Ribbers Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139