& in a string to pass through url param

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

  1. #1

    Default & in a string to pass through url param

    I am trying to add a list/menu in DW2004, and for each option I need to pass
    url paramerters the problem I am having is concantinating & in a string
    example: <option value='<%=(Recordset1.Fields.Item('MLSNum').Value) &amp;
    '&amp;custid=16'%>'><%=(Recordset1.Fields.Item('To ur2Name').Value)%></option>
    It displays jibberish in browser where ever the &amp; or = is in a string.
    Example:
    [url]http://360vegastour.com/vtviewer.asp?mls=460821%26custid%3D16&amp;Submit=V iew[/url]
    Thank You in advance

    TIMLORI Guest

  2. Similar Questions and Discussions

    1. Why can I pass a string, but not a date?
      I have this custom component that at the moment just repeats the passed in value. It works if I pass in a string, but if I pass the date I...
    2. Pass XML string to a URL
      I need to pass a xml string to the URL. and return I will get a XML response. I need to pass the varible in an online form and send the result in...
    3. In true, i need to pass a placeholder by param
      Hi again. I'm wrong in my first message. What I need to do is, render my control in a placeholder passed by param. I try somethings here, by I get...
    4. Passing Param to SQL string
      Thanks Bob, for you help and suggestions and please accept my apologies. Kind Regards Rikesh "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote...
    5. Pass Param to SQL Query
      Hi I'm sure this is very trivial, but I simple don't know how to it? I've got a SQL query but I wish to pass a 'WHERE' clause to it, to filter...
  3. #2

    Default Re: & in a string to pass through url param

    I would build your value up outside of the <option> statement but inside of
    you repeat region like this

    <%
    LinkURL = Recordset1.Fields.Item('MLSNum').Value & "&custid=16"
    %>
    <option
    value='<%=LinkURL%>'><%=(Recordset1.Fields.Item('T our2Name').Value)%></optio
    n>


    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "TIMLORI" <webforumsuser@macromedia.com> wrote in message
    news:cvj2o4$48p$1@forums.macromedia.com...
    > I am trying to add a list/menu in DW2004, and for each option I need to
    pass
    > url paramerters the problem I am having is concantinating &amp; in a
    string
    > example: <option value='<%=(Recordset1.Fields.Item('MLSNum').Value) &amp;
    >
    '&amp;custid=16'%>'><%=(Recordset1.Fields.Item('To ur2Name').Value)%></option
    >
    > It displays jibberish in browser where ever the &amp; or = is in a string.
    > Example:
    >
    [url]http://360vegastour.com/vtviewer.asp?mls=460821%26custid%3D16&amp;Submit=V iew[/url]
    > Thank You in advance
    >

    Paul Whitham TMM Guest

  4. #3

    Default Re: & in a string to pass through url param

    .oO(Paul Whitham TMM)
    >I would build your value up outside of the <option> statement but inside of
    >you repeat region like this
    >
    ><%
    >LinkURL = Recordset1.Fields.Item('MLSNum').Value & "&custid=16"
    Shouldn't that be

    LinkURL = Recordset1.Fields.Item('MLSNum').Value & "&amp;custid=16"
    ^^^^^
    instead?

    Micha
    Michael Fesser Guest

  5. #4

    Default Re: & in a string to pass through url param

    Thanks guys but that didnt do it for some reason the ampersand (&amp;) and the
    equals(=) will not display correctly in browser for passing url paramerters, I
    cant believe Macromedia wouldnt have thought we might want to send more than 1
    param at a time from list/menu, so I know there has to be a way to say in code
    not to recognize &amp; or = as string concantinators but as a string itself, I
    know in VB you would just add like double quotes but I dont know any other
    sujestions are greatly appreciated. Thanks again

    TIMLORI Guest

  6. #5

    Default Re: & in a string to pass through url param

    <option value="<%=Server.URLEncode(Recordset1.Fields.Item( "MLSNum").Value &
    "&custid=16"%>"><%=Recordset1.Fields.Item("Tour2Na me").Value%></option>

    "TIMLORI" <webforumsuser@macromedia.com> wrote in message
    news:cvj2o4$48p$1@forums.macromedia.com...
    > I am trying to add a list/menu in DW2004, and for each option I need to
    pass
    > url paramerters the problem I am having is concantinating &amp; in a
    string
    > example: <option value='<%=(Recordset1.Fields.Item('MLSNum').Value) &amp;
    >
    '&amp;custid=16'%>'><%=(Recordset1.Fields.Item('To ur2Name').Value)%></option
    >
    > It displays jibberish in browser where ever the &amp; or = is in a string.
    > Example:
    >
    [url]http://360vegastour.com/vtviewer.asp?mls=460821%26custid%3D16&amp;Submit=V iew[/url]
    > Thank You in advance
    >

    CMBergin 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