Ask a Question related to Macromedia ColdFusion, Design and Development.
-
yitian #1
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
-
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.... -
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.... -
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... -
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... -
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... -
Laksma #2
Re: URL variables not recognised because of encoded URL
You can use URLDecode() function to retrieve the value.
Laksma
Laksma Guest
-
yitian #3
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
-
Laksma #4
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
-
yitian #5
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
-
Laksma #6
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
-
Ipi #7
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



Reply With Quote

