Re: Highlight Form Elements
1) Use a structure to store validation results. 2) Pass this struct back to firstpage incase there are errors 3) Write a css style for highlight say .error {color: red;} 3) Use conditional statement in your html tags to fire this class if the error structure exists. Eg. Text1: input type=text name=txt1 cfif StructKeyExist(REQUEST, stErrors)class = error/cfifbr / Chrz Hi All, I have to validate the form fields form and validation of form fields are in two different pages and it suppose to be like this. I cannot merge it into two pages ... I am validating the form fields and sending the error message back to firstpage.cfm. I can sucessfully display the error message at the top of the form but unable to highight the error fields in it. firstpage.cfm html body cfif isdefined(url.invalidfield) and url.invalidfield neq Following fields are incorrect: ul cfloop index=i list=#invalidfield# delimiters=, cfoutput li#i#/li /cfoutput /cfloop /ul /cfif form name=f1 method=post action=secondpage.cfm Text1: input type=text name=txt1 /br / Text2: input type=text name=txt2 /br / Text3: input type=text name=txt3 /br / input type=submit / /form /body /html !--- here is the webservice response so just using some condition here --- Secondpage.cfm html body cfif form.txt1 neq Text1 cfset lstinvalidfileds = ListAppend(lstinvalidfileds, Error in txt1) /cfif cfif form.txt2 neq Text2 cfset lstinvalidfileds = ListAppend(lstinvalidfileds, Error in txt2) /cfif cfif form.txt3 neq Text3 cfset lstinvalidfileds = ListAppend(lstinvalidfileds, Error in txt3) /cfif cfoutput#ListLen(lstinvalidfileds)#/cfoutput cfif ListLen(lstinvalidfileds) gt 0 cflocation url=firstpage.cfm?invalidfield=#lstinvalidfileds# cfelse cflocation url = thirdpage.cfm /cfif /body /html Can anyone help me out with this ...? Thanks, Priya ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320819 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cfhttp content display issue in Firefox?
Karan Joshi wrote: Hi all I am pulling .htm pages from a website and re-wrapping the content in our page. The content displays fine in IE but in FF, a � is inserted after every letter. likely an encoding issue. question marks (in most s/w but not buzzword) means the app can't understand the char because of an encoding problem. what is the encoding of the source page? the encoding of your cf page? what version of cf? 2) Another thing is if I try to modify the cfhttp.fileContent using Replace(), it doesn't work either, whereas if I do the same with another test site, it works fine. if you're doing a search replace on the displayed question mark glyph you most likely will never find it as it's just a symbol representing something else. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319441 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cfhttp content display issue in Firefox?
Karan Joshi wrote: Thanks Paul. I have almost resolved the encoding issue. Now got another question - I have defined the encoding in the html header of a page using code : meta http-equiv=content-type content=text/html; charset=utf-8 If I check Page Info in Firefox, it shows the encoding as utf-16LE. How come inspite of setting the encoding manually in the page header, the browser is using different ecoding? Hi all I am pulling .htm pages from a website and re-wrapping the content in our page. The content displays fine in IE but in FF, a � is inserted after every letter. likely an encoding issue. question marks (in most s/w but not buzzword) means the app can't understand the char because of an encoding problem. what is the encoding of the source page? the encoding of your cf page? what version of cf? 2) Another thing is if I try to modify the cfhttp.fileContent using Replace(), it doesn't work either, whereas if I do the same with another test site, it works fine. if you're doing a search replace on the displayed question mark glyph you most likely will never find it as it's just a symbol representing something else. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319442 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Cfhttp content display issue in Firefox?
Hi all I am pulling .htm pages from a website and re-wrapping the content in our page. The content displays fine in IE but in FF, a � is inserted after every letter. ISSUES: 1) Wiki tells me that if FF can't understand a character, then it inserts a � (question mark). This leads me to think it might be a compression issue, hence according to a post on Colfusion Muse: http://www.coldfusionmuse.com/index.cfm/2008/10/9/cfhttp-troubleshooting, I added some cfhttpparams. 2) Another thing is if I try to modify the cfhttp.fileContent using Replace(), it doesn't work either, whereas if I do the same with another test site, it works fine. Can anyone help me solve this one? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319363 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Cfhttp content display in Firefox?
Hi all I am pulling .htm pages from a website and re-wrapping the content in our page. The content displays fine in IE but in FF, a � is inserted after every letter. ISSUES: 1) Wiki tells me that if FF can't understand a character, then it inserts a � (question mark). This leads me to think it might be a compression issue, hence according to a post on Colfusion Muse: http://www.coldfusionmuse.com/index.cfm/2008/10/9/cfhttp-troubleshooting, I added some cfhttpparams. 2) Another thing is if I try to modify the cfhttp.fileContent using Replace(), it doesn't work either, whereas if I do the same with another test site, it works fine. Can anyone help me solve this one? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319364 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Coldfusion on OS 10.5 - Configuration problem
Hi guys SETUP - Environment: Mac Pro Intel core 64bit with OS 10.5.5 Application server: Coldfusion8 32bit Web Server: Apache 2.2 32bit Database: MySQL and pre-installed PHP5 in Mac OS 10.5 PROBLEM 1) Can't access http://localhost/CFIDE/Administrator/index.cfm. Get an error-The requested URL /CFIDE/Administrator/ was not found on this server. Httpd.conf DocumentRoot is set to /Sites under user account. /Sites has a symlink pointing to /Library/Webserver/Documents/CFIDE. I have tried changing the DocumentRoot to /Library/Webserver/Documents/ but still the same error. The file permissions for Library folder are correct. Coldfusion debug information shows: Exceptions 09:27:38.038 - coldfusion.runtime.TemplateNotFoundException - in : line -1 File not found: /CFIDE/Administrator/index.cfm Any suggestions? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315175 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Form submission issue
Thank you all. I managed to sort it out. I tried various methods to solve the problem, but the hidden field method worked out best for me. THanks ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311354 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Form submission issue
Hi I want to submit a form in IE6 using the Enter key. input type=submit name=submitSearchGeneral class=form-submitBtn value=Search I am using to StructKeyExists tag to check if the form has been submitted cfif StructKeyExists(FORM,submitSearchGeneral) It works fine with Firefox but doesn't work in IE. If I look at the FORM struct in Firefox then the submitSearchGeneral key has the value Search but in IE the value is null. Any suggestions as to how I can make the Enter key pass the value in IE? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311160 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4