RE: (ot) JavaScript detecting foreign scripts
Please don't do it off-list, several of us could be interested. In case anyone is interested, as Claude recommended, It was relatively easy to check for the foreign script injection by myturfads.com. There is a test page with the code located at http://www.uxb.net/adtest/ that will look to see if your client is seeing the Google ad being replaced by the myturfads.com In case you are wondering what I am talking about. Some ISP's are using a proxy technology that in real time intercepts the Google Ad JavaScript code and replaces it with their own advertising from a company (MyTurf - www.myturfads.com) that specializes in injecting local advertising into existing ad spaces for Local ISP's.They replace the google or double click JS code with their own and can add/inject pop-up and video ads into sites that only use text or image advertising from Google. Very Annoying! Based on the testing I have done with one of my more trafficked sites that have ads on them (hce.halomaps.org) there are at least two ISP's that are using the ad-replacement proxy technology in three different regions: Brewster NY, Denver CO. and Boise ID. NY and CO were Comcast and ID was CenturyLink. I am seeing multiple IPS from each area, mostly in the same B and C blocks. The way the test page works is that after loading it looks for any script called from myturfads.com on the page and then lists the scripts and warns if one was found. If one was found it performs an AJAX call and sends me an email with the client IP. I have contacted and opened a case with Google about this and they were very interested, but of course I only get to deal with the front line support person so I have no idea what they intend. I also contacted a copyright law firm and they were interested but because it is Google's Code and not mine that is being replaced an infringement case would be tough. Not only that but apparently there is no case law that says the ISP cannot replace or inject scripts. To proceed further it would require I cover legal research costs to see if there was a case to be had.It gets all muddy, especially now with the FCC's new Net Neutrality regulations still not fully defined and already under legal attack. I find this behavior on the part of the ISP's abhorrent and dangerous. Right now they are replacing advertising and stealing revenue from the advertiser and Web Publisher. But they could just as easily replace articles or any real content on the fly as well. And the worst of it is that there is apparently no legal precedent to the contrary. Thanks for listening. Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360348 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: (ot) JavaScript detecting foreign scripts
Just throwing ideas out there. :) All my pontificating aside for this particular purpose I am just trying to detect if the string adx.myturfads.com exists anywhere on the DOM. For my sister, I've already stopped it from loading by editing the hosts file on the PC to disallow that domain. Including the reasons you stated trying to stop it with a purely technical solution is just an arms race. This requires legal action. I am trying to find a way to collect data to support that. They may have stepped over a line here because they are not just adding but removing and replacing content. Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360190 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) JavaScript detecting foreign scripts
Second, if you use TLS (SSL) exclusively, you should be able to prevent this. I tested for this and yes it does prevent it. However that is not actually the point. The point is much bigger than the pennies they sole from my websites ad revenue. Maybe I am the only one but to me this practice, replacing the content of a webpage with their own content, is a heinous affront to the idea of an open Internet. Maybe I am going off the rails here but isn't this exactly what the Net Neutrality fight was all about? Not fast lanes and slow lanes but data integrity! Thanks for the pointer on the JS code I will look into it and take a step down off my soapbox. I agree with you that Comcast should die in a fire, but it'll take a while for the FCC to fix that problem I'm sure. In the meantime, rent-seekers gonna rent-seek, I guess. I like Jochem's solution, of which I was unaware, but still recommend you use HTTPS. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business (SDVOSB) on GSA Schedule, and provides the highest caliber vendor- authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360185 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: (ot) JavaScript detecting foreign scripts
I agree with you that Comcast should die in a fire, So I'm not crazy then. I have to wonder some times. I like Jochem's solution, of which I was unaware, but still recommend you use HTTPS. Actually I can also prevent it by switching to a different/newer ad type with a different script but that wasn't the goal for this request. The goal was to collect data on where (the IP) the script was being injected. Stopping it with a technical solution is an arms race. Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Tuesday, March 3, 2015 8:08 AM To: cf-talk Subject: Re: (ot) JavaScript detecting foreign scripts Second, if you use TLS (SSL) exclusively, you should be able to prevent this. I tested for this and yes it does prevent it. However that is not actually the point. The point is much bigger than the pennies they sole from my websites ad revenue. Maybe I am the only one but to me this practice, replacing the content of a webpage with their own content, is a heinous affront to the idea of an open Internet. Maybe I am going off the rails here but isn't this exactly what the Net Neutrality fight was all about? Not fast lanes and slow lanes but data integrity! Thanks for the pointer on the JS code I will look into it and take a step down off my soapbox. I agree with you that Comcast should die in a fire, but it'll take a while for the FCC to fix that problem I'm sure. In the meantime, rent-seekers gonna rent- seek, I guess. I like Jochem's solution, of which I was unaware, but still recommend you use HTTPS. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business (SDVOSB) on GSA Schedule, and provides the highest caliber vendor- authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion- Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf- talk/message.cfm/messageid:360185 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360187 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: (ot) JavaScript detecting foreign scripts
Using HTTPS may not be able to solve the problem completely either. A lot of companies, and now apparently ISPs, do a man in the middle certificate and have access to the whole encrypted stream. Companies do it to ensure that their work product isn't being ex-filtrated, ISPs seem to do it for advertising. There are ways to verify your direct connection to a server, but it requires diligence on the part of the browser user. I was thinking at first that you could generate a hash of the page being send and append it in http headers and then use javascript to hash the DOM and compare it, but I don't think that would work because of add-ins like LastPass that inject javascript that the user wants. Just throwing ideas out there. :) -Original Message- From: UXB Internet [mailto:denn...@uxbinternet.com] Sent: Tuesday, March 03, 2015 9:23 AM To: cf-talk Subject: RE: (ot) JavaScript detecting foreign scripts I agree with you that Comcast should die in a fire, So I'm not crazy then. I have to wonder some times. I like Jochem's solution, of which I was unaware, but still recommend you use HTTPS. Actually I can also prevent it by switching to a different/newer ad type with a different script but that wasn't the goal for this request. The goal was to collect data on where (the IP) the script was being injected. Stopping it with a technical solution is an arms race. Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Tuesday, March 3, 2015 8:08 AM To: cf-talk Subject: Re: (ot) JavaScript detecting foreign scripts Second, if you use TLS (SSL) exclusively, you should be able to prevent this. I tested for this and yes it does prevent it. However that is not actually the point. The point is much bigger than the pennies they sole from my websites ad revenue. Maybe I am the only one but to me this practice, replacing the content of a webpage with their own content, is a heinous affront to the idea of an open Internet. Maybe I am going off the rails here but isn't this exactly what the Net Neutrality fight was all about? Not fast lanes and slow lanes but data integrity! Thanks for the pointer on the JS code I will look into it and take a step down off my soapbox. I agree with you that Comcast should die in a fire, but it'll take a while for the FCC to fix that problem I'm sure. In the meantime, rent-seekers gonna rent- seek, I guess. I like Jochem's solution, of which I was unaware, but still recommend you use HTTPS. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business (SDVOSB) on GSA Schedule, and provides the highest caliber vendor- authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion- Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf- talk/message.cfm/messageid:360185 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360188 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) JavaScript detecting foreign scripts
On Mon, Mar 2, 2015 at 8:52 PM, UXB Internet denn...@uxbinternet.com wrote: I apologize for this off topic post. A while back someone posted a thread where they were working on a script that would enumerate the DOM and detect foreign JS scripts running or loaded. I am looking to consult with that person off-list because I have a case where I need to do the same. Nowadays most browsers support having a Content Security Policy which IMHO offers a much better mechanism to do so in its reporting functionality: http://www.w3.org/TR/CSP/ Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360184 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) JavaScript detecting foreign scripts
I am looking to consult with that person off-list Please don't do it off-list, several of us could be interrested. I developped a client side javascript error trackink tool and it helped me a lot to debug my scripts, but I get many errors happening in foreign JS scripts. I fixed my program to detect 5 or 6 of them and now the system is almost perfect. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360179 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: (ot) JavaScript detecting foreign scripts
I developped a client side javascript error trackink tool and it helped me a lot to debug my scripts, but I get many errors happening in foreign JS scripts. I fixed my program to detect 5 or 6 of them and now the system is almost perfect. Should have known it was you smile. What is happening is that Comcast has engaged the company MyTurfads.com that on the fly replaces Google and other ads with their own. They intercept the call to the script and return JS of their own that inserts a script from their domain (adx.myturfads.com) into the DOM. That script then calls others to handle the ads. I have proven this using a test page http://www.uxb.net/adtest/ that only has a single Google ad and no other scripts. The content of the single script on that page gets replaced at my sisters in NY (Comcast) but not in CT (Comcast) . I want to find out how wide spread this is because 3 data points do not make an argument. I only found out about it because my sister complained about getting pop-up and self-running modal video ads on one of my websites and that should not occur. What I want to do is write a script that can detect if the domain myturfads.com is located anywhere in the DOM. I intend to place it on the simple test page so that once detected I can initiate an Ajax call and record the user IP on my server. I can hack at JS code with enough examples but sadly need a little help on this one. Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360181 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) JavaScript detecting foreign scripts
It appears as if in some locations Comcast's proxies are intercepting advertising scripts (google/doubleclick) and replacing them with their own JS that substitutes their own contracted ads. I am looking for a way to detect this on a test page to determine how wide spread the practice is. I would be greatly appreciative if that person would contact me directly either by email or phone. I'm not that person, but I have some suggestions. First, my understanding is that this only happens for users of Comcast public access hotspots, not for subscribed users: http://arstechnica.com/tech-policy/2014/09/why-comcasts-javascript-ad-injections-threaten-security-net-neutrality/ Second, if you use TLS (SSL) exclusively, you should be able to prevent this. Google/Doubleclick support this, and I really think it's the way of the future. We recommend exclusive TLS use for all of our customers. Not specifically just for this problem, but because it limits exposure generally and because it may positively affect SEO in the near future: http://googlewebmastercentral.blogspot.com/2014/08/https-as-ranking-signal.html Third, there's an IEEE paper that provides some sample code for handling this problem. I haven't read it myself, and it's not a free paper, but it may be worth the money to you: http://ieeexplore.ieee.org/xpl/login.jsp?tp=arnumber=6032221url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D6032221 Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business (SDVOSB) on GSA Schedule, and provides the highest caliber vendor- authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360182 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: (ot) JavaScript detecting foreign scripts
Thanks Dave I do appreciate the information. First, my understanding is that this only happens for users of Comcast public access hotspots, not for subscribed users: http://arstechnica.com/tech-policy/2014/09/why-comcasts-javascript-ad- injections-threaten-security-net-neutrality/ In my research I did see that article but alas they are indeed rolling it out to actual subscribers. Second, if you use TLS (SSL) exclusively, you should be able to prevent this. I tested for this and yes it does prevent it. However that is not actually the point. The point is much bigger than the pennies they sole from my websites ad revenue. Maybe I am the only one but to me this practice, replacing the content of a webpage with their own content, is a heinous affront to the idea of an open Internet. Maybe I am going off the rails here but isn't this exactly what the Net Neutrality fight was all about? Not fast lanes and slow lanes but data integrity! Thanks for the pointer on the JS code I will look into it and take a step down off my soapbox. Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360183 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
(ot) JavaScript detecting foreign scripts
I apologize for this off topic post. A while back someone posted a thread where they were working on a script that would enumerate the DOM and detect foreign JS scripts running or loaded. I am looking to consult with that person off-list because I have a case where I need to do the same. It appears as if in some locations Comcast's proxies are intercepting advertising scripts (google/doubleclick) and replacing them with their own JS that substitutes their own contracted ads. I am looking for a way to detect this on a test page to determine how wide spread the practice is. I would be greatly appreciative if that person would contact me directly either by email or phone. Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360178 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
How can I force clients to refresh JavaScript files?
I wonder why browsers caching Javascript and CSS files at least do not check if the date of the file on the server is still the same as the one in their cache. Since I implemented a Javascript errors log, I catch many errors showing that the old file in the cache was used days after the error was corrected, even with Google Bot! (yeah, Google Bot reads and executes scripts). This page : http://stackoverflow.com/questions/32414/how-can-i-force-clients-to-refresh-javascript-files expose the problem and gives many solutions. I wonder if one could develop an even better solution using ColdFusion? Any ideas? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359293 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How can I force clients to refresh JavaScript files?
Try CF Static (http://cfstatic.riaforge.org/), it appends a unique string to the end of the file requests, which forces browsers to load the newer version. You can have it compress all your CSS and JS files or simply use it deliver your files. On Fri, Sep 12, 2014 at 11:05 AM, wrote: I wonder why browsers caching Javascript and CSS files at least do not check if the date of the file on the server is still the same as the one in their cache. Since I implemented a Javascript errors log, I catch many errors showing that the old file in the cache was used days after the error was corrected, even with Google Bot! (yeah, Google Bot reads and executes scripts). This page : http://stackoverflow.com/questions/32414/how-can-i-force-clients-to-refresh-javascript-files expose the problem and gives many solutions. I wonder if one could develop an even better solution using ColdFusion? Any ideas? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359294 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: How can I force clients to refresh JavaScript files?
The easiest way is to simply expire the page using cfheader. Take a look at http://www.bennadel.com/blog/1619-caching-coldfusion-pages-with-expires-header-value.htm. David Phelan Web Developer IT Security Web Technologies Emerging Health Montefiore Information Technology 3 Odell Plaza, Yonkers, NY 10701 914-457-6465 Office dphe...@emerginghealthit.com www.emerginghealthit.com www.montefiore.org From: =?ISO-8859-1?Q?Claude_Schn=E9egans schneegans@interneti=71?= =?ISO-8859-1?Q?ue.com=3E?= Sent: Friday, September 12, 2014 11:05 AM To: cf-talk Subject: How can I force clients to refresh JavaScript files? I wonder why browsers caching Javascript and CSS files at least do not check if the date of the file on the server is still the same as the one in their cache. Since I implemented a Javascript errors log, I catch many errors showing that the old file in the cache was used days after the error was corrected, even with Google Bot! (yeah, Google Bot reads and executes scripts). This page : http://stackoverflow.com/questions/32414/how-can-i-force-clients-to-refresh-javascript-files expose the problem and gives many solutions. I wonder if one could develop an even better solution using ColdFusion? Any ideas? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359295 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How can I force clients to refresh JavaScript files?
Try CF Static (http://cfstatic.riaforge.org/), it appends a unique string to the end of the file requests, Ok, good technique. But instead of downloading 262 files, I developped this simple CF_script custom tag: CFSETTING ENABLECFOUTPUTONLY=Yes CFSET scriptFile = expandPath(attributes.src) CFIF fileExists(scriptFile) !--- get a timestamp from the file --- CFSET fileInfo = getFileInfo(scriptFile) CFSET timeStamp = dateFormat (fileInfo.lastModified, yymmdd) timeFormat(fileInfo.lastModified, HHmmss) CFELSE CFOUTPUTFile #attributes.src# not found/CFOUTPUTCFABORT /CFIF CFOUTPUTSCRIPT type=text/javascript src=#attributes.src#?#timestamp#/SCRIPT /CFOUTPUT CFSETTING ENABLECFOUTPUTONLY=no Then replace all like script src=/commun/CSI_menu.js type=text/javascript/script by CF_script src=/commun/CSI_menu.js It does the job. I will probably develop the same for css files ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359296 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How can I force clients to refresh JavaScript files?
The easiest way is to simply expire the page using cfheader. The problem with this technique is that you will force a reload even if the file was not changed. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359297 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Use JavaScript to get flash cfform object and name
Hello and thanks in advance :) I have a flash cfform and on this form I have a cfinput button with an onclick event that calls some JavaScript. This JavaScript attempts to run the onclick event of another cfinput button on another flash cfform. The problem I''m having is that when I attempt to reference the forms nothing happens. If I run: var FrmOne = document.forms[ 0 ]; alert(FrmOne); I get an alert that says only [OBJECT] If I run: var FrmOne = document.forms[ 0 ]; alert(FrmOne.name); I get an alert with an empty string. (Btw the form has both a NAME and an ID) It's as if JavaScript cannot find the forms, but if I run a JavaScript count of the form elements on the page it comes back with 2, which is what I would expect. I've successfully fired the onclick event of a cfinput on a cfform format=flash before and I've been scouring every forum I can find, but no one seems to have covered this particular problem, unless of course I've just been searching it all wrong. Any help is very appreciated!! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357069 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Use JavaScript to get flash cfform object and name
Hello and thanks in advance :) I have a flash cfform and on this form I have a cfinput button with an onclick event that calls some JavaScript. This JavaScript attempts to run the onclick event of another cfinput button on another flash cfform. The problem I''m having is that when I attempt to reference the forms nothing happens. If I run: var FrmOne = document.forms[ 0 ]; alert(FrmOne); I get an alert that says only [OBJECT] If I run: var FrmOne = document.forms[ 0 ]; alert(FrmOne.name); I get an alert with an empty string. (Btw the form has both a NAME and an ID) It's as if JavaScript cannot find the forms, but if I run a JavaScript count of the form elements on the page it comes back with 2, which is what I would expect. I've successfully fired the onclick event of a cfinput on a cfform format=flash before and I've been scouring every forum I can find, but no one seems to have covered this particular problem, unless of course I've just been searching it all wrong. Any help is very appreciated!! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357070 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
dhtmlxGrid creating JavaScript
Hi, I'm not sure if anyone here has used dhtmlxGrid for an excel type display before. http://www.dhtmlx.com/docs/products/dhtmlxGrid/index.shtml Overall, it works pretty good and I have been able to get a nice display with sorting etc and using my database and CF to create the data for the table. My first example was just creating JSON on the fly to get it in a format that's understood by the tool. That worked fine and it was easy with CF to create what I needed. However, I have the need to include an HTML clickable Link so that I can edit a person's information. Of course they are uniquely identified by an ID field but the problem comes in that I used JSON in the beginning to create the data. According to the docs, they give an XML example of how it parses the code. I have not seen a JSON example and when I try to give it data that will create the link it doesn't work. http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/01_cell_types/04_link_grid.html#code So if I wanted a link I have something like: row id=2 cellBlood and Smoke/cell cellStephen King^http://www.stephenking.com/the_author.html/cell /row I'm fine with switching my code over to XML instead of JSON but I wanted to ask about creating it in a Javascript variable so that I can use CF to create it. What I have so far is this: function SaveXML(UserData) { var file = fso.CreateTextFile(FILENAME, true); file.WriteLine('?xml version=1.0 encoding=utf-8?\n'); file.WriteLine('rows\n'); { cfoutput query=get10 file.Write('row id=#currentrow# '); file.Write('cell #strFullName#/cellcell #strPhaseName#/cellcell #strEmplCat#/cellcell #strEmplCat#/cellcell #strHRName#/cell'); file.Write('/row '); /cfoutput } file.WriteLine('/rows\n'); file.Close(); } // end SaveXML function When I'm done I will parse the file variable and get it to display: mygrid.parse(file); That should cause the grid to show up on the page. Sorry for such a long question, but I wanted to be sure that XML would be the solution. I'm also up for any other suggested JS library that may do this simpler. I don't have to stick to dhtmlx. I am also creating my variable and parsing through it and not calling a CF file or reading a file the way some examples look. http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:data_loading Thanks for any help! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355517 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
ColdFusion 10 Administrator Javascript Errors
I just installed the 64-bit version of ColdFusion 10 on Windows Server 2008R2. I tried to do the install as close to the CF9 Server Lockdown Guide as possible, given that CF9 and CF10 have different underlying engines (CF9 is JRun and CF10 is Tomcat, in the Administrator CF9 used Java applets for file browsing and CF10 uses jQuery and JavaScript UI components). Anyway, things seem to be working fine for the most part, except that some of the ColdFusion Administrator functionality is broken for me. Any place that requires using the new jQuery file browser throws script errors. For example, when trying to specify an alternative JVM path, clicking Browse Server results in the error jQuery is undefined (see http://screencast.com/t/GQMZ1cdLJy ). Of course, jQuery.js is in the same folder as the offending script (jqueryeasing.js), so this makes no sense. Anyone encountered this before? -Carl ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352077 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion 10 Administrator Javascript Errors
you have probably denied Coldfusion access to the scripts directory. whatever user you are running ColdFusion under, make sure it has full access to the CFIDE. you can also use sysinternals process monitor to find out exactly what permissions are being denied. http://technet.microsoft.com/en-us/sysinternals/default Also to use the file browser applet always required RDS to be enabled on the server, which is not advised on a production server. On Thu, Aug 9, 2012 at 6:19 PM, Carl Von Stetten vonner.li...@vonner.netwrote: I just installed the 64-bit version of ColdFusion 10 on Windows Server 2008R2. I tried to do the install as close to the CF9 Server Lockdown Guide as possible, given that CF9 and CF10 have different underlying engines (CF9 is JRun and CF10 is Tomcat, in the Administrator CF9 used Java applets for file browsing and CF10 uses jQuery and JavaScript UI components). Anyway, things seem to be working fine for the most part, except that some of the ColdFusion Administrator functionality is broken for me. Any place that requires using the new jQuery file browser throws script errors. For example, when trying to specify an alternative JVM path, clicking Browse Server results in the error jQuery is undefined (see http://screencast.com/t/GQMZ1cdLJy ). Of course, jQuery.js is in the same folder as the offending script (jqueryeasing.js), so this makes no sense. Anyone encountered this before? -Carl ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352079 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion 10 Administrator Javascript Errors
Russ, Thank you for the suggestions. I just figured it out. On my IIS site, I hadn't removed the Deny URL request filtering on the /scripts folder (the Deny URL filtering per the lockdown guide). Once I removed it, all is well. Thanks, -Carl ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352080 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
SOT: JavaScript MVC with Ember.js
Today Devnet released an article that I wrote on a JavaScript MVC framework called Ember.js. http://www.adobe.com/devnet/html5.html If you're familiar with Backbone, Spine, or Angular, then you might be interested in this article. Hope you like it. andy ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351193 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript test in ColdFusion
Thanks to all for the suggestions on this. I went with the approach below and it worked well. Thank you Andy, -RR On Mon, Mar 26, 2012 at 11:39 PM, andy matthews li...@commadelimited.comwrote: A dead simple way of testing for JavaScript: script window.location.href = 'javascriptCapable.cfm'; /script meta http-equiv=refresh content=1; url=nonJavascriptCapable.cfm If a browser understands JS they get one page, if they don't they get another. One thing to consider though that it's not quite as simple as understanding JS...you should be checking for specific functionality using something like Modernizr. http://www.modernizr.com/ andy -Original Message- From: Robert Rhodes [mailto:rrhode...@gmail.com] Sent: Monday, March 26, 2012 12:00 PM To: cf-talk Subject: Javascript test in ColdFusion Hello again. I have a site that loads all the content in ajax. I also have a version of the site that does not use ajax. I am looking for some code I can put in the application.cfm to test to see if the visitor's browser supports javascipt or not, so I can load the right version of the site. Any ideas? Thanks. --RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350635 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript test in ColdFusion
Umm.. Why not just put in noscript? On Mon, Mar 26, 2012 at 8:39 PM, andy matthews li...@commadelimited.com wrote: A dead simple way of testing for JavaScript: script window.location.href = 'javascriptCapable.cfm'; /script meta http-equiv=refresh content=1; url=nonJavascriptCapable.cfm If a browser understands JS they get one page, if they don't they get another. One thing to consider though that it's not quite as simple as understanding JS...you should be checking for specific functionality using something like Modernizr. http://www.modernizr.com/ andy -Original Message- From: Robert Rhodes [mailto:rrhode...@gmail.com] Sent: Monday, March 26, 2012 12:00 PM To: cf-talk Subject: Javascript test in ColdFusion Hello again. I have a site that loads all the content in ajax. I also have a version of the site that does not use ajax. I am looking for some code I can put in the application.cfm to test to see if the visitor's browser supports javascipt or not, so I can load the right version of the site. Any ideas? Thanks. --RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350636 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Javascript test in ColdFusion
My pleasure RR. andy -Original Message- From: Robert Rhodes [mailto:rrhode...@gmail.com] Sent: Wednesday, April 04, 2012 7:05 PM To: cf-talk Subject: Re: Javascript test in ColdFusion Thanks to all for the suggestions on this. I went with the approach below and it worked well. Thank you Andy, -RR On Mon, Mar 26, 2012 at 11:39 PM, andy matthews li...@commadelimited.comwrote: A dead simple way of testing for JavaScript: script window.location.href = 'javascriptCapable.cfm'; /script meta http-equiv=refresh content=1; url=nonJavascriptCapable.cfm If a browser understands JS they get one page, if they don't they get another. One thing to consider though that it's not quite as simple as understanding JS...you should be checking for specific functionality using something like Modernizr. http://www.modernizr.com/ andy -Original Message- From: Robert Rhodes [mailto:rrhode...@gmail.com] Sent: Monday, March 26, 2012 12:00 PM To: cf-talk Subject: Javascript test in ColdFusion Hello again. I have a site that loads all the content in ajax. I also have a version of the site that does not use ajax. I am looking for some code I can put in the application.cfm to test to see if the visitor's browser supports javascipt or not, so I can load the right version of the site. Any ideas? Thanks. --RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350641 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Javascript test in ColdFusion
Hello again. I have a site that loads all the content in ajax. I also have a version of the site that does not use ajax. I am looking for some code I can put in the application.cfm to test to see if the visitor's browser supports javascipt or not, so I can load the right version of the site. Any ideas? Thanks. --RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350545 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript test in ColdFusion
This is something you must do on the client (browser) and is not information available on the server. So, putting it in Application.cfc isn't at straightforward as you think. If you google test javascript enabled you'll get a bunch of links on some client side code to run the test. BrowserHawk also has this capability, though I think it's overkill if this is the only thing you're trying to detect. -Cameron On Mon, Mar 26, 2012 at 12:59 PM, Robert Rhodes rrhode...@gmail.com wrote: Hello again. I have a site that loads all the content in ajax. I also have a version of the site that does not use ajax. I am looking for some code I can put in the application.cfm to test to see if the visitor's browser supports javascipt or not, so I can load the right version of the site. Any ideas? Thanks. --RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350546 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript test in ColdFusion
if i had to do something like this, i would: 1) build a site that works without js (i.e. all links take user to a new page that shows requested data) 2) enhance the site with ajax (i.e. override default link actions and load data via ajax without redirects) there's no one-liner you can put into your Application.cfc/cfm that will tell you if your user has js enabled or not. Azadi On Tue, Mar 27, 2012 at 00:59, Robert Rhodes rrhode...@gmail.com wrote: Hello again. I have a site that loads all the content in ajax. I also have a version of the site that does not use ajax. I am looking for some code I can put in the application.cfm to test to see if the visitor's browser supports javascipt or not, so I can load the right version of the site. Any ideas? Thanks. --RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350547 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Javascript test in ColdFusion
A dead simple way of testing for JavaScript: script window.location.href = 'javascriptCapable.cfm'; /script meta http-equiv=refresh content=1; url=nonJavascriptCapable.cfm If a browser understands JS they get one page, if they don't they get another. One thing to consider though that it's not quite as simple as understanding JS...you should be checking for specific functionality using something like Modernizr. http://www.modernizr.com/ andy -Original Message- From: Robert Rhodes [mailto:rrhode...@gmail.com] Sent: Monday, March 26, 2012 12:00 PM To: cf-talk Subject: Javascript test in ColdFusion Hello again. I have a site that loads all the content in ajax. I also have a version of the site that does not use ajax. I am looking for some code I can put in the application.cfm to test to see if the visitor's browser supports javascipt or not, so I can load the right version of the site. Any ideas? Thanks. --RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350555 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Javascript error help!
Look at jquery.maskedinput-1.2.2.min.js I have a lot of masked fields in hidden divs. -Original Message- From: Ken Hammond [mailto:khamm...@saleminc.com] Sent: Wednesday, February 22, 2012 1:08 PM To: cf-talk Subject: Javascript error help! I am running into this exact problem this guy had and cannot find a fix ANYWHERE. http://www.elliottsprehn.com/cfbugs/bugs/79033 I can show some example code of mine but basically I'm having the same problem he is describing. I have a hidden div with cfinputs that have masks and validation and I get the same error he is getting I don't have a problem in Safari, but I have the problem EVERY TIME in both IE8 and IE9... I REALLY need help here! Ken Hammo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350067 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Javascript error help!
I am running into this exact problem this guy had and cannot find a fix ANYWHERE. http://www.elliottsprehn.com/cfbugs/bugs/79033 I can show some example code of mine but basically I'm having the same problem he is describing. I have a hidden div with cfinputs that have masks and validation and I get the same error he is getting . I don't have a problem in Safari, but I have the problem EVERY TIME in both IE8 and IE9 I REALLY need help here! Ken Hammo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350035 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript error help!
Have you looked at this: http://www.coderanch.com/t/119883/HTML-CSS-JavaScript/move-focus-control-because-it On Wed, Feb 22, 2012 at 1:08 PM, Ken Hammond khamm...@saleminc.com wrote: I am running into this exact problem this guy had and cannot find a fix ANYWHERE. http://www.elliottsprehn.com/cfbugs/bugs/79033 I can show some example code of mine but basically I'm having the same problem he is describing. I have a hidden div with cfinputs that have masks and validation and I get the same error he is gettingů. I don't have a problem in Safari, but I have the problem EVERY TIME in both IE8 and IE9ů I REALLY need help here! Ken Hammo ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350036 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CF Javascript errors
I am getting an illegal character error in /cfide/scripts/cfform.js and masks.js as well as it not being able to find a _CF_checkdate (which I did not see defined in the source. I think that whatever this is, it is causing other javascript functions to either fail or act sporadically. Any advice on this would be appreciated. Eric ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349474 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF Javascript errors
I am getting an illegal character error in /cfide/scripts/cfform.js and masks.js as well as it not being able to find a _CF_checkdate (which I did not see defined in the source. I think that whatever this is, it is causing other javascript functions to either fail or act sporadically. Any advice on this would be appreciated. It sounds to me like those files have been corrupted in some way. Have you compared them with the default files? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsit ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349476 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF Javascript errors
That is very possible...I haven't checked, but i can. Thanks Dave. On Thu, Jan 12, 2012 at 3:21 PM, Dave Watts dwa...@figleaf.com wrote: I am getting an illegal character error in /cfide/scripts/cfform.js and masks.js as well as it not being able to find a _CF_checkdate (which I did not see defined in the source. I think that whatever this is, it is causing other javascript functions to either fail or act sporadically. Any advice on this would be appreciated. It sounds to me like those files have been corrupted in some way. Have you compared them with the default files? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsit ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349477 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF Javascript errors
common reason for problems in the CFIDE is that cf has been updated/patched which includes updates to the CFIDE, and these updates have not been applied to the CFIDE in use. this may happen if you have 2 copies of the CFIDE. the default one is at [cfusion install path]\wwwroot\cfide which is usually only created if you install the built in web server. check to see if you have this one and if so you could copy it over the live one if it is newer. On Thu, Jan 12, 2012 at 9:26 PM, Eric Roberts ow...@threeravensconsulting.com wrote: That is very possible...I haven't checked, but i can. Thanks Dave. On Thu, Jan 12, 2012 at 3:21 PM, Dave Watts dwa...@figleaf.com wrote: I am getting an illegal character error in /cfide/scripts/cfform.js and masks.js as well as it not being able to find a _CF_checkdate (which I did not see defined in the source. I think that whatever this is, it is causing other javascript functions to either fail or act sporadically. Any advice on this would be appreciated. It sounds to me like those files have been corrupted in some way. Have you compared them with the default files? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsit ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349478 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF Javascript errors
We had an issue earlier this week where somehow someone accidentally deleted most of the files in the wwwroot. We also found out that the dev server wasn't getting backed up like we thought it was (tough way to find out hehehe), so we tried undeleting files with an undelete utility. Some of the CFM's came back corrupted, so I am assuming that some of the js files are also corrupted...g We recovered most of the files and those that couldn't, we were able to copy over from our test environment. Since CFIDE is in the wwroot, i would assume that they were subjedct to some of the same issues, though i am not sure they had to undelete any of that. Eric On Thu, Jan 12, 2012 at 3:31 PM, Russ Michaels r...@michaels.me.uk wrote: common reason for problems in the CFIDE is that cf has been updated/patched which includes updates to the CFIDE, and these updates have not been applied to the CFIDE in use. this may happen if you have 2 copies of the CFIDE. the default one is at [cfusion install path]\wwwroot\cfide which is usually only created if you install the built in web server. check to see if you have this one and if so you could copy it over the live one if it is newer. On Thu, Jan 12, 2012 at 9:26 PM, Eric Roberts ow...@threeravensconsulting.com wrote: That is very possible...I haven't checked, but i can. Thanks Dave. On Thu, Jan 12, 2012 at 3:21 PM, Dave Watts dwa...@figleaf.com wrote: I am getting an illegal character error in /cfide/scripts/cfform.js and masks.js as well as it not being able to find a _CF_checkdate (which I did not see defined in the source. I think that whatever this is, it is causing other javascript functions to either fail or act sporadically. Any advice on this would be appreciated. It sounds to me like those files have been corrupted in some way. Have you compared them with the default files? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsit ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349479 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF Javascript errors
I went and replaced the 2 JS files and that solved the problem. i was thinking that was the problem, but wasn't sure if i was looking at an encrypted file or a corrupted file. Thanks guys! Eric On Thu, Jan 12, 2012 at 3:38 PM, Eric Roberts ow...@threeravensconsulting.com wrote: We had an issue earlier this week where somehow someone accidentally deleted most of the files in the wwwroot. We also found out that the dev server wasn't getting backed up like we thought it was (tough way to find out hehehe), so we tried undeleting files with an undelete utility. Some of the CFM's came back corrupted, so I am assuming that some of the js files are also corrupted...g We recovered most of the files and those that couldn't, we were able to copy over from our test environment. Since CFIDE is in the wwroot, i would assume that they were subjedct to some of the same issues, though i am not sure they had to undelete any of that. Eric On Thu, Jan 12, 2012 at 3:31 PM, Russ Michaels r...@michaels.me.ukwrote: common reason for problems in the CFIDE is that cf has been updated/patched which includes updates to the CFIDE, and these updates have not been applied to the CFIDE in use. this may happen if you have 2 copies of the CFIDE. the default one is at [cfusion install path]\wwwroot\cfide which is usually only created if you install the built in web server. check to see if you have this one and if so you could copy it over the live one if it is newer. On Thu, Jan 12, 2012 at 9:26 PM, Eric Roberts ow...@threeravensconsulting.com wrote: That is very possible...I haven't checked, but i can. Thanks Dave. On Thu, Jan 12, 2012 at 3:21 PM, Dave Watts dwa...@figleaf.com wrote: I am getting an illegal character error in /cfide/scripts/cfform.js and masks.js as well as it not being able to find a _CF_checkdate (which I did not see defined in the source. I think that whatever this is, it is causing other javascript functions to either fail or act sporadically. Any advice on this would be appreciated. It sounds to me like those files have been corrupted in some way. Have you compared them with the default files? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsit ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349488 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Programming for an iPod - OT javascript/HTML question
Thanks to those who responded. Normally I would have posted a link but this is behind ADS authentication here and I had to do some code modification to move it from there. But, it was an annoyingly simple problem: in one line of j-code I used an ID referrer ToiletFacOnSite when it should have been ToiletFacOnsite. I found it after tracking down how to turn on the debugger in Safari. What threw me off was it threw no errors in IE and I usually find IE way more sensitive than Mozilla. I even turned on the IE debugger and it threw no errors. The offending line of code was if ( document.getElementById('ToiletFacOnSite').checked ) { (that's before I corrected it) which causes me to wonder if Mozilla and IE have some kind of optimization built in so they only look at enough of the id to find it is unique (e.g., maybe ToiletFacO) and ignore the rest. Otherwise, why wasn't IE complaining about the code? (Rhetorical question) -Original Message- From: Stephens, Larry V [mailto:steph...@indiana.edu] Sent: Tuesday, September 06, 2011 2:25 PM To: cf-talk Subject: Programming for an iPod - OT javascript/HTML question I'm working on a form in CF that displays just fine on a desktop/laptop but the javascript breaks in Safari once I introduce a div. If anyone has a clue about this, please contact me off-list at steph...@indiana.edu Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347271 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Programming for an iPod - OT javascript/HTML question
I'm working on a form in CF that displays just fine on a desktop/laptop but the javascript breaks in Safari once I introduce a div. If anyone has a clue about this, please contact me off-list at steph...@indiana.edu Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347242 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Programming for an iPod - OT javascript/HTML question
So you have an example you can see online? Is it only mobile safari that breaks or does desktop safari as well? On Sep 6, 2011, at 1:25 PM, Stephens, Larry V steph...@indiana.edu wrote: I'm working on a form in CF that displays just fine on a desktop/laptop but the javascript breaks in Safari once I introduce a div. If anyone has a clue about this, please contact me off-list at steph...@indiana.edu Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347245 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Programming for an iPod - OT javascript/HTML question
Can you post a link? On Tue, Sep 6, 2011 at 2:25 PM, Stephens, Larry V steph...@indiana.eduwrote: I'm working on a form in CF that displays just fine on a desktop/laptop but the javascript breaks in Safari once I introduce a div. If anyone has a clue about this, please contact me off-list at steph...@indiana.edu Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347249 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Programming for an iPod - OT javascript/HTML question
Without any examples, it is tough to help out. Couple things I'll toss out as starting points: 1. Validate your HTML and your JS. It won't cure every problem but it is an easy step and gets rid of a lot of easy to miss sources of error. 2. If you are really looking at a mobile device (as opposed to the desktop version of Safari), look into one of the mobile-optimized JS libraries like JQuery Mobile or Sencha Mobile. There are also mobile device emulators that may help you debug. Cheers, Judah On Tue, Sep 6, 2011 at 11:25 AM, Stephens, Larry V steph...@indiana.edu wrote: I'm working on a form in CF that displays just fine on a desktop/laptop but the javascript breaks in Safari once I introduce a div. If anyone has a clue about this, please contact me off-list at steph...@indiana.edu Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347250 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: assigning javascript variable to coldfusion.Please assist
OK. It looks like I misread your code earlier -- I thought you were hard-coding the variable, when you were actually getting it from a cfinput. Unfortunately, I haven't used Dreamweaver in years (since MX 2004, I believe), so not sure how you'd do it in there. Others here probably have experience with that. But, I guess I'm not certain what exactly the goal is. If the URL is being provided by user-input in a cfinput, then a cfmodule at the end of that page won't be able to get that (because the cfmodule is processed before the page is displayed to the user). Perhaps you can explain what you're trying to accomplish a bit more, and I (or someone else on here) would be able to help you accomplish that (or provide a better way to do it). Scott On Mon, Jun 13, 2011 at 11:31 AM, Gunjan Upadhayay 29gunjanupadha...@gmail.com wrote: Thanks for all your help. But we need to store the url into a coldfusion variable as at the end of the code,we pass the url to other modules which use this url in other pages. Also, i am not that familiar with how to use Ajax in Dreamweaver. Any help would be highly appreciated. -- - Scott Brady http://www.scottbrady.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345250 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: assigning javascript variable to coldfusion.Please assist
Thanks for all your help. But we need to store the url into a coldfusion variable as at the end of the code,we pass the url to other modules which use this url in other pages. Also, i am not that familiar with how to use Ajax in Dreamweaver. Any help would be highly appreciated. ColdFusion doesn't work that way. By the time the browser gets to the point of running any JavaScript, all of the ColdFusion processing for the page has been done. There is some things you could use to accomplish what it looks like what you're trying to do. First, it looks like you don't even need it as a ColdFusion variable, since you're just writing the URL to the page. In that case, since you already have that value in JavaScript, you could just write the value to the page using JavaScript. (Also, note that the code you provide isn't going to work correctly anyway, because you have HTML mixed in between your opening and closing script tags). If you actually do need it as a CF variable for some reason, you could use Ajax to set the value (though it would have to be in a persistent scope, such as a session variable). Or, since you just have the value hard-coded in the example, you could just hard-code it again when setting the CF variable (if your intention is to hard-code it). Scott On Sat, Jun 11, 2011 at 8:41 PM, Gunjan Upadhayay 29gunjanupadha...@gmail.com wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345241 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: assigning javascript variable to coldfusion.Please assist
ColdFusion doesn't work that way. By the time the browser gets to the point of running any JavaScript, all of the ColdFusion processing for the page has been done. There is some things you could use to accomplish what it looks like what you're trying to do. First, it looks like you don't even need it as a ColdFusion variable, since you're just writing the URL to the page. In that case, since you already have that value in JavaScript, you could just write the value to the page using JavaScript. (Also, note that the code you provide isn't going to work correctly anyway, because you have HTML mixed in between your opening and closing script tags). If you actually do need it as a CF variable for some reason, you could use Ajax to set the value (though it would have to be in a persistent scope, such as a session variable). Or, since you just have the value hard-coded in the example, you could just hard-code it again when setting the CF variable (if your intention is to hard-code it). Scott On Sat, Jun 11, 2011 at 8:41 PM, Gunjan Upadhayay 29gunjanupadha...@gmail.com wrote: I am trying to assign javascript variable into cold fusion .But it's not working as expected.Please assist cfif ADerror eq Success and len(trim(getDetails.userPrincipalName)) gt 0 cfset userDomain = listGetAt(listGetAt(getDetails.userPrincipalName, 2, @), 1, .) / cfset userID = listGetAt(getDetails.userPrincipalName, 1, @) / cfset userDomain_ID = userDomain _ userID / cfoutputuserDomain_ID: #userDomain_ID#br//cfoutput cfif len(trim(userDomain_ID)) script language='javascript' function loaddefimages(Id,domain) { document.getElementById(Id).src= http://mysites10.test.com/Profile%20Pictures/ +domain+_#userID#_LThumb.jpg; var temp = document.getElementById(jsURL).value = http://mysites10.test.com/Profile%20Pictures/ +domain+_#userID#_LThumb.jpg; } img id=img1 src= http://mysites10.test.com/Profile%20Pictures/NA_#userID#_LThumb.jpg; alt= onerror=javascript:loaddefimages('img2','AM'); / img id=img2 src= alt= onerror=javascript:loaddefimages('img3','CSA'); / img id=img3 src= alt= onerror=javascript:loaddefimages('img4', 'AP'); / img id=img4 src= alt= onerror=this.src=' http://sme-d.am.test.com/#right(attributes.global_id, 8)#.jpg'/ cfinput name = jsURL id = jsURL cfset Variables.photoURL = #temp# / cfoutput#photoURL#/cfoutput /script /cfif ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345189 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
What am I missing with this code? (Javascript)
Hi, guys... With all the chatter about Homesite and the reminiscing about the good ole days of programming, I thought I'd give you something more up-to-date to think about. This is part of a larger CF/jQuery application that I just can't figure how to get running properly. I'm sure it's how I'm handling variables, but I've rewritten this probably 100 times to get a variation that works. Why do I get this error: slidePosition is not defined line: delay = setTimeout('nextSlide(slidePosition)', 12000); } When I run this jQuery/Javascript: script type=text/javascript $(document).ready(function() { var slidePosition = 0; playTrack(slidePosition); }); /script script type=text/javascript function playTrack(slidePosition) { $.sound.play('slideshow0' + (slidePosition + 1) + '.mp3', {timeout:12000}); if ( slidePosition 6 ) { delay = setTimeout('nextSlide(slidePosition)', 12000); } }; function nextSlide(slidePosition) { slidePosition++; playTrack(slidePosition); }; /script Thanks for any feedback! Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345209 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What am I missing with this code? (Javascript)
You declared slidePosition as a local variable inside the ready() function, so it doesn't exist for the other functions. Try making it global, like this: script type=text/javascript var slidePosition = 0; $(document).ready(function() { playTrack(slidePosition); }); /script On 6/12/2011 2:52 PM, Rick Faircloth wrote: script type=text/javascript $(document).ready(function() { var slidePosition = 0; playTrack(slidePosition); }); /script ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345210 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: What am I missing with this code? (Javascript)
Thanks, Jason... that seemed to solve that problem. (Did I mention I hate JS variables :o) Now, for some reason I can't fathom, The code: slidePosition++; increments slidePosition from 1 to 2 on the first iteration, but after that it won't increment to 3 or beyond... simply repeats at 2. Why? Is the global variable becoming a local variable or something when being passed from function to function? script type=text/javascript var slidePosition = 1; $(document).ready(function() { playTrack(slidePosition); }); /script script type=text/javascript function playTrack(slidePosition) { alert('1: slidePosition = ' + slidePosition); $.sound.play('slideshow0' + slidePosition + '.mp3', {timeout:12000}); if ( slidePosition 6 ) { delay = setTimeout('nextSlide(slidePosition)', 12000); } }; function nextSlide(slidePosition) { slidePosition++; alert('2: slidePostion = ' + slidePosition); playTrack(slidePosition); }; /script -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: Sunday, June 12, 2011 3:06 PM To: cf-talk Subject: Re: What am I missing with this code? (Javascript) You declared slidePosition as a local variable inside the ready() function, so it doesn't exist for the other functions. Try making it global, like this: script type=text/javascript var slidePosition = 0; $(document).ready(function() { playTrack(slidePosition); }); /script ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345215 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What am I missing with this code? (Javascript)
Not sure, but now that I look at it, you don't need to pass slidePosition around at all now that it's a global variable. Try this: script type=text/javascript var slidePosition = 1; $(document).ready(function() { playTrack(); }); /script script type=text/javascript function playTrack() { alert('1: slidePosition = ' + slidePosition); $.sound.play('slideshow0' + slidePosition + '.mp3', {timeout:12000}); if ( slidePosition 6 ) { delay = setTimeout('nextSlide()', 12000); } }; function nextSlide() { slidePosition++; alert('2: slidePostion = ' + slidePosition); playTrack(); }; /script ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345219 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: What am I missing with this code? (Javascript)
Excellent! Thanks! -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: Sunday, June 12, 2011 4:42 PM To: cf-talk Subject: Re: What am I missing with this code? (Javascript) Not sure, but now that I look at it, you don't need to pass slidePosition around at all now that it's a global variable. Try this: script type=text/javascript var slidePosition = 1; $(document).ready(function() { playTrack(); }); /script script type=text/javascript function playTrack() { alert('1: slidePosition = ' + slidePosition); $.sound.play('slideshow0' + slidePosition + '.mp3', {timeout:12000}); if ( slidePosition 6 ) { delay = setTimeout('nextSlide()', 12000); } }; function nextSlide() { slidePosition++; alert('2: slidePostion = ' + slidePosition); playTrack(); }; /script ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345221 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
assigning javascript variable to coldfusion.Please assist
I am trying to assign javascript variable into cold fusion .But it's not working as expected.Please assist cfif ADerror eq Success and len(trim(getDetails.userPrincipalName)) gt 0 cfset userDomain = listGetAt(listGetAt(getDetails.userPrincipalName, 2, @), 1, .) / cfset userID = listGetAt(getDetails.userPrincipalName, 1, @) / cfset userDomain_ID = userDomain _ userID / cfoutputuserDomain_ID: #userDomain_ID#br//cfoutput cfif len(trim(userDomain_ID)) script language='javascript' function loaddefimages(Id,domain) { document.getElementById(Id).src=http://mysites10.test.com/Profile%20Pictures/+domain+_#userID#_LThumb.jpg;; var temp = document.getElementById(jsURL).value =http://mysites10.test.com/Profile%20Pictures/+domain+_#userID#_LThumb.jpg;; } img id=img1 src=http://mysites10.test.com/Profile%20Pictures/NA_#userID#_LThumb.jpg; alt= onerror=javascript:loaddefimages('img2','AM'); / img id=img2 src= alt= onerror=javascript:loaddefimages('img3','CSA'); / img id=img3 src= alt= onerror=javascript:loaddefimages('img4', 'AP'); / img id=img4 src= alt= onerror=this.src='http://sme-d.am.test.com/#right(attributes.global_id, 8)#.jpg'/ cfinput name = jsURL id = jsURL cfset Variables.photoURL = #temp# / cfoutput#photoURL#/cfoutput /script /cfif ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345185 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript not working inside of cflayoutarea
Got it now. Thanks guys for all of the help. I really appreciate it. -Steve 1) in your main page change this: $(document).ready(function() { $(#accordion).accordion(); }); to this: doAccordion = function() { $(#accordion).accordion(); }); 2) make html code in your test.cfm standards-compliant (add doctype, html, head, body, etc tags) and then add this as the last line before the closing /body tag: cfset ajaxonload('doAccordion') Azadi On 13/04/2011 11:09 , Steve Sequenzia wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343696 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript not working inside of cflayoutarea
Thanks guys. Any idea how to make this jquery work in cflayout? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleMAMBA - Martial Arts Management Business Automation/title link href=style.css rel=stylesheet type=text/css / link href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css; rel=stylesheet type=text/css/ script src=http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js;/script script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js;/script script $(document).ready(function() { $(#accordion).accordion(); }); /script /head body cfajaximport tags=cflayout-accordion, cfdiv, cfpod, cfinput-autosuggest, cfwindow, cfform, cfgrid, cflayout-border, cftree, cfinput-datefield cflayout type=border fittowindow=yes cflayoutarea name=top position=top style=background:##414144; height:90px; source=top.cfm/cflayoutarea cflayoutarea name=left position=left style=width:200px; splitter=false collapsible=false source=test.cfm/cflayoutarea cflayoutarea name=main position=center style=background:##E8E8E8; height:100%; source=main.cfm/cflayoutarea /cflayout /body /html Test.cfm div id=accordion h3a href=#Section 1/a/h3 div p /p /div h3a href=#Section 2/a/h3 div p /p /div h3a href=#Section 3/a/h3 div p /p ul liList item one/li liList item two/li liList item three/li /ul /div /div Steve cfajaximport scriptsrc=... is only for cf's built-in scripts - you do not use it to load anything else. and you only need to use it if you do not have access to default cf's scripts folder or if you have moved the default cf scripts to another folder. to load jquery or any other js scripts, you just use your regular script tags in the head section of your page. specifically for dealing with scripts in pages loaded into cf's ajax containers i found this approach working best: - include your js library (jquery) in the main page (the one that has cflayout tags in you case) - include any js code that needs to run after pages have been loaded into ajax containers as separate js functions in the main page's head section as well. - in the pages loaded inside ajax containers add cfset ajaxonload('name-of-your-js-function-to-execute-here') as the last line before the closing /body tag: this will run the specified js function after the page has been loaded inside the container Azadi On 11/04/2011 22:31 , Steve Sequenzia wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343690 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Javascript not working inside of cflayoutarea
Put this script $(document).ready(function() { $(#accordion).accordion(); }); /script Inside your test.cfm and leave the rest where it is. Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Steve Sequenzia [mailto:c...@thinksys.com] Sent: Wednesday, 13 April 2011 1:09 PM To: cf-talk Subject: Re: Javascript not working inside of cflayoutarea Thanks guys. Any idea how to make this jquery work in cflayout? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleMAMBA - Martial Arts Management Business Automation/title link href=style.css rel=stylesheet type=text/css / link href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jque ry-ui.css rel=stylesheet type=text/css/ script src=http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js;/scrip t script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery- ui.min.js/script script $(document).ready(function() { $(#accordion).accordion(); }); /script /head body cfajaximport tags=cflayout-accordion, cfdiv, cfpod, cfinput-autosuggest, cfwindow, cfform, cfgrid, cflayout-border, cftree, cfinput-datefield cflayout type=border fittowindow=yes cflayoutarea name=top position=top style=background:##414144; height:90px; source=top.cfm/cflayoutarea cflayoutarea name=left position=left style=width:200px; splitter=false collapsible=false source=test.cfm/cflayoutarea cflayoutarea name=main position=center style=background:##E8E8E8; height:100%; source=main.cfm/cflayoutarea /cflayout /body /html Test.cfm div id=accordion h3a href=#Section 1/a/h3 div p /p /div h3a href=#Section 2/a/h3 div p /p /div h3a href=#Section 3/a/h3 div p /p ul liList item one/li liList item two/li liList item three/li /ul /div /div Steve cfajaximport scriptsrc=... is only for cf's built-in scripts - you do not use it to load anything else. and you only need to use it if you do not have access to default cf's scripts folder or if you have moved the default cf scripts to another folder. to load jquery or any other js scripts, you just use your regular script tags in the head section of your page. specifically for dealing with scripts in pages loaded into cf's ajax containers i found this approach working best: - include your js library (jquery) in the main page (the one that has cflayout tags in you case) - include any js code that needs to run after pages have been loaded into ajax containers as separate js functions in the main page's head section as well. - in the pages loaded inside ajax containers add cfset ajaxonload('name-of-your-js-function-to-execute-here') as the last line before the closing /body tag: this will run the specified js function after the page has been loaded inside the container Azadi On 11/04/2011 22:31 , Steve Sequenzia wrote: ~~ ~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion- Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf- talk/message.cfm/messageid:343690 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf- talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343691 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript not working inside of cflayoutarea
1) in your main page change this: $(document).ready(function() { $(#accordion).accordion(); }); to this: doAccordion = function() { $(#accordion).accordion(); }); 2) make html code in your test.cfm standards-compliant (add doctype, html, head, body, etc tags) and then add this as the last line before the closing /body tag: cfset ajaxonload('doAccordion') Azadi On 13/04/2011 11:09 , Steve Sequenzia wrote: Thanks guys. Any idea how to make this jquery work in cflayout? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleMAMBA - Martial Arts Management Business Automation/title link href=style.css rel=stylesheet type=text/css / link href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css; rel=stylesheet type=text/css/ script src=http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js;/script script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js;/script script $(document).ready(function() { $(#accordion).accordion(); }); /script /head body cfajaximport tags=cflayout-accordion, cfdiv, cfpod, cfinput-autosuggest, cfwindow, cfform, cfgrid, cflayout-border, cftree, cfinput-datefield cflayout type=border fittowindow=yes cflayoutarea name=top position=top style=background:##414144; height:90px; source=top.cfm/cflayoutarea cflayoutarea name=left position=left style=width:200px; splitter=false collapsible=false source=test.cfm/cflayoutarea cflayoutarea name=main position=center style=background:##E8E8E8; height:100%; source=main.cfm/cflayoutarea /cflayout /body /html Test.cfm div id=accordion h3a href=#Section 1/a/h3 div p /p /div h3a href=#Section 2/a/h3 div p /p /div h3a href=#Section 3/a/h3 div p /p ul liList item one/li liList item two/li liList item three/li /ul /div /div Steve cfajaximport scriptsrc=... is only for cf's built-in scripts - you do not use it to load anything else. and you only need to use it if you do not have access to default cf's scripts folder or if you have moved the default cf scripts to another folder. to load jquery or any other js scripts, you just use your regular script tags in thehead section of your page. specifically for dealing with scripts in pages loaded into cf's ajax containers i found this approach working best: - include your js library (jquery) in the main page (the one that has cflayout tags in you case) - include any js code that needs to run after pages have been loaded into ajax containers as separate js functions in the main page'shead section as well. - in the pages loaded inside ajax containers addcfset ajaxonload('name-of-your-js-function-to-execute-here') as the last line before the closing/body tag: this will run the specified js function after the page has been loaded inside the container Azadi On 11/04/2011 22:31 , Steve Sequenzia wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343692 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Javascript not working inside of cflayoutarea
How is you JavaScript written? Is it like this Function funcName() { } Or is it written like funcName = function() {}; This is important, and as per the nodes in the documentation there are issues with JS not working, if you are not following the latter method. If however you are doing this, can you confirm with me that it is loaded in the page, or is it included as a separate file in the loading page. By going to FireFox and using firebug you can confirm that the pages are loading, after that you can either debug the script and see if it is being run or not. Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Steve Sequenzia [mailto:c...@thinksys.com] Sent: Monday, 11 April 2011 3:45 PM To: cf-talk Subject: Javascript not working inside of cflayoutarea I have a index page that has a cflayout and a cflayoutarea with a source to another cfm page. The cfm page that the cflayoutarea uses as the source has a jquery menu in it. When it loads all of the javascript that powers the jquery menu is not loading. I made sure that the javascript source files were being loaded on the index page. I have also been trying to get them to load with cfajaximport scriptSrc but that is not working. Here is some code: cflayout type=hbox cflayoutarea name=nav source=nav_pos.cfm /cflayoutarea /cflayout The nav_pos.cfm has the jquery on it that is not working. Any help on this would be great. Thanks! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343641 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript not working inside of cflayoutarea
Andrew, Thanks for the response. I fixed the functions to this format - funcName = function() {};. All of the scripts are in separate files. Do I need to use cfajaximport scriptSrc or can I just put the scripts into the CFIDE/scripts folder? I am confused how all that works. Thanks again. -Steve How is you JavaScript written? Is it like this Function funcName() { } Or is it written like funcName = function() {}; This is important, and as per the nodes in the documentation there are issues with JS not working, if you are not following the latter method. If however you are doing this, can you confirm with me that it is loaded in the page, or is it included as a separate file in the loading page. By going to FireFox and using firebug you can confirm that the pages are loading, after that you can either debug the script and see if it is being run or not. Regards, Andrew Scott http://www.andyscott.id.au/ I have a index page that has a cflayout and a cflayoutarea with a source to another cfm page. The cfm page that the cflayoutarea uses as the source has a jquery menu in it. When it loads all of the javascript that powers the jquery menu is not loading. I made sure that the javascript source files were being loaded on the index page. I have also been trying to get them to load with cfajaximport scriptSrc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343642 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Javascript not working inside of cflayoutarea
From my experience it is always that people forget that these new UI features, all created div and other elements in the current page to do what they need. Ok having said that, I am betting my bottom dollar that with what you are returning to be displayed, doesn't contain any htmlbody etc html tags. This is important because the ColdFusion underneath the hood, needs these tags to include the extra files etc that they need. And because the main page is already loaded, ColdFusion can't add them to the current page, from the page that is being loaded. I hope that makes sense, there are two options you can try here and option 2 is my preferred method. Option 1: return the html tags htmlbody etc, this would ensure that the import the tag on the page, ColdFusion while generating the page can place the needed code in the header of the page. Downside to this is that you end up with a malformed dom, and will fail validators. Option 2: Just place the import on the main page, this might seem overkill if you are only going to use it once or twice. But the upside is that you are generating valid html. Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Steve Sequenzia [mailto:c...@thinksys.com] Sent: Monday, 11 April 2011 11:16 PM To: cf-talk Subject: Re: Javascript not working inside of cflayoutarea Andrew, Thanks for the response. I fixed the functions to this format - funcName = function() {};. All of the scripts are in separate files. Do I need to use cfajaximport scriptSrc or can I just put the scripts into the CFIDE/scripts folder? I am confused how all that works. Thanks again. -Steve ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343643 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript not working inside of cflayoutarea
Andrew, I understand what you are saying. I would rather import the files. I just can't seem to get the syntax right. I am trying this - cfajaximport scriptsrc=\CFIDE\scripts\jquery\ When I do that all the other ajax stuff on the page does not load. Do I need to redirect all the files? Thanks again. -Steve From my experience it is always that people forget that these new UI features, all created div and other elements in the current page to do what they need. Ok having said that, I am betting my bottom dollar that with what you are returning to be displayed, doesn't contain any htmlbody etc html tags. This is important because the ColdFusion underneath the hood, needs these tags to include the extra files etc that they need. And because the main page is already loaded, ColdFusion can't add them to the current page, from the page that is being loaded. I hope that makes sense, there are two options you can try here and option 2 is my preferred method. Option 1: return the html tags htmlbody etc, this would ensure that the import the tag on the page, ColdFusion while generating the page can place the needed code in the header of the page. Downside to this is that you end up with a malformed dom, and will fail validators. Option 2: Just place the import on the main page, this might seem overkill if you are only going to use it once or twice. But the upside is that you are generating valid html. Regards, Andrew Scott http://www.andyscott.id.au/ Andrew, Thanks for the response. I fixed the functions to this format - funcName = function() {};. All of the scripts are in separate files. Do I need to use cfajaximport scriptSrc or can I just put the scripts into the CFIDE/scripts folder? I am confused how all that works. Thanks again. -Steve ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343645 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Javascript not working inside of cflayoutarea
Where are you trying to load the jquery from, the main page or the page that gets loaded with the layout? Secondly, did you place the jquery files in the cfide? If not then you might want to go to the jquery website download the jQuery distribution, and use that, or you could use the google CDN version. Have you got an example of your cfajaximport code, it might be that if the above is not true then jquery is being relatively loaded and not absolutely loaded, this means that it is trying to find the jquery package in the wrong directory. Again firebug and the Net option tab in FireFox will quickly show all this for you, for example if it can't find or load a file for any reason it will tell you all this and which files. You can then compare this with they are supposed to be, and fix accordingly. If you aren't using FireBug for FireFox then I would highly recommend this add on, it is invaluable when it comes to development like this. Regards, Andrew Scott http://www.andyscott.id.au/ -Original Message- From: Steve Sequenzia [mailto:c...@thinksys.com] Sent: Tuesday, 12 April 2011 12:31 AM To: cf-talk Subject: Re: Javascript not working inside of cflayoutarea Andrew, I understand what you are saying. I would rather import the files. I just can't seem to get the syntax right. I am trying this - cfajaximport scriptsrc=\CFIDE\scripts\jquery\ When I do that all the other ajax stuff on the page does not load. Do I need to redirect all the files? Thanks again. -Steve ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343649 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript not working inside of cflayoutarea
Steve cfajaximport scriptsrc=... is only for cf's built-in scripts - you do not use it to load anything else. and you only need to use it if you do not have access to default cf's scripts folder or if you have moved the default cf scripts to another folder. to load jquery or any other js scripts, you just use your regular script tags in the head section of your page. specifically for dealing with scripts in pages loaded into cf's ajax containers i found this approach working best: - include your js library (jquery) in the main page (the one that has cflayout tags in you case) - include any js code that needs to run after pages have been loaded into ajax containers as separate js functions in the main page's head section as well. - in the pages loaded inside ajax containers add cfset ajaxonload('name-of-your-js-function-to-execute-here') as the last line before the closing /body tag: this will run the specified js function after the page has been loaded inside the container Azadi On 11/04/2011 22:31 , Steve Sequenzia wrote: Andrew, I understand what you are saying. I would rather import the files. I just can't seem to get the syntax right. I am trying this -cfajaximport scriptsrc=\CFIDE\scripts\jquery\ When I do that all the other ajax stuff on the page does not load. Do I need to redirect all the files? Thanks again. -Steve From my experience it is always that people forget that these new UI features, all created div and other elements in the current page to do what they need. Ok having said that, I am betting my bottom dollar that with what you are returning to be displayed, doesn't contain anyhtmlbody etc html tags. This is important because the ColdFusion underneath the hood, needs these tags to include the extra files etc that they need. And because the main page is already loaded, ColdFusion can't add them to the current page, from the page that is being loaded. I hope that makes sense, there are two options you can try here and option 2 is my preferred method. Option 1: return the html tagshtmlbody etc, this would ensure that the import the tag on the page, ColdFusion while generating the page can place the needed code in the header of the page. Downside to this is that you end up with a malformed dom, and will fail validators. Option 2: Just place the import on the main page, this might seem overkill if you are only going to use it once or twice. But the upside is that you are generating valid html. Regards, Andrew Scott http://www.andyscott.id.au/ Andrew, Thanks for the response. I fixed the functions to this format - funcName = function() {};. All of the scripts are in separate files. Do I need to use cfajaximport scriptSrc or can I just put the scripts into the CFIDE/scripts folder? I am confused how all that works. Thanks again. -Steve ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343650 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Javascript not working inside of cflayoutarea
I have a index page that has a cflayout and a cflayoutarea with a source to another cfm page. The cfm page that the cflayoutarea uses as the source has a jquery menu in it. When it loads all of the javascript that powers the jquery menu is not loading. I made sure that the javascript source files were being loaded on the index page. I have also been trying to get them to load with cfajaximport scriptSrc but that is not working. Here is some code: cflayout type=hbox cflayoutarea name=nav source=nav_pos.cfm /cflayoutarea /cflayout The nav_pos.cfm has the jquery on it that is not working. Any help on this would be great. Thanks! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343640 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript question
Is it possible that the click event is actually happening on the TD elements and not the TR? You might try attaching the click event to the parent table (so it only binds to one element) and take advantage of event bubbling. Use the event.target attribute to get to the row: $(#mytable).click(function(event) { var $target = event.target; if ( $target.is(td) ) { row_id = $target.parent().attr(id); } else if ( $target.is(tr) ) { row_id = $target.attr(id); } rest of your code here }); HTH, Carl On 3/13/2011 7:43 AM, fun and learning wrote: Hi All - I am trying to get the following working. It seemed to work initially, but somehow it stopped working I have a row like below tr id=row_1_4_2009_abc class=rowclick td/td /tr I am using jquery to get the id on click of a row: $(.rowclick).click(function() { var row_id = $(this).attr(id); var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value; }); Can anyone let me know what is wrong with the above code. Tried different options but with no success ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343008 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Javascript question
Hi All - I am trying to get the following working. It seemed to work initially, but somehow it stopped working I have a row like below tr id=row_1_4_2009_abc class=rowclick td/td /tr I am using jquery to get the id on click of a row: $(.rowclick).click(function() { var row_id = $(this).attr(id); var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value; }); Can anyone let me know what is wrong with the above code. Tried different options but with no success ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342959 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Javascript question
Hi All - I am trying to get the following working. It seemed to work initially, but somehow it stopped working I have a row like below tr id=row_1_4_2009_abc class=rowclick td/td /tr I am using jquery to get the id on click of a row: $(.rowclick).click(function() { var row_id = $(this).attr(id); var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value; }); Can anyone let me know what is wrong with the above code. Tried different options but with no success ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342960 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript question
Look into jQuery's .each() method. It helps in loopin over things like that -Jake Sent from my Droid On Mar 13, 2011 9:51 AM, fun and learning funandlrnn...@gmail.com wrote: Hi All - I am trying to get the following working. It seemed to work initially, but somehow it stopped working I have a row like below tr id=row_1_4_2009_abc class=rowclick td/td /tr I am using jquery to get the id on click of a row: $(.rowclick).click(function() { var row_id = $(this).attr(id); var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value; }); Can anyone let me know what is wrong with the above code. Tried different options but with no success ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342961 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript question
it looks like you are using the classname instead of the object ID. normally the $() function is fer getting a reference to a obejct by its ID. $(.rowclick) shouldn't this be $(row_1_4_2009_abc) On Sun, Mar 13, 2011 at 3:29 PM, Jake Churchill reyna...@gmail.com wrote: Look into jQuery's .each() method. It helps in loopin over things like that -Jake Sent from my Droid On Mar 13, 2011 9:51 AM, fun and learning funandlrnn...@gmail.com wrote: Hi All - I am trying to get the following working. It seemed to work initially, but somehow it stopped working I have a row like below tr id=row_1_4_2009_abc class=rowclick td/td /tr I am using jquery to get the id on click of a row: $(.rowclick).click(function() { var row_id = $(this).attr(id); var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value; }); Can anyone let me know what is wrong with the above code. Tried different options but with no success ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342962 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript question
$(.rowclick) is completely acceptable. It will just add the function to all elements with that class name, which I assume is that the OP is looking for. OP: In the code you pasted what part isn't working exactly? All you are doing is setting some variables. I don't see in the code where any actually does anything other than populate variables which are all var'd to the function, they aren't global. Also, can you confirm that there is an element with the id of new_row_1_4_2009_abc and a parameter called value? I guess it might help if we knew what exactly you were trying to accomplish in order to determine if it's working or not. On a side note, since you are using jQuery I'd recommend the jQuery $(#idname).val() instead of document.getElementById(idname).value. On Sun, Mar 13, 2011 at 12:17 PM, Russ Michaels r...@michaels.me.uk wrote: it looks like you are using the classname instead of the object ID. normally the $() function is fer getting a reference to a obejct by its ID. $(.rowclick) shouldn't this be $(row_1_4_2009_abc) On Sun, Mar 13, 2011 at 3:29 PM, Jake Churchill reyna...@gmail.com wrote: Look into jQuery's .each() method. It helps in loopin over things like that -Jake Sent from my Droid On Mar 13, 2011 9:51 AM, fun and learning funandlrnn...@gmail.com wrote: Hi All - I am trying to get the following working. It seemed to work initially, but somehow it stopped working I have a row like below tr id=row_1_4_2009_abc class=rowclick td/td /tr I am using jquery to get the id on click of a row: $(.rowclick).click(function() { var row_id = $(this).attr(id); var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value; }); Can anyone let me know what is wrong with the above code. Tried different options but with no success ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342963 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript question
And one other thought. If your code posted accurately reflects the id's of the items you can replace this: var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value; with this: var new_row_id = $('#new_' + row_id).val(); In both cases id is going to evaluate to: new_row_1_4_2009_abc so all you need to do is prepend new_. On Sun, Mar 13, 2011 at 1:48 PM, Michael Grant mgr...@modus.bz wrote: $(.rowclick) is completely acceptable. It will just add the function to all elements with that class name, which I assume is that the OP is looking for. OP: In the code you pasted what part isn't working exactly? All you are doing is setting some variables. I don't see in the code where any actually does anything other than populate variables which are all var'd to the function, they aren't global. Also, can you confirm that there is an element with the id of new_row_1_4_2009_abc and a parameter called value? I guess it might help if we knew what exactly you were trying to accomplish in order to determine if it's working or not. On a side note, since you are using jQuery I'd recommend the jQuery $(#idname).val() instead of document.getElementById(idname).value. On Sun, Mar 13, 2011 at 12:17 PM, Russ Michaels r...@michaels.me.ukwrote: it looks like you are using the classname instead of the object ID. normally the $() function is fer getting a reference to a obejct by its ID. $(.rowclick) shouldn't this be $(row_1_4_2009_abc) On Sun, Mar 13, 2011 at 3:29 PM, Jake Churchill reyna...@gmail.com wrote: Look into jQuery's .each() method. It helps in loopin over things like that -Jake Sent from my Droid On Mar 13, 2011 9:51 AM, fun and learning funandlrnn...@gmail.com wrote: Hi All - I am trying to get the following working. It seemed to work initially, but somehow it stopped working I have a row like below tr id=row_1_4_2009_abc class=rowclick td/td /tr I am using jquery to get the id on click of a row: $(.rowclick).click(function() { var row_id = $(this).attr(id); var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value; }); Can anyone let me know what is wrong with the above code. Tried different options but with no success ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342964 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Javascript question
You didn't say what it is you're trying to accomplish, nor did you post example code, so we can't really say what's not working. One thing you could try is simplifying your code. Try replacing 3 lines with one: // old lines var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value;}); // new line new_row_id = $('#' + row_id.replace(/^row/,'new_row') ); -Original Message- From: fun and learning [mailto:funandlrnn...@gmail.com] Sent: Sunday, March 13, 2011 9:43 AM To: cf-talk Subject: Javascript question Hi All - I am trying to get the following working. It seemed to work initially, but somehow it stopped working I have a row like below tr id=row_1_4_2009_abc class=rowclick td/td /tr I am using jquery to get the id on click of a row: $(.rowclick).click(function() { var row_id = $(this).attr(id); var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id = document.getElementById(new_row_ + setCommonAttr).value; }); Can anyone let me know what is wrong with the above code. Tried different options but with no success ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342965 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
coldfusion array to javascript via ajax
hi i am thinking the solution to this is staring me in the face but cannot seem to work it out! I am making a call to the server via ext.ajax.request and i want the server to pass back an array for javascript to use. I am currently passing the array back using SerializeJSON(theArray), however in JS if i use the Ext.util.JSON.decode(result.theArray); it is not turning it back into an array... it just prints a string '[1,2,3]' i have tried the alternative arrayToJSON function (which is part of the toJSON library) but JS recieves the array and prints it as: {data:[data:1,data:2,data:3]} and i dont have a clue how to convert that back into a javascript array of '1,2,3' would appreciate any help, thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342923 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: coldfusion array to javascript via ajax
i used eval() in javascript and now works fine! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342930 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cfdocument and javascript
Hi All, I am using cfdocument with format = pdf. I am displaying some dynamic data. I need to have an expand/collapse functionality within the pdf. Is it possible to implement the same using javascript in cfdocument? Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342782 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfdocument and javascript
On Sun, Mar 6, 2011 at 5:49 PM, fun and learning wrote: I am using cfdocument with format = pdf. I am displaying some dynamic data. I need to have an expand/collapse functionality within the pdf. Is it possible to implement the same using javascript in cfdocument? You can not do that with cfdocument. You would need to create an XFA PDF form using LiveCycle Designer (part of Adobe Acrobat) and then will it with the proper data using cfpdfform. Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342783 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
custom tag and javascript question
I have been running into an issue with not being able to read across forms on a site I am working on. The site is set up so that instead of using cfinclude, they address pages as custom tags (ie header.cfm is called as cf_header url_val=xx. The basic setup is there is an index.cfm that acts like a driver page that calls the tags and the called pages may also call tags as well. We have a dropdown to select with all of the properties or an individual property (Hotel properties). We are adding the ability for the hotels, if they take this into account, count the number of infants. This form field (itself a dropdown) is in a different form that is physically located in a different file (which is the parent page that is calling the file that the above dropdown live on). In the rendered html and javascript, the property section comes before the form that has the number of infants. What I am trying to accomplish is that when I change the hotel property, I want it to check against a session var that determines whether or not that property does an infant count and check a hidden form field to see if the value of infants is greater than 0. The problem I am having is that the hidden field that I have in the form isn't showing up. Does this have something to do with the fact that pages are being used as custom tags? I have never seen a site structured like this.it's pretty unique and not a bad idea, but I am wondering what effects on how variables are available to other tags/pages this structure has. Here's the basic structure: Index.cfm calls call_index.cfm as cf_call_index.cfm..call_index.cfm calls call_index2.cfm as cf_call_index2. Form 1 with the property dropdown physically resides on call_index2.cfm and form 2 that has the infant count dropdown physically resides on call_index.cfm. Anyone have an experience dealing with this kind of structure? Eric ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340337 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: custom tag and javascript question
How your cf is set up does little to effect how the javascript will communicate with other forms. JS will traverse your page in the usual way. The fact that one form is in a different file than another form doesn't matter to JS since by the time it gets to the client browser it's all one page as it were. How are you trying to get JS to target the forms now? What code is failing? On Fri, Dec 31, 2010 at 1:06 PM, Eric Roberts ow...@threeravensconsulting.com wrote: I have been running into an issue with not being able to read across forms on a site I am working on. The site is set up so that instead of using cfinclude, they address pages as custom tags (ie header.cfm is called as cf_header url_val=xx. The basic setup is there is an index.cfm that acts like a driver page that calls the tags and the called pages may also call tags as well. We have a dropdown to select with all of the properties or an individual property (Hotel properties). We are adding the ability for the hotels, if they take this into account, count the number of infants. This form field (itself a dropdown) is in a different form that is physically located in a different file (which is the parent page that is calling the file that the above dropdown live on). In the rendered html and javascript, the property section comes before the form that has the number of infants. What I am trying to accomplish is that when I change the hotel property, I want it to check against a session var that determines whether or not that property does an infant count and check a hidden form field to see if the value of infants is greater than 0. The problem I am having is that the hidden field that I have in the form isn't showing up. Does this have something to do with the fact that pages are being used as custom tags? I have never seen a site structured like this.it's pretty unique and not a bad idea, but I am wondering what effects on how variables are available to other tags/pages this structure has. Here's the basic structure: Index.cfm calls call_index.cfm as cf_call_index.cfm..call_index.cfm calls call_index2.cfm as cf_call_index2. Form 1 with the property dropdown physically resides on call_index2.cfm and form 2 that has the infant count dropdown physically resides on call_index.cfm. Anyone have an experience dealing with this kind of structure? Eric ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340338 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: custom tag and javascript question
CF simply outputs any content in the file, it does not automatically make any decisions about what to display unless you have defined this with if/else block or switch/case statements or are dynamically generating the content. The other thing that could stop content being displayed is a cfsetting enablecfoutputonly=yes or a cfsilent Also as you are using custom tags you can block the content with thistag.generatedcontent so i would check your code for all these possibilities Russ On Fri, Dec 31, 2010 at 6:49 PM, Michael Grant mgr...@modus.bz wrote: How your cf is set up does little to effect how the javascript will communicate with other forms. JS will traverse your page in the usual way. The fact that one form is in a different file than another form doesn't matter to JS since by the time it gets to the client browser it's all one page as it were. How are you trying to get JS to target the forms now? What code is failing? On Fri, Dec 31, 2010 at 1:06 PM, Eric Roberts ow...@threeravensconsulting.com wrote: I have been running into an issue with not being able to read across forms on a site I am working on. The site is set up so that instead of using cfinclude, they address pages as custom tags (ie header.cfm is called as cf_header url_val=xx. The basic setup is there is an index.cfm that acts like a driver page that calls the tags and the called pages may also call tags as well. We have a dropdown to select with all of the properties or an individual property (Hotel properties). We are adding the ability for the hotels, if they take this into account, count the number of infants. This form field (itself a dropdown) is in a different form that is physically located in a different file (which is the parent page that is calling the file that the above dropdown live on). In the rendered html and javascript, the property section comes before the form that has the number of infants. What I am trying to accomplish is that when I change the hotel property, I want it to check against a session var that determines whether or not that property does an infant count and check a hidden form field to see if the value of infants is greater than 0. The problem I am having is that the hidden field that I have in the form isn't showing up. Does this have something to do with the fact that pages are being used as custom tags? I have never seen a site structured like this.it's pretty unique and not a bad idea, but I am wondering what effects on how variables are available to other tags/pages this structure has. Here's the basic structure: Index.cfm calls call_index.cfm as cf_call_index.cfm..call_index.cfm calls call_index2.cfm as cf_call_index2. Form 1 with the property dropdown physically resides on call_index2.cfm and form 2 that has the infant count dropdown physically resides on call_index.cfm. Anyone have an experience dealing with this kind of structure? Eric ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340339 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: custom tag and javascript question
In the same on change event that causes the page to go from all properties to an individual property I have it assign the value of a hidden form field to the value of the infants dropdown...yet when the page loads, there are no form fields... Eric -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Friday, December 31, 2010 12:49 To: cf-talk Subject: Re: custom tag and javascript question How your cf is set up does little to effect how the javascript will communicate with other forms. JS will traverse your page in the usual way. The fact that one form is in a different file than another form doesn't matter to JS since by the time it gets to the client browser it's all one page as it were. How are you trying to get JS to target the forms now? What code is failing? On Fri, Dec 31, 2010 at 1:06 PM, Eric Roberts ow...@threeravensconsulting.com wrote: I have been running into an issue with not being able to read across forms on a site I am working on. The site is set up so that instead of using cfinclude, they address pages as custom tags (ie header.cfm is called as cf_header url_val=xx. The basic setup is there is an index.cfm that acts like a driver page that calls the tags and the called pages may also call tags as well. We have a dropdown to select with all of the properties or an individual property (Hotel properties). We are adding the ability for the hotels, if they take this into account, count the number of infants. This form field (itself a dropdown) is in a different form that is physically located in a different file (which is the parent page that is calling the file that the above dropdown live on). In the rendered html and javascript, the property section comes before the form that has the number of infants. What I am trying to accomplish is that when I change the hotel property, I want it to check against a session var that determines whether or not that property does an infant count and check a hidden form field to see if the value of infants is greater than 0. The problem I am having is that the hidden field that I have in the form isn't showing up. Does this have something to do with the fact that pages are being used as custom tags? I have never seen a site structured like this.it's pretty unique and not a bad idea, but I am wondering what effects on how variables are available to other tags/pages this structure has. Here's the basic structure: Index.cfm calls call_index.cfm as cf_call_index.cfm..call_index.cfm calls call_index2.cfm as cf_call_index2. Form 1 with the property dropdown physically resides on call_index2.cfm and form 2 that has the infant count dropdown physically resides on call_index.cfm. Anyone have an experience dealing with this kind of structure? Eric ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340340 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: custom tag and javascript question
Maybe I'm not following along here. How can the JS assign a value to a hidden form field if CF isn't rendering the hidden form field onto the page? Is this hidden form field wrapped in cfoutput? On Fri, Dec 31, 2010 at 2:46 PM, Eric Roberts ow...@threeravensconsulting.com wrote: In the same on change event that causes the page to go from all properties to an individual property I have it assign the value of a hidden form field to the value of the infants dropdown...yet when the page loads, there are no form fields... Eric -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Friday, December 31, 2010 12:49 To: cf-talk Subject: Re: custom tag and javascript question How your cf is set up does little to effect how the javascript will communicate with other forms. JS will traverse your page in the usual way. The fact that one form is in a different file than another form doesn't matter to JS since by the time it gets to the client browser it's all one page as it were. How are you trying to get JS to target the forms now? What code is failing? On Fri, Dec 31, 2010 at 1:06 PM, Eric Roberts ow...@threeravensconsulting.com wrote: I have been running into an issue with not being able to read across forms on a site I am working on. The site is set up so that instead of using cfinclude, they address pages as custom tags (ie header.cfm is called as cf_header url_val=xx. The basic setup is there is an index.cfm that acts like a driver page that calls the tags and the called pages may also call tags as well. We have a dropdown to select with all of the properties or an individual property (Hotel properties). We are adding the ability for the hotels, if they take this into account, count the number of infants. This form field (itself a dropdown) is in a different form that is physically located in a different file (which is the parent page that is calling the file that the above dropdown live on). In the rendered html and javascript, the property section comes before the form that has the number of infants. What I am trying to accomplish is that when I change the hotel property, I want it to check against a session var that determines whether or not that property does an infant count and check a hidden form field to see if the value of infants is greater than 0. The problem I am having is that the hidden field that I have in the form isn't showing up. Does this have something to do with the fact that pages are being used as custom tags? I have never seen a site structured like this.it's pretty unique and not a bad idea, but I am wondering what effects on how variables are available to other tags/pages this structure has. Here's the basic structure: Index.cfm calls call_index.cfm as cf_call_index.cfm..call_index.cfm calls call_index2.cfm as cf_call_index2. Form 1 with the property dropdown physically resides on call_index2.cfm and form 2 that has the infant count dropdown physically resides on call_index.cfm. Anyone have an experience dealing with this kind of structure? Eric ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340341 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: custom tag and javascript question
I think I see where the problem lies...instead of doing a standard submit...it does a top.location.href to change from all properties to a single one. They do a lot of very odd stuff in this application. I certainly wouldn't have chosen to do that. Eric -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Friday, December 31, 2010 14:20 To: cf-talk Subject: Re: custom tag and javascript question Maybe I'm not following along here. How can the JS assign a value to a hidden form field if CF isn't rendering the hidden form field onto the page? Is this hidden form field wrapped in cfoutput? On Fri, Dec 31, 2010 at 2:46 PM, Eric Roberts ow...@threeravensconsulting.com wrote: In the same on change event that causes the page to go from all properties to an individual property I have it assign the value of a hidden form field to the value of the infants dropdown...yet when the page loads, there are no form fields... Eric -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Friday, December 31, 2010 12:49 To: cf-talk Subject: Re: custom tag and javascript question How your cf is set up does little to effect how the javascript will communicate with other forms. JS will traverse your page in the usual way. The fact that one form is in a different file than another form doesn't matter to JS since by the time it gets to the client browser it's all one page as it were. How are you trying to get JS to target the forms now? What code is failing? On Fri, Dec 31, 2010 at 1:06 PM, Eric Roberts ow...@threeravensconsulting.com wrote: I have been running into an issue with not being able to read across forms on a site I am working on. The site is set up so that instead of using cfinclude, they address pages as custom tags (ie header.cfm is called as cf_header url_val=xx. The basic setup is there is an index.cfm that acts like a driver page that calls the tags and the called pages may also call tags as well. We have a dropdown to select with all of the properties or an individual property (Hotel properties). We are adding the ability for the hotels, if they take this into account, count the number of infants. This form field (itself a dropdown) is in a different form that is physically located in a different file (which is the parent page that is calling the file that the above dropdown live on). In the rendered html and javascript, the property section comes before the form that has the number of infants. What I am trying to accomplish is that when I change the hotel property, I want it to check against a session var that determines whether or not that property does an infant count and check a hidden form field to see if the value of infants is greater than 0. The problem I am having is that the hidden field that I have in the form isn't showing up. Does this have something to do with the fact that pages are being used as custom tags? I have never seen a site structured like this.it's pretty unique and not a bad idea, but I am wondering what effects on how variables are available to other tags/pages this structure has. Here's the basic structure: Index.cfm calls call_index.cfm as cf_call_index.cfm..call_index.cfm calls call_index2.cfm as cf_call_index2. Form 1 with the property dropdown physically resides on call_index2.cfm and form 2 that has the infant count dropdown physically resides on call_index.cfm. Anyone have an experience dealing with this kind of structure? Eric ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340342 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Javascript in fckEditor
Hello all. I am added content to my database via fckEditor and everytime I add a page with javascript on it, the editor acts up when I view try to edit it. The text field disappears and the content is actually displayed on the page. Any suggestions? Thanks and hope everyone enjoyed your holiday! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339543 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Javascript in fckEditor
By default FCKEditor renders your code. It's handy but might not be what you want. -Original Message- From: Monique Boea [mailto:moniqueb...@gmail.com] Sent: Friday, November 26, 2010 9:31 AM To: cf-talk Subject: Javascript in fckEditor Hello all. I am added content to my database via fckEditor and everytime I add a page with javascript on it, the editor acts up when I view try to edit it. The text field disappears and the content is actually displayed on the page. Any suggestions? Thanks and hope everyone enjoyed your holiday! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339546 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Variable before query, rereplace or javascript to change title
cfsavecontent variable=pageTitletitleYour title cfoutput - #Yourvaraible#/cfoutput/title/cfsavecontent cfhtmlhead text=#pageTitle# This will put #pageTitle# in the head of the document. On Thu, Nov 18, 2010 at 4:05 PM, Joel Black j...@blackbeardesign.comwrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339397 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Variable before query, rereplace or javascript to change title
Gerald, cfhtmlhead text= was the key. I didnt even have to savecontent or anything else. I simply added this to my custom tag and it does just what its supposed to! Never even knew this tag existed, thanks a million! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339398 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Variable before query, rereplace or javascript to change title
Slightly OT, but I suspect this indicates that your app would benefit from a separation of display logic and business logic. On Fri, Nov 19, 2010 at 10:24 AM, Joel Black j...@blackbeardesign.comwrote: Gerald, cfhtmlhead text= was the key. I didnt even have to savecontent or anything else. I simply added this to my custom tag and it does just what its supposed to! Never even knew this tag existed, thanks a million! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339399 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Variable before query, rereplace or javascript to change title
I simply added this to my custom tag and it does just what its supposed to! Yep. Reason 32,657 why CF Roxorz. G! On Fri, Nov 19, 2010 at 10:24 AM, Joel Black j...@blackbeardesign.comwrote: Gerald, cfhtmlhead text= was the key. I didnt even have to savecontent or anything else. I simply added this to my custom tag and it does just what its supposed to! Never even knew this tag existed, thanks a million! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339400 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Variable before query, rereplace or javascript to change title
...until you need to hire five new developers in any place that isn't California. :( On Fri, Nov 19, 2010 at 11:04 AM, Gerald Guido gerald.gu...@gmail.comwrote: I simply added this to my custom tag and it does just what its supposed to! Yep. Reason 32,657 why CF Roxorz. G! On Fri, Nov 19, 2010 at 10:24 AM, Joel Black j...@blackbeardesign.com wrote: Gerald, cfhtmlhead text= was the key. I didnt even have to savecontent or anything else. I simply added this to my custom tag and it does just what its supposed to! Never even knew this tag existed, thanks a million! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339401 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Variable before query, rereplace or javascript to change title
I created a custom tag I can reuse, which runs a news manager. I would like to optimize it for search engines, but here is my issue: 1. The query and output are in the custom tag, which goes in the main content of the page 2. I want the news title to be in the page title, but I cant put an output before a query that I know of 3. Not sure if an ReReplace will work in this situation either 4. I know I can do it with javascript, but javascript is client side and will not change the title in time for a search engine to catch it will it? Any input would be greatly appreciated. Example: http://desconsultants.com/news.cfm?newsId=84 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339372 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Variable before query, rereplace or javascript to change title
2. I want the news title to be in the page title, but I cant put an output before a query that I know of No, but you can run the query before any HTML, ie : CFQUERY NAME=myQuery --- get the tithe in son=me column --- SELECT title, ... /CFQUERY html head titleCFOUTPUT#myQuery.title#/CFOUTPUT/title /head ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339375 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Variable before query, rereplace or javascript to change title
Wrap the custom tag in a cfsavecontent tag at the top of the page: cfsavecontent variable=myoutput cf_customtag / /cfsavecontent Then output your page: cfoutput html head title#myquery.somevalue#/title /head body #myoutput# /body /html /cfoutput Brook -Original Message- From: Joel Black [mailto:j...@blackbeardesign.com] Sent: November-18-10 12:27 PM To: cf-talk Subject: Variable before query, rereplace or javascript to change title I created a custom tag I can reuse, which runs a news manager. I would like to optimize it for search engines, but here is my issue: 1. The query and output are in the custom tag, which goes in the main content of the page 2. I want the news title to be in the page title, but I cant put an output before a query that I know of 3. Not sure if an ReReplace will work in this situation either 4. I know I can do it with javascript, but javascript is client side and will not change the title in time for a search engine to catch it will it? Any input would be greatly appreciated. Example: http://desconsultants.com/news.cfm?newsId=84 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339376 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Variable before query, rereplace or javascript to change title
Wrap the custom tag in a cfsavecontent tag at the top of the page: I gave this a try, but when I wrap it in the savecontent, its not reading the query when I put it in the title ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339381 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Variable before query, rereplace or javascript to change title
Wrap the custom tag in a cfsavecontent tag at the top of the page: I tried to do this, but the query.title doesnt read the query within the save content. I also tried to set a variable within the custom tag and pull that out...but no success there either. What if i set an application variable? Im gonna try it. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339385 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Variable before query, rereplace or javascript to change title
cfsavecontent variable=pageTitletitleYour title cfoutput - #Yourvaraible#/cfoutput/title/cfsavecontent cfhtmlhead text=#pageTitle# This will put #pageTitle# in the head of the document. On Thu, Nov 18, 2010 at 4:05 PM, Joel Black j...@blackbeardesign.comwrote: Wrap the custom tag in a cfsavecontent tag at the top of the page: I tried to do this, but the query.title doesnt read the query within the save content. I also tried to set a variable within the custom tag and pull that out...but no success there either. What if i set an application variable? Im gonna try it. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339386 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Variable before query, rereplace or javascript to change title
I believe in your custom tag, you need to set the variables in the 'caller' scope (e.g. caller.mytitle) to be accessed in the calling template scope. If I recall correctly... Brook -Original Message- From: Joel Black [mailto:j...@blackbeardesign.com] Sent: November-18-10 1:05 PM To: cf-talk Subject: Re: Variable before query, rereplace or javascript to change title Wrap the custom tag in a cfsavecontent tag at the top of the page: I tried to do this, but the query.title doesnt read the query within the save content. I also tried to set a variable within the custom tag and pull that out...but no success there either. What if i set an application variable? Im gonna try it. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339388 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Question about using javascript in .cfm files...
Rick, I have shared CF variables with JavaScript too. What I usually do is this: If I have to do any processes to define the CF variables, I put them at the top of the document, above the head section. Then, in the head section of my CFM page, I add a cfoutput inside a script tag and pass all of the desired CF variables into JavaScript variables. I make sure this is defined before I load any external JavaScript files and call any JavaScript functions. This way my JavaScript files retain their .js extension. HTH, Carl On 10/27/2010 10:44 AM, Rick Faircloth wrote: I've been using js files as .cfm files so I can intermix cf variables in the js. i.e., naming myJSFile.js, myJSFile.js.cfm, instead. This seems to work fine, but I've run into an issue that makes me wonder if this works in all cases as a regular js file would. Here's the question: If I have a js function in a .cfm file, would the declared function be defined by the browser upon first entering a page as it would if the function were in a .js file? e.g., should the function checkUserFavorites: function checkUserFavorites(USERID) { blah, blah, blah be defined if the js were in a .cfm file as readily as it would in a .js file? I keep running into a checkUserFavorites is not defined for which I cannot track down the problem. I'm reaching for an answer at this point, because I can't otherwise explain the error message otherwise, yet. Thanks for any feedback. Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338641 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Question about using javascript in .cfm files...
Rick, I have shared CF variables with JavaScript too. What I usually do is this: If I have to do any processes to define the CF variables, I put them at the top of the document, above the head section. Then, in the head section of my CFM page, I add a cfoutput inside a script tag and pass all of the desired CF variables into JavaScript variables. I make sure this is defined before I load any external JavaScript files and call any JavaScript functions. This way my JavaScript files retain their .js extension. HTH, Carl I've been using js files as .cfm files so I can intermix cf variables in the js. i.e., naming myJSFile.js, myJSFile.js.cfm, instead. This seems to work fine, but I've run into an issue that makes me wonder if this works in all cases as a regular js file would. Here's the question: If I have a js function in a .cfm file, would the declared function be defined by the browser upon first entering a page as it would if the function were in a .js file? e.g., should the function checkUserFavorites: function checkUserFavorites(USERID) { blah, blah, blah be defined if the js were in a .cfm file as readily as it would in a .js file? I keep running into a checkUserFavorites is not defined for which I cannot track down the problem. I'm reaching for an answer at this point, because I can't otherwise explain the error message otherwise, yet. Thanks for any feedback. Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338642 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Question about using javascript in .cfm files...
Interesting approach, Carl! Haven't thought about that. I'll definitely give that a try! Thanks for the tip! Rick -Original Message- From: Carl Von Stetten [mailto:cmvon...@hotmail.com] Sent: Thursday, October 28, 2010 11:19 AM To: cf-talk Subject: Re: Question about using javascript in .cfm files... Rick, I have shared CF variables with JavaScript too. What I usually do is this: If I have to do any processes to define the CF variables, I put them at the top of the document, above the head section. Then, in the head section of my CFM page, I add a cfoutput inside a script tag and pass all of the desired CF variables into JavaScript variables. I make sure this is defined before I load any external JavaScript files and call any JavaScript functions. This way my JavaScript files retain their .js extension. HTH, Carl I've been using js files as .cfm files so I can intermix cf variables in the js. i.e., naming myJSFile.js, myJSFile.js.cfm, instead. This seems to work fine, but I've run into an issue that makes me wonder if this works in all cases as a regular js file would. Here's the question: If I have a js function in a .cfm file, would the declared function be defined by the browser upon first entering a page as it would if the function were in a .js file? e.g., should the function checkUserFavorites: function checkUserFavorites(USERID) { blah, blah, blah be defined if the js were in a .cfm file as readily as it would in a .js file? I keep running into a checkUserFavorites is not defined for which I cannot track down the problem. I'm reaching for an answer at this point, because I can't otherwise explain the error message otherwise, yet. Thanks for any feedback. Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338644 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Question about using javascript in .cfm files...
I'll +1 that. I generally only use CF to set js vars at the top of the head too. That way your js can stay pure js. On Thu, Oct 28, 2010 at 12:04 PM, Rick Faircloth ric...@whitestonemedia.com wrote: Interesting approach, Carl! Haven't thought about that. I'll definitely give that a try! Thanks for the tip! Rick -Original Message- From: Carl Von Stetten [mailto:cmvon...@hotmail.com] Sent: Thursday, October 28, 2010 11:19 AM To: cf-talk Subject: Re: Question about using javascript in .cfm files... Rick, I have shared CF variables with JavaScript too. What I usually do is this: If I have to do any processes to define the CF variables, I put them at the top of the document, above the head section. Then, in the head section of my CFM page, I add a cfoutput inside a script tag and pass all of the desired CF variables into JavaScript variables. I make sure this is defined before I load any external JavaScript files and call any JavaScript functions. This way my JavaScript files retain their .js extension. HTH, Carl I've been using js files as .cfm files so I can intermix cf variables in the js. i.e., naming myJSFile.js, myJSFile.js.cfm, instead. This seems to work fine, but I've run into an issue that makes me wonder if this works in all cases as a regular js file would. Here's the question: If I have a js function in a .cfm file, would the declared function be defined by the browser upon first entering a page as it would if the function were in a .js file? e.g., should the function checkUserFavorites: function checkUserFavorites(USERID) { blah, blah, blah be defined if the js were in a .cfm file as readily as it would in a .js file? I keep running into a checkUserFavorites is not defined for which I cannot track down the problem. I'm reaching for an answer at this point, because I can't otherwise explain the error message otherwise, yet. Thanks for any feedback. Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338651 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm