URL variables not recognised because of encoded URL

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default URL variables not recognised because of encoded URL

    Hi all,

    Is there a way to let ColdFusion to recognise URL variables like:
    http:abc.com/index.cfm?id=%3d123%26cat%3dabc

    yitian Guest

  2. Similar Questions and Discussions

    1. Shockplayer 11 not recognised as being installed
      I have just downloaded shockplayer 11 after getting a message on the screen while trying to load one of my daughters games that I need shockplayer....
    2. Contribute not recognised
      Have recently changed PCs and when I go to enable Contribute in Dreamweaver 8, calls for "install v2.0" or later when I have already installed CS3....
    3. Website not found/recognised
      Hi guys, One of my clients has an older version of Contribute (Macromedia, v3) and would like to add to the news page on her site using...
    4. Recognised Web Qualifications
      Hi all, other than the macromedia certifications, do you know of any recognised web design/management certifications out there, i'm talking about...
    5. attribute 'class' not recognised
      Hi I am looking at ASP.NET Community Starter Kit (VBVS) available from www.asp.net. The application seems to run, however when I run it in...
  3. #2

    Default Re: URL variables not recognised because of encoded URL

    You can use URLDecode() function to retrieve the value.

    Laksma
    Laksma Guest

  4. #3

    Default Re: URL variables not recognised because of encoded URL

    Hi Laksma,

    Thanks for your reply!

    So is it that I have to do a loop to assign the URL variables using URLDecode() manually?

    Just want to confirm that there's no other easier way out :P
    yitian Guest

  5. #4

    Default Re: URL variables not recognised because of encoded URL

    I might misunderstand your original question.
    You have [url]http://abc.com/index.cfm?id=%3d123%26cat%3dabc[/url]

    If I decode that URL, the result is
    [url]http://abc.com/index.cfm?id=123&cat=abc[/url]

    Are you looking for id and cat OR 123 and abc?


    Laksma

    Laksma Guest

  6. #5

    Default Re: URL variables not recognised because of encoded URL

    Actually I'm trying to get url.id and url.cat.

    The link, [url]http://abc.com/index.cfm?id=123&cat=abc[/url], is sent out to users via
    email and some email clients encoded the link to
    [url]http://abc.com/index.cfm?id=%3d123%26cat%3dabc[/url].

    So when my code calls for url.id or url.cat, it will have undefined error.

    Hope you understand this. Thanks! :)


    yitian Guest

  7. #6

    Default Re: URL variables not recognised because of encoded URL

    I see.
    Unfortunately, I couldn't find an easier solution. You need to get the
    variables and values manually. Use the following code to get the query string
    portion of the encoded URL.

    <cfset qryString = URLDecode(CGI.QUERY_STRING)>


    Laksma

    Laksma Guest

  8. #7

    Default Re: URL variables not recognised because of encoded URL

    Hi,
    For me, the user input goes from the form through a javascript function, passed as URl, then in the action page it reaches without encoding the value. Which function and how I can use to get it correctly, if it contains some special keyboard characters !! Any suggestions?

    My code is as below

    page1.cfm:
    function abc(){
    document.page1Form.jsonCustomer.value = JSON.stringify(CustomerStructure);
    <!--- In CustomerStructure above, we have the field values AddContactInfo and CustTicket --->
    var randomnumber=Math.floor(Math.random()*11);
    var wName='page1'+randomnumber;

    showpopupwin('page2.cfm?winName='+wName+'&AddConta ctInfo='+encodeURI(AddContactInfo)+'&CustTicket='+ encodeURI(CustTicket)); <!--- showpopupwin() is defined in another javascript file --->
    }
    <Form...... >
    <input ..... id ="AddContactInfo" ....>
    <input ..... id ="CustTicket" ....>
    </Form>

    page2.cfm :
    <cfdump var ="#URL#"><cfabort> <!--- Works fine and gives URL parameters correctly --->
    <!--- The below code does not have correct output in page2.cfm url value, if I provide some special characters in the field AddContactInfo . Consequently the url is blocked due to restricted characters in url--->
    <cfif IsDefined("URL.ADDCONTACTINFO")>
    <cfset ADDCONTACTINFO = #URL.ADDCONTACTINFO#>
    <cfelse>
    Not Defined
    </cfif>
    Ipi 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