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
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
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
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
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
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
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: Javascript Cfquery
On 10/12/2010 1:20 PM, fun and learning wrote: Hi All - I am trying to do the following: script language=text/javascript function abc(arg1, arg2) { cfquery name=q datasource=.. select * from table1 where col1 = arg1 /cfquery .. } /script Not simultaneously! ColdFusion runs on the server and JavaScript runs on the client. Complete different systems with completely different memory and variables executing completely different code and completely different times. I.E. Never will the twain, ColdFusion and JavaScript, meet. But there are plenty of ways to have JavaScript make request of ColdFusion and for ColdFusion to return JavaScript, just note that they are now working together. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338092 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Javascript Cfquery
On Tue, Oct 12, 2010 at 1:20 PM, fun and learning funandlrnn...@gmail.comwrote: Hi All - I am trying to do the following: script language=text/javascript function abc(arg1, arg2) { cfquery name=q datasource=.. select * from table1 where col1 = arg1 /cfquery .. } /script Is it possible to pass javascript arguments to a coldfusion query which is in turn present in the javascript block? ColdFusion runs on the server. JavaScript runs on the client. By the time the browser has rendered the page, ColdFusion has done its duty and is probably hanging out smoking a cigarette or using the little application server room. You can output CF variables to JS just like you do to HTML... script type=text/javascript var myName = cfoutput#myName#/cfoutput; /script ... but it's not a two-way conversation (much like my conversations with my wife). If you want them to talk to each other, you need to introduce AJAX into the equation. So short answer is, no... a JavaScript variable can't be used to manipulate a ColdFusion variable (but the converse works a treat), without utilizing AJAX. And maybe worth noting that the language attribute of the script tag is deprecated in favor of type. -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338093 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: javascript and coldfusion
And ExtJS explicitly provides connectors for whatever library you're using (e.g. jQuery) to keep the file size down. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/10/21 lists li...@commadelimited.com: jQuery explicitly offers compatibility mode for use alongside other frameworks. -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Wednesday, October 21, 2009 12:02 AM To: cf-talk Subject: Re: javascript and coldfusion H reading this chain of emails... a question raised in my mind can we use multiple frameworks on the same page... I mean can use jQuery to create a window and use ExtJS for displaying a grid Generally, yes, although some frameworks may have compatibility issues with others (Prototype comes to mind). Keep in mind that more frameworks means more JS files for your user to download, though. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327422 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
how can I use these connectors??? I am a newbie to Ajax :s -- From: James Holmes james.hol...@gmail.com Sent: Wednesday, October 21, 2009 2:03 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: javascript and coldfusion And ExtJS explicitly provides connectors for whatever library you're using (e.g. jQuery) to keep the file size down. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/10/21 lists li...@commadelimited.com: jQuery explicitly offers compatibility mode for use alongside other frameworks. -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Wednesday, October 21, 2009 12:02 AM To: cf-talk Subject: Re: javascript and coldfusion H reading this chain of emails... a question raised in my mind can we use multiple frameworks on the same page... I mean can use jQuery to create a window and use ExtJS for displaying a grid Generally, yes, although some frameworks may have compatibility issues with others (Prototype comes to mind). Keep in mind that more frameworks means more JS files for your user to download, though. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327423 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
http://www.extjs.com/learn/Ext_Getting_Started#What_is_the_proper_include_order_for_my_JavaScript_files.3F mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/10/21 Arsalan Tariq Keen arsalk...@hotmail.com: how can I use these connectors??? I am a newbie to Ajax :s -- From: James Holmes james.hol...@gmail.com Sent: Wednesday, October 21, 2009 2:03 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: javascript and coldfusion And ExtJS explicitly provides connectors for whatever library you're using (e.g. jQuery) to keep the file size down. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/10/21 lists li...@commadelimited.com: jQuery explicitly offers compatibility mode for use alongside other frameworks. -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Wednesday, October 21, 2009 12:02 AM To: cf-talk Subject: Re: javascript and coldfusion H reading this chain of emails... a question raised in my mind can we use multiple frameworks on the same page... I mean can use jQuery to create a window and use ExtJS for displaying a grid Generally, yes, although some frameworks may have compatibility issues with others (Prototype comes to mind). Keep in mind that more frameworks means more JS files for your user to download, though. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327424 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
what are your experiences of the above and others? The best library I ever used is the one I developed myself over the years. 1º it contains about everything I need; 2º it does not contain anything I don't need; 3º it can be enhanced easily any time. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327430 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
I concur with Judah's comments on Ext JS and JQuery. ExtJS for largish web apps, JQuery for enhancing a site. I've just posted a presentation I made last weekend titled Building RIAs using ExtJS 3 and ColdFusion which you may find useful. http://www.slideshare.net/paulcormier/building-rias-using-extjs-3-and-coldfusion Paul Cormier WinCorp Software, Inc. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327454 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
I find it best to use ExtJs, for a number of reasons. One, it's bundled in ColdFusion, and I can rapidly prototype applications (using the cfajax tags), then build out full featured apps that directly resemble the prototypes. Licensing is not an issue, as we are licensed the use of the library with the server. It is also the largest (that I know of) consistent library of components available. What that means is that, aside from being a very large library of client side components, the internal make up and methods of those components are consistent as well, making it easy to code and manage because the objects and method calls maintain familiarity between each other. (not sure if I explained that well, but hopefully you get what I mean). It is also very easy to write one's own user extensions to the library, creating your own reusable set of components for specific tasks. Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer Co-Author of Learning Ext JS http://www.packtpub.com/learning-ext-js/book _ http://blog.cutterscrossing.com On 10/20/2009 8:54 AM, Richard White wrote: Hi, we are doing a review of the best javascript components libraries to use with coldfusion, e.g. jquery, extjs, dhtmlx, etc... what are your experiences of the above and others? thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327370 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript and coldfusion
I think you'll find a lot of varying opinions on which library is best, but the only way you're going to be able to make the decision that works best for you is to get your hands dirty with several different libraries and decide for yourself. Personally, I started with Spry and have since moved to jQuery, which I highly recommend. ColdFusion 8+ ajax capabilities are built upon extjs, so there are some options already available to you with that library. By the way, I'm not even sure Spry is under development any more, so I wouldn't even consider that if I were you. Libraries have their own strengths and weaknesses, so perhaps once you know exactly what features you need that may also help you make a decision. For example, will you be using more of the typical ajax features (ie, dynamically load remote data) or will you be using it more for DOM manipulation? jQuery selectors for DOM manipulation are great, but some developers may prefer the way Spry (or other frameworks) handle remote data. I would also look at factors such as documentation, ability to create/add your own plugins, and the size of the development community/contributors - all of which are very solid with jQuery. Steve On Tue, Oct 20, 2009 at 9:54 AM, Richard White rich...@j7is.co.uk wrote: Hi, we are doing a review of the best javascript components libraries to use with coldfusion, e.g. jquery, extjs, dhtmlx, etc... what are your experiences of the above and others? thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327371 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: javascript and coldfusion
It mostly depends on what you'll be doing with those libraries. If you're going to be doing application dev and want consistent UI, then the built in copies of ExtJS might work for you. If you just want to spice up existing pages with new functionality unobtrusively then jQuery is by far your best choice. andy -Original Message- From: Richard White [mailto:rich...@j7is.co.uk] Sent: Tuesday, October 20, 2009 8:55 AM To: cf-talk Subject: javascript and coldfusion Hi, we are doing a review of the best javascript components libraries to use with coldfusion, e.g. jquery, extjs, dhtmlx, etc... what are your experiences of the above and others? thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327373 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
I would suggest using YUI, ExtJS, JQuery and Prototype. Each one has an independent value that the others do not carry. For instance, when using the CFAJAXPROXY, you are using the Prototype library. For UI windows, navigation, etc you are using ExtJS. When building custom controllers or doing your own DOM manipulation I would suggest JQuery for ease of typing syntax. YUI is an alternative to JQuery. I have never used it but there are enough apps built on the framework to make it a worthy option. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327381 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
I'd cut two from that list; just use jQuery and ExtJS (with the jQuery connector). mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/10/20 Tony Bentley t...@tonybentley.com: I would suggest using YUI, ExtJS, JQuery and Prototype. Each one has an independent value that the others do not carry. For instance, when using the CFAJAXPROXY, you are using the Prototype library. For UI windows, navigation, etc you are using ExtJS. When building custom controllers or doing your own DOM manipulation I would suggest JQuery for ease of typing syntax. YUI is an alternative to JQuery. I have never used it but there are enough apps built on the framework to make it a worthy option. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327382 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
Especially since ExtJs started out as an 'extension' of YUI ;) And (and I'm not knockin JQuery) people should really look at ExtCore for basic DOM manipulation, ajax and effects... Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer Co-Author of Learning Ext JS http://www.packtpub.com/learning-ext-js/book _ http://blog.cutterscrossing.com On 10/20/2009 10:27 AM, James Holmes wrote: I'd cut two from that list; just use jQuery and ExtJS (with the jQuery connector). mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/10/20 Tony Bentleyt...@tonybentley.com: I would suggest using YUI, ExtJS, JQuery and Prototype. Each one has an independent value that the others do not carry. For instance, when using the CFAJAXPROXY, you are using the Prototype library. For UI windows, navigation, etc you are using ExtJS. When building custom controllers or doing your own DOM manipulation I would suggest JQuery for ease of typing syntax. YUI is an alternative to JQuery. I have never used it but there are enough apps built on the framework to make it a worthy option. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327383 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
Why wouldn't you choose YUI as an option to implement? I'm not sure I understand, unless it is purely preference. I don't use it but I know there are enough apps out there that use it to make it worth considering. JQuery on the other hand is something I have come to depend on, similarly to ColdFusion. Both are layers on top (Javascript and Java) and both make it much easier to use. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327386 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
I like Ext for building JS applications but prefer JQuery for adding functionality on top of an HTML application. Ext is a full fledged frame work. If you want to have a single html page with nothing more than a div and build all your UI in javascript that does event-driven calls to a CF backend, then Ext is your best friend. However, Ext is still quite difficult to theme. It is going to look like Ext unless you go to a lot of trouble creating a bunch of tiny images and hacking css classes. JQuery, on the other hand, is great for enhancing an HTML page. Want to just drop in a date picker or do a look ahead search? JQuery is easy to drop in and usually pretty easy to make look like the rest of your design and even to change on the fly. So, yeah, it really depends on what you are going to use a JS library for and chances are good that you'll end up using more than one. Judah On Tue, Oct 20, 2009 at 8:37 AM, Cutter (ColdFusion) cold.fus...@cutterscrossing.com wrote: Especially since ExtJs started out as an 'extension' of YUI ;) And (and I'm not knockin JQuery) people should really look at ExtCore for basic DOM manipulation, ajax and effects... Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer Co-Author of Learning Ext JS http://www.packtpub.com/learning-ext-js/book ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327390 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
Yeah, like, dojo's testing stuff is freaking awersome! And you don't have to run dojo to use it, either. Mix and match, match and mix... Cuz the dojo heads are freaking cool like that. Talk about a well thought out JS framework. Hat's off to 'em. -- Everything is pathology, except for indifference. Emile M. Cioran On Tue, Oct 20, 2009 at 10:51 AM, Judah McAuley wrote: I like Ext for building JS applications but prefer JQuery for adding functionality on top of an HTML application. Ext is a full fledged frame work. If you want to have a single html page with nothing more than a div and build all your UI in javascript that does event-driven calls to a CF backend, then Ext is your best friend. However, Ext is still quite difficult to theme. It is going to look like Ext unless you go to a lot of trouble creating a bunch of tiny images and hacking css classes. JQuery, on the other hand, is great for enhancing an HTML page. Want to just drop in a date picker or do a look ahead search? JQuery is easy to drop in and usually pretty easy to make look like the rest of your design and even to change on the fly. So, yeah, it really depends on what you are going to use a JS library for and chances are good that you'll end up using more than one. Judah ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327393 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: javascript and coldfusion
I don't think that YUI is still in development is it? ExtJS is what used to be YUI. It's almost always a good choice to select a library that has a robust developer community. jQuery has that in spades, and ExtJS is not far behind (if it is behind at all). andy -Original Message- From: Tony Bentley [mailto:t...@tonybentley.com] Sent: Tuesday, October 20, 2009 11:00 AM To: cf-talk Subject: Re: javascript and coldfusion Why wouldn't you choose YUI as an option to implement? I'm not sure I understand, unless it is purely preference. I don't use it but I know there are enough apps out there that use it to make it worth considering. JQuery on the other hand is something I have come to depend on, similarly to ColdFusion. Both are layers on top (Javascript and Java) and both make it much easier to use. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327400 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
thanks for all your replies... seems then that extjs is good for ui and jquery for adding functionaility and therefore we should know both :) Hi, we are doing a review of the best javascript components libraries to use with coldfusion, e.g. jquery, extjs, dhtmlx, etc... what are your experiences of the above and others? thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327401 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
YUI is still in development, without a doubt. Ext is a project that originally used YUI and then forked. It is now totally separate but can use YUI (as well as others) backing it. It can also be used with no external JS framework dependencies. On Tue, Oct 20, 2009 at 11:39 AM, Andy Matthews li...@commadelimited.com wrote: I don't think that YUI is still in development is it? ExtJS is what used to be YUI. It's almost always a good choice to select a library that has a robust developer community. jQuery has that in spades, and ExtJS is not far behind (if it is behind at all). andy -Original Message- From: Tony Bentley [mailto:t...@tonybentley.com] Sent: Tuesday, October 20, 2009 11:00 AM To: cf-talk Subject: Re: javascript and coldfusion Why wouldn't you choose YUI as an option to implement? I'm not sure I understand, unless it is purely preference. I don't use it but I know there are enough apps out there that use it to make it worth considering. JQuery on the other hand is something I have come to depend on, similarly to ColdFusion. Both are layers on top (Javascript and Java) and both make it much easier to use. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327402 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript and coldfusion
Not only that, but Adobe has packaged it for ColdFusion's CFINPUT AUTOSUGGEST /CFIDE/scripts/ajax/yui/autocomplete/autocomplete-min.js /CFIDE/scripts/ajax/yui/animation/animation-min.js /CFIDE/scripts/ajax/yui/yahoo-dom-event/yahoo-dom-event.js YUI is still in development, without a doubt. Ext is a project that originally used YUI and then forked. It is now totally separate but can use YUI (as well as others) backing it. It can also be used with no external JS framework dependencies. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327403 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript and coldfusion
H reading this chain of emails... a question raised in my mind can we use multiple frameworks on the same page... I mean can use jQuery to create a window and use ExtJS for displaying a grid :)) Regards, Arsalan -- From: Tony Bentley t...@tonybentley.com Sent: Wednesday, October 21, 2009 1:17 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: javascript and coldfusion Not only that, but Adobe has packaged it for ColdFusion's CFINPUT AUTOSUGGEST /CFIDE/scripts/ajax/yui/autocomplete/autocomplete-min.js /CFIDE/scripts/ajax/yui/animation/animation-min.js /CFIDE/scripts/ajax/yui/yahoo-dom-event/yahoo-dom-event.js YUI is still in development, without a doubt. Ext is a project that originally used YUI and then forked. It is now totally separate but can use YUI (as well as others) backing it. It can also be used with no external JS framework dependencies. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327418 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript and coldfusion
H reading this chain of emails... a question raised in my mind can we use multiple frameworks on the same page... I mean can use jQuery to create a window and use ExtJS for displaying a grid Generally, yes, although some frameworks may have compatibility issues with others (Prototype comes to mind). Keep in mind that more frameworks means more JS files for your user to download, though. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327419 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: javascript and coldfusion
jQuery explicitly offers compatibility mode for use alongside other frameworks. -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Wednesday, October 21, 2009 12:02 AM To: cf-talk Subject: Re: javascript and coldfusion H reading this chain of emails... a question raised in my mind can we use multiple frameworks on the same page... I mean can use jQuery to create a window and use ExtJS for displaying a grid Generally, yes, although some frameworks may have compatibility issues with others (Prototype comes to mind). Keep in mind that more frameworks means more JS files for your user to download, though. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327420 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript / coldfusion ajax communication
thanks, your advice and links are clear to understand... so the best option seems to be encodeuricomponent function in js and urldecode function in cf thanks again hi our client side scripting is in javascript and server side code is coldfusion. our javascript sends string data to coldfusion via url. what is the best way to encode/escape the javascript strings and decode/unescape them in coldfusion thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326785 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript / coldfusion ajax communication
does anyone have ideas? hi our client side scripting is in javascript and server side code is coldfusion. our javascript sends string data to coldfusion via url. what is the best way to encode/escape the javascript strings and decode/unescape them in coldfusion thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326742 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: javascript / coldfusion ajax communication
If you java script is in a .cfm page you can use CFtags inside the script to generate the script output. Use CFOUTPUT and wrap your URL var : #URLEncodedFormat(my_URLvar)# When it writes out the javascript to the page it will be encoded correctly. Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged -Original Message- From: Richard White [mailto:rich...@j7is.co.uk] Sent: Tuesday, September 29, 2009 11:17 AM To: cf-talk Subject: Re: javascript / coldfusion ajax communication does anyone have ideas? hi our client side scripting is in javascript and server side code is coldfusion. our javascript sends string data to coldfusion via url. what is the best way to encode/escape the javascript strings and decode/unescape them in coldfusion thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326743 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript / coldfusion ajax communication
Richard In your js, use encodeURIComponent on any user entered data to properly encode the string. Have a look at the CF function URLDecode on the backend if CF doesn't properly decode your string automatically. Steve On Mon, Sep 28, 2009 at 9:31 AM, Richard White rich...@j7is.co.uk wrote: hi our client side scripting is in javascript and server side code is coldfusion. our javascript sends string data to coldfusion via url. what is the best way to encode/escape the javascript strings and decode/unescape them in coldfusion thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326744 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: javascript / coldfusion ajax communication
Richard, here's a helpful site with comparisons of the various js options to encode: http://xkr.us/articles/javascript/encode-compare/ -- Josh -Original Message- From: Steve Milburn [mailto:scmilb...@gmail.com] Sent: Tuesday, September 29, 2009 9:41 AM To: cf-talk Subject: Re: javascript / coldfusion ajax communication Richard In your js, use encodeURIComponent on any user entered data to properly encode the string. Have a look at the CF function URLDecode on the backend if CF doesn't properly decode your string automatically. Steve On Mon, Sep 28, 2009 at 9:31 AM, Richard White rich...@j7is.co.uk wrote: hi our client side scripting is in javascript and server side code is coldfusion. our javascript sends string data to coldfusion via url. what is the best way to encode/escape the javascript strings and decode/unescape them in coldfusion thanks richard ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326745 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript question
Jenny Gavin-Wear wrote: Could someone tell me what I am doing wrong, please? Does your form control of an id of 'registerForm' with that exact capitalization? Is it the only thing on the page with that id? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320640 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript question
script type=text/javascript function submitForm() { document.getElementById(registerForm).submit() } /script and this as the trigger: input name=roomID type=radio id=radio value=0 cfif session.roomID is 0checked /cfif onClick=submitForm() I am getting the error: document.registerForm.submit is not a function Could someone tell me what I am doing wrong, please? Let me guess... Your form contains an element named submit? IE doesn't like that (should be fine in FF). Massimo Foti, web-programmer for hire Tools for ColdFusion, JavaScript and Dreamweaver: http://www.massimocorner.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320641 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript question
Do you have ID=registerForm in your opening form tag? Don't forget it is case sensitive, too. -Ryan Jenny Gavin-Wear wrote: I have in the header: script type=text/javascript function submitForm() { document.getElementById(registerForm).submit() } /script and this as the trigger: input name=roomID type=radio id=radio value=0 cfif session.roomID is 0checked /cfif onClick=submitForm() I am getting the error: document.registerForm.submit is not a function Could someone tell me what I am doing wrong, please? tia, Jenny ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320642 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript question
document.registerForm.submit is not a function Apparently, getElementById() has returned an object which is not a form, thus which has no submit function.. Make sure no other object has an id=registerForm. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320644 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
IUM Re: Javascript question
Thanks all for the rapid replies. I'm sure it's something stupid I'm doing, arrghhh I've tried this as a test and it works fine: cfquery name=rooms datasource=#application.cfdatasource# SELECT * FROM tbl_confRooms where confID = #session.confID# /cfquery HTML HEAD /HEAD BODY BGCOLOR=#FF form method=post name=MyForm id=MyForm action=register-new.cfm !--- FORM METHOD=POST name=MyForm action=process.asp --- 1INPUT TYPE=radio NAME=rdo onClick=document.MyForm.submit()BR 2INPUT TYPE=radio NAME=rdo onClick=document.MyForm.submit()BR 3INPUT TYPE=radio NAME=rdo onClick=document.MyForm.submit()BR 4INPUT TYPE=radio NAME=rdo onClick=document.MyForm.submit()BR cfoutput query=rooms 4.5input type=radio name=roomID value=#rooms.roomID# onClick=document.MyForm.submit()cfif session.temproomID is session.roomID checked /cfif /cfoutput 5input name=roomID type=radio value=0 onClick=document.MyForm.submit()cfif session.roomID is 0 checked /cfif /FORM /BODY /HTML But when it's on the page I need it on I get the error: cfif not isdefined(session.isMember) cfset session.ismember = 0 /cfif cfif isdefined(url.ismember) and val(url.isMember) gt 0 cfset session.ismember = url.ismember /cfif cfif isdefined(url.confID) cfset session.confID = url.confID /cfif cfif not isdefined(session.confid) cflocation url=../ukasfp/conference.cfm /cfif cfif not isdefined(session.roomID) cfset session.roomID = 0 /cfif !--- Conference --- cfquery name=conf datasource=#application.cfdatasource# SELECT * FROM tbl_conf where confID = #session.confID# /cfquery cfset session.confprice = conf.confPrice !--- MEMBER --- cfif isdefined(session.userID) and val(session.userID) gt 0 cfquery name=member datasource=#application.cfdatasource# SELECT * FROM tbl_members where memberID = #session.userID# /cfquery cfset session.confprice = conf.confMemberPrice /cfif cfif isdefined(form.name) cfset session.name = form.name /cfif cfif isdefined(form.email) cfset session.email = form.email /cfif cfif isdefined(form.phone) cfset session.phone = form.phone /cfif cfif isdefined(form.add1) cfset session.add1 = form.add1 /cfif cfif isdefined(form.add2) cfset session.add2 = form.add2 /cfif cfif isdefined(form.city) cfset session.city = form.city /cfif cfif isdefined(form.county) cfset session.county = form.county /cfif cfif isdefined(form.postcode) cfset session.postcode = form.postcode /cfif cfif isdefined(form.roomID) cfset session.roomID = form.roomID /cfif cfset session.continue = 1 cfif not isdefined(session.name) or not len(session.name) cfset session.continue = 0 /cfif cfif not isdefined(session.email) or not len(session.email) cfset session.continue = 0 /cfif cfif not isdefined(session.phone) or not len(session.phone) cfset session.continue = 0 /cfif cfif not isdefined(session.add1) or not len(session.add1) cfset session.continue = 0 /cfif cfif not isdefined(session.add2) or not len(session.add2) cfset session.continue = 0 /cfif cfif not isdefined(session.city) or not len(session.city) cfset session.continue = 0 /cfif cfif not isdefined(session.county) or not len(session.county) cfset session.continue = 0 /cfif cfif not isdefined(session.postcode) or not len(session.postcode) cfset session.continue = 0 /cfif !--- ACCOMMODATION --- !--- all rooms --- cfquery name=rooms datasource=#application.cfdatasource# SELECT * FROM tbl_confRooms where confID = #session.confID# /cfquery !--- booked room --- cfif isdefined(session.roomID) and val(session.roomID) gt 0 cfquery name=BookedRoom datasource=#application.cfdatasource# SELECT * FROM tbl_confRooms where roomid = #session.roomID# /cfquery cfset session.confprice = session.confprice + bookedRoom.roomprice /cfif !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html!-- InstanceBegin template=/Templates/2005-01-09.dwt.cfm codeOutsideHTMLIsLocked=false -- head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 !-- InstanceBeginEditable name=doctitle -- titleUntitled Document/title !-- InstanceEndEditable -- link href=../styles.css rel=stylesheet media=screen type=text/css LINK REL=stylesheet MEDIA=aural HREF=../ukaural.css TYPE=text/css LINK REL=stylesheet MEDIA=print HREF=../ukprintfinal.css TYPE=text/css !-- InstanceBeginEditable name=head --!-- InstanceEndEditable -- /head body table width=800 border=0 align=center cellpadding=5 cellspacing=0 id=main tr td colspan=2table width=100% border=0 cellpadding=0 cellspacing=0 id=header tr tdimg src=../pageart/ukasfp-logo.png alt=United Kingdom Association for Solution Focused Practice width=800 height=132/td /tr /table/td /tr tr td colspan=2table width=100% border=0 cellpadding=5 cellspacing=0 id=navtop tr td cfinclude template=../nav/menu-top.cfm /td td cfoutput ul lia href=/directory/joining.cfmJoin UKASFP/a/li cfif not isdefined(session.mm_username) or
IUM IUM Re: Javascript question
ha! Got it! it was the submit buttons on the page being named submit ... Thanks all, pointed me in the right direction !! -Original Message- From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk] Sent: 18 March 2009 14:24 To: cf-talk Subject: SPAM-MEDIUM IUM Re: Javascript question Thanks all for the rapid replies. I'm sure it's something stupid I'm doing, arrghhh I've tried this as a test and it works fine: cfquery name=rooms datasource=#application.cfdatasource# SELECT * FROM tbl_confRooms where confID = #session.confID# /cfquery HTML HEAD /HEAD BODY BGCOLOR=#FF form method=post name=MyForm id=MyForm action=register-new.cfm !--- FORM METHOD=POST name=MyForm action=process.asp --- 1INPUT TYPE=radio NAME=rdo onClick=document.MyForm.submit()BR 2INPUT TYPE=radio NAME=rdo onClick=document.MyForm.submit()BR 3INPUT TYPE=radio NAME=rdo onClick=document.MyForm.submit()BR 4INPUT TYPE=radio NAME=rdo onClick=document.MyForm.submit()BR cfoutput query=rooms 4.5input type=radio name=roomID value=#rooms.roomID# onClick=document.MyForm.submit()cfif session.temproomID is session.roomID checked /cfif /cfoutput 5input name=roomID type=radio value=0 onClick=document.MyForm.submit()cfif session.roomID is 0 checked /cfif /FORM /BODY /HTML But when it's on the page I need it on I get the error: cfif not isdefined(session.isMember) cfset session.ismember = 0 /cfif cfif isdefined(url.ismember) and val(url.isMember) gt 0 cfset session.ismember = url.ismember /cfif cfif isdefined(url.confID) cfset session.confID = url.confID /cfif cfif not isdefined(session.confid) cflocation url=../ukasfp/conference.cfm /cfif cfif not isdefined(session.roomID) cfset session.roomID = 0 /cfif !--- Conference --- cfquery name=conf datasource=#application.cfdatasource# SELECT * FROM tbl_conf where confID = #session.confID# /cfquery cfset session.confprice = conf.confPrice !--- MEMBER --- cfif isdefined(session.userID) and val(session.userID) gt 0 cfquery name=member datasource=#application.cfdatasource# SELECT * FROM tbl_members where memberID = #session.userID# /cfquery cfset session.confprice = conf.confMemberPrice /cfif cfif isdefined(form.name) cfset session.name = form.name /cfif cfif isdefined(form.email) cfset session.email = form.email /cfif cfif isdefined(form.phone) cfset session.phone = form.phone /cfif cfif isdefined(form.add1) cfset session.add1 = form.add1 /cfif cfif isdefined(form.add2) cfset session.add2 = form.add2 /cfif cfif isdefined(form.city) cfset session.city = form.city /cfif cfif isdefined(form.county) cfset session.county = form.county /cfif cfif isdefined(form.postcode) cfset session.postcode = form.postcode /cfif cfif isdefined(form.roomID) cfset session.roomID = form.roomID /cfif cfset session.continue = 1 cfif not isdefined(session.name) or not len(session.name) cfset session.continue = 0 /cfif cfif not isdefined(session.email) or not len(session.email) cfset session.continue = 0 /cfif cfif not isdefined(session.phone) or not len(session.phone) cfset session.continue = 0 /cfif cfif not isdefined(session.add1) or not len(session.add1) cfset session.continue = 0 /cfif cfif not isdefined(session.add2) or not len(session.add2) cfset session.continue = 0 /cfif cfif not isdefined(session.city) or not len(session.city) cfset session.continue = 0 /cfif cfif not isdefined(session.county) or not len(session.county) cfset session.continue = 0 /cfif cfif not isdefined(session.postcode) or not len(session.postcode) cfset session.continue = 0 /cfif !--- ACCOMMODATION --- !--- all rooms --- cfquery name=rooms datasource=#application.cfdatasource# SELECT * FROM tbl_confRooms where confID = #session.confID# /cfquery !--- booked room --- cfif isdefined(session.roomID) and val(session.roomID) gt 0 cfquery name=BookedRoom datasource=#application.cfdatasource# SELECT * FROM tbl_confRooms where roomid = #session.roomID# /cfquery cfset session.confprice = session.confprice + bookedRoom.roomprice /cfif !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html!-- InstanceBegin template=/Templates/2005-01-09.dwt.cfm codeOutsideHTMLIsLocked=false -- head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 !-- InstanceBeginEditable name=doctitle -- titleUntitled Document/title !-- InstanceEndEditable -- link href=../styles.css rel=stylesheet media=screen type=text/css LINK REL=stylesheet MEDIA=aural HREF=../ukaural.css TYPE=text/css LINK REL=stylesheet MEDIA=print HREF=../ukprintfinal.css TYPE=text/css !-- InstanceBeginEditable name=head --!-- InstanceEndEditable -- /head body table width=800 border=0 align=center cellpadding=5 cellspacing=0 id=main tr td colspan=2table width=100% border=0 cellpadding=0 cellspacing=0 id=header tr tdimg src=../pageart/ukasfp-logo.png alt=United Kingdom Association for Solution Focused Practice width=800 height=132/td /tr /table/td /tr tr td colspan=2table width=100% border=0
Re: [JavaScript] Getting Parent
try: parent.top.location.href Andrew. Hi All, I have a page that loads a modal popup using ShowModalDialog. To get around issues with submitting data inside a modal dialog, I have an iframe to handle posts within in the modal dialog. The popup gets triggered two minutes before the session is about to timeout. They assume that if you don't click the ok button in the popup within 2 minutes you have walked away from your station and want to log you out. To handle this the popup starts a two minute count down and if timer reaches 0 then the page calls itself to kill the session (since the act of loading the popup resets the session timer) and needs to redirect the parent page to the login page. The redirect is where I am having a problem. I have tried window.opener.location.href, top.location.href, top.parent.location.href, and parent.window.location.href. Can someone point me in the correct direction? Thanks, Duane Sandy Bay Networks - www.sandybay.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320562 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: JavaScript Validation in ColdFusion
I didn't look through everything, but right off the top it appears there is a typo. This line: if (document.form1.text_id.disabled = true) should be: if (document.form1.text_id.disabled == true) 1 equal sign is the symbol to set the left to the value on the right, and in an 'if' statement will only be 'false' if the left was not successfully set to the value on the right. To check equality use the 2 equal signs. == William -Original Message- From: Priya Koya [mailto:priya23...@gmail.com] Sent: Thursday, February 19, 2009 10:40 PM To: cf-talk Subject: JavaScript Validation in ColdFusion Hi all, I have an issue Have a form and have the three raio buttons and I grouped it. Need to select one option and depending on the option need to fill texboxes. I am able to select the radio button and produce the error message. I am trying to disable and enable textboxes and validate them depends on radio button selection. I am able to disable and enable texboxes but unable to validate boxes. If I select Option1 It will disable text boxes If I select option2 or option3 --- enable extboxes and validate boxes textbox1 --- should validate the length=12, should be numeric, should not be empty textbox2 --- should validate the length=10, should be numeric, should not be empty Thanks, Can anyone hel with this cfform name='form1' cfinput type=radio name=rb_deposit value= id =id_check onclick =funcone() required=yes message=Please select optionspanOption1/spanbr/ cfinput type=radio name=rb_deposit value= id =id_check1 onclick=check1()spanOption2/spanbr/ cfinput type=radio name=rb_deposit value= id =id_check2 onclick=check1()spanOption3/spanbr/ input type=text name=text1 value= id =text_id onBlur=check2() spanlabel1/spanbr/ input type=text name=text2 value= id =text_id1 onBlur=check3()spanlabel2/spanbr/ cfinput name=submit value=submit id=submit_1 type='submit'br/ /cfform script type=text/javascript function funcone(){ if(document.form1.id_check.checked) { document.form1.text_id.disabled = true; document.form1.text_id1.disabled = true; return false; } else{return true;} } function check1() { if (document.form1.text_id.disabled = true) { document.form1.text_id.disabled =false; document.form1.text_id1.disabled = false; return false; } else{return true;} } function check2() { if(document.form1.id_check1.checked || document.form1.id_check2.checked) { document.form1.text1.focus(); if(document.form1.text1.value== ||!isNaN(document.form1.text1.value)||document.form1.text1.length !='12') { alert(Please enter BankNumber); document.form1.text1.focus(); }else {return true;} } function check3() { if(document.form1.text1.value!= ||!isNaN(document.form1.text1.value)) { if(document.form1.text2.value= || isNaN(document.form1.text2.value)) { alert(Please enter Routing Number); document.form1.text2.focus(); return false; } else {return true;} } } } /script ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319592 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: JavaScript Validation in ColdFusion
should be: if (document.form1.text_id.disabled == true) Or more simply: if (document.form1.text_id.disabled) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319621 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Javascript question
This isn't the answer you are asking for, but I would suggest that you use jQuery for this task. jQuery's selectors would make it easier to find the objects you want to modify, then you can easily set the disabled flag, as needed. Thanks, Mike -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: Friday, February 13, 2009 10:11 AM To: cf-talk Subject: Javascript question I've got a chunk of javascript that's supposed to do something really simple, toggle radio buttons on and off (disable/enable) based on another radio button However, there's a bug in IE, (http://webbugtrack.blogspot.com/2007/08/bug-152-getelementbyid-returns. html) that forces me (I think) to add some additional code, which under normal circumstances wouldn't be a big deal. The layout that I'm dealing with has multiple nested tables and alot of other elements, and re-working the layout is out of the question so... Is there a way, given the code below. to just deal with the ID's inside the form? Here's the code: function toggleOnPaidLeave(){ * // this code corrects javascript bugs in IE and Opera* //use browser sniffing to determine if IE or Opera (ugly, but required) var toggle; var isOpera, isIE = false; if(typeof(window.opera) != 'undefined'){ isOpera = true; } if(!isOpera navigator.userAgent.indexOf('Internet Explorer')){ isIE = true;} //fix both IE and Opera (adjust when they implement this method properly) if(isOpera || isIE){ document.nativeGetElementById = document.getElementById; //redefine it! document.getElementById = function(id){ var elem = document.nativeGetElementById(id); if(elem){ //verify it is a valid match! if(elem.attributes['id'] elem.attributes['id'].value == id){ //valid match! return elem; } else { //not a valid match! //the non-standard, document.all array has keys for all name'd, and id'd elements //start at one, because we know the first match, is wrong! for(var i=1;idocument.all[id].length;i++){ if(document.all[id][i].attributes['id'] document.all[id][i].attributes['id'].value == id){ return document.all[id][i]; } } } } return null; }; } *//this is what I actually want to do* if(toggle = 1){ document.getElementById(pre_absent).disabled=true; document.getElementById(alternative_week_id).disabled=true; document.getElementById(pre_pretransplant).disabled=true; document.getElementById(pre_pediatric_clinic).disabled=true; }else{ document.getElementById(pre_absent).disabled=false; document.getElementById(alternative_week_id).disabled=false; document.getElementById(pre_pretransplant).disabled=false; document.getElementById(pre_pediatric_clinic).disabled=false; } } -- Scott Stewart ColdFusion Developer Office of Research Information Systems Research amp; Economic Development University of North Carolina at Chapel Hill Phone:(919)843-2408 Fax: (919)962-3600 Email: saste...@email.unc.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319281 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Javascript question
I wish I could, I've had fits trying to get jquery to function properly with this layout in IE. I'm not sure jquery likes nested tables. Dawson, Michael wrote: This isn't the answer you are asking for, but I would suggest that you use jQuery for this task. jQuery's selectors would make it easier to find the objects you want to modify, then you can easily set the disabled flag, as needed. Thanks, Mike -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: Friday, February 13, 2009 10:11 AM To: cf-talk Subject: Javascript question I've got a chunk of javascript that's supposed to do something really simple, toggle radio buttons on and off (disable/enable) based on another radio button However, there's a bug in IE, (http://webbugtrack.blogspot.com/2007/08/bug-152-getelementbyid-returns. html) that forces me (I think) to add some additional code, which under normal circumstances wouldn't be a big deal. The layout that I'm dealing with has multiple nested tables and alot of other elements, and re-working the layout is out of the question so... Is there a way, given the code below. to just deal with the ID's inside the form? Here's the code: function toggleOnPaidLeave(){ * // this code corrects javascript bugs in IE and Opera* //use browser sniffing to determine if IE or Opera (ugly, but required) var toggle; var isOpera, isIE = false; if(typeof(window.opera) != 'undefined'){ isOpera = true; } if(!isOpera navigator.userAgent.indexOf('Internet Explorer')){ isIE = true;} //fix both IE and Opera (adjust when they implement this method properly) if(isOpera || isIE){ document.nativeGetElementById = document.getElementById; //redefine it! document.getElementById = function(id){ var elem = document.nativeGetElementById(id); if(elem){ //verify it is a valid match! if(elem.attributes['id'] elem.attributes['id'].value == id){ //valid match! return elem; } else { //not a valid match! //the non-standard, document.all array has keys for all name'd, and id'd elements //start at one, because we know the first match, is wrong! for(var i=1;idocument.all[id].length;i++){ if(document.all[id][i].attributes['id'] document.all[id][i].attributes['id'].value == id){ return document.all[id][i]; } } } } return null; }; } *//this is what I actually want to do* if(toggle = 1){ document.getElementById(pre_absent).disabled=true; document.getElementById(alternative_week_id).disabled=true; document.getElementById(pre_pretransplant).disabled=true; document.getElementById(pre_pediatric_clinic).disabled=true; }else{ document.getElementById(pre_absent).disabled=false; document.getElementById(alternative_week_id).disabled=false; document.getElementById(pre_pretransplant).disabled=false; document.getElementById(pre_pediatric_clinic).disabled=false; } } -- Scott Stewart ColdFusion Developer Office of Research Information Systems Research amp; Economic Development University of North Carolina at Chapel Hill Phone:(919)843-2408 Fax: (919)962-3600 Email: saste...@email.unc.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319282 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Javascript question
I know, I hate it sometimes too when you ask a question and someone says, don't do it that way, do it this completely different way, but, jQuery! script type=text/javascript src=/scripts/jquery-1.3.1.min.js/script script type=text/javascript $(function() { $(.checkAll).change(function() { if (this.checked) { var checked = checked; } else { var checked = ; } $(input.checkGroup, $(this).parent()).attr(checked, checked); }); }); /script cfoutput h2Group 1/h2 div All input type=checkbox class=checkAll /br / cfloop from=1 to=10 index=i #i# input type=checkbox class=checkGroup /br / /cfloop /div h2Group 2/h2 div All input type=checkbox class=checkAll /br / cfloop from=1 to=10 index=i #i# input type=checkbox class=checkGroup /br / /cfloop /div /cfoutput Download jQuery, change the path to it and run this. Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 February 2009 16:11 To: cf-talk Subject: Javascript question I've got a chunk of javascript that's supposed to do something really simple, toggle radio buttons on and off (disable/enable) based on another radio button However, there's a bug in IE, (http://webbugtrack.blogspot.com/2007/08/bug-152-getelementbyid- returns.html) that forces me (I think) to add some additional code, which under normal circumstances wouldn't be a big deal. The layout that I'm dealing with has multiple nested tables and alot of other elements, and re-working the layout is out of the question so... Is there a way, given the code below. to just deal with the ID's inside the form? Here's the code: function toggleOnPaidLeave(){ * // this code corrects javascript bugs in IE and Opera* //use browser sniffing to determine if IE or Opera (ugly, but required) var toggle; var isOpera, isIE = false; if(typeof(window.opera) != 'undefined'){ isOpera = true; } if(!isOpera navigator.userAgent.indexOf('Internet Explorer')){ isIE = true;} //fix both IE and Opera (adjust when they implement this method properly) if(isOpera || isIE){ document.nativeGetElementById = document.getElementById; //redefine it! document.getElementById = function(id){ var elem = document.nativeGetElementById(id); if(elem){ //verify it is a valid match! if(elem.attributes['id'] elem.attributes['id'].value == id){ //valid match! return elem; } else { //not a valid match! //the non-standard, document.all array has keys for all name'd, and id'd elements //start at one, because we know the first match, is wrong! for(var i=1;idocument.all[id].length;i++){ if(document.all[id][i].attributes['id'] document.all[id][i].attributes['id'].value == id){ return document.all[id][i]; } } } } return null; }; } *//this is what I actually want to do* if(toggle = 1){ document.getElementById(pre_absent).disabled=true; document.getElementById(alternative_week_id).disabled=true; document.getElementById(pre_pretransplant).disabled=true; document.getElementById(pre_pediatric_clinic).disabled=true; }else{ document.getElementById(pre_absent).disabled=false; document.getElementById(alternative_week_id).disabled=false; document.getElementById(pre_pretransplant).disabled=false; document.getElementById(pre_pediatric_clinic).disabled=false; } } -- Scott Stewart ColdFusion Developer Office of Research Information Systems Research amp; Economic Development University of North Carolina at Chapel Hill Phone:(919)843-2408 Fax: (919)962-3600 Email: saste...@email.unc.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319283 Subscription:
RE: Javascript question
Could you post the HTML source for us? Or point to it on t'internet. Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 February 2009 16:28 To: cf-talk Subject: Re: Javascript question I wish I could, I've had fits trying to get jquery to function properly with this layout in IE. I'm not sure jquery likes nested tables. Dawson, Michael wrote: This isn't the answer you are asking for, but I would suggest that you use jQuery for this task. jQuery's selectors would make it easier to find the objects you want to modify, then you can easily set the disabled flag, as needed. Thanks, Mike -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: Friday, February 13, 2009 10:11 AM To: cf-talk Subject: Javascript question I've got a chunk of javascript that's supposed to do something really simple, toggle radio buttons on and off (disable/enable) based on another radio button However, there's a bug in IE, (http://webbugtrack.blogspot.com/2007/08/bug-152-getelementbyid- returns. html) that forces me (I think) to add some additional code, which under normal circumstances wouldn't be a big deal. The layout that I'm dealing with has multiple nested tables and alot of other elements, and re-working the layout is out of the question so... Is there a way, given the code below. to just deal with the ID's inside the form? Here's the code: function toggleOnPaidLeave(){ * // this code corrects javascript bugs in IE and Opera* //use browser sniffing to determine if IE or Opera (ugly, but required) var toggle; var isOpera, isIE = false; if(typeof(window.opera) != 'undefined'){ isOpera = true; } if(!isOpera navigator.userAgent.indexOf('Internet Explorer')){ isIE = true;} //fix both IE and Opera (adjust when they implement this method properly) if(isOpera || isIE){ document.nativeGetElementById = document.getElementById; //redefine it! document.getElementById = function(id){ var elem = document.nativeGetElementById(id); if(elem){ //verify it is a valid match! if(elem.attributes['id'] elem.attributes['id'].value == id){ //valid match! return elem; } else { //not a valid match! //the non-standard, document.all array has keys for all name'd, and id'd elements //start at one, because we know the first match, is wrong! for(var i=1;idocument.all[id].length;i++){ if(document.all[id][i].attributes['id'] document.all[id][i].attributes['id'].value == id){ return document.all[id][i]; } } } } return null; }; } *//this is what I actually want to do* if(toggle = 1){ document.getElementById(pre_absent).disabled=true; document.getElementById(alternative_week_id).disabled=true; document.getElementById(pre_pretransplant).disabled=true; document.getElementById(pre_pediatric_clinic).disabled=true; }else{ document.getElementById(pre_absent).disabled=false; document.getElementById(alternative_week_id).disabled=false; document.getElementById(pre_pretransplant).disabled=false; document.getElementById(pre_pediatric_clinic).disabled=false; } } -- Scott Stewart ColdFusion Developer Office of Research Information Systems Research amp; Economic Development University of North Carolina at Chapel Hill Phone:(919)843-2408 Fax: (919)962-3600 Email: saste...@email.unc.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319284 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript question
jquery doesn't work with this layout, that's the first place I went. Adrian Lynch wrote: I know, I hate it sometimes too when you ask a question and someone says, don't do it that way, do it this completely different way, but, jQuery! script type=text/javascript src=/scripts/jquery-1.3.1.min.js/script script type=text/javascript $(function() { $(.checkAll).change(function() { if (this.checked) { var checked = checked; } else { var checked = ; } $(input.checkGroup, $(this).parent()).attr(checked, checked); }); }); /script cfoutput h2Group 1/h2 div All input type=checkbox class=checkAll /br / cfloop from=1 to=10 index=i #i# input type=checkbox class=checkGroup /br / /cfloop /div h2Group 2/h2 div All input type=checkbox class=checkAll /br / cfloop from=1 to=10 index=i #i# input type=checkbox class=checkGroup /br / /cfloop /div /cfoutput Download jQuery, change the path to it and run this. Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 February 2009 16:11 To: cf-talk Subject: Javascript question I've got a chunk of javascript that's supposed to do something really simple, toggle radio buttons on and off (disable/enable) based on another radio button However, there's a bug in IE, (http://webbugtrack.blogspot.com/2007/08/bug-152-getelementbyid- returns.html) that forces me (I think) to add some additional code, which under normal circumstances wouldn't be a big deal. The layout that I'm dealing with has multiple nested tables and alot of other elements, and re-working the layout is out of the question so... Is there a way, given the code below. to just deal with the ID's inside the form? Here's the code: function toggleOnPaidLeave(){ * // this code corrects javascript bugs in IE and Opera* //use browser sniffing to determine if IE or Opera (ugly, but required) var toggle; var isOpera, isIE = false; if(typeof(window.opera) != 'undefined'){ isOpera = true; } if(!isOpera navigator.userAgent.indexOf('Internet Explorer')){ isIE = true;} //fix both IE and Opera (adjust when they implement this method properly) if(isOpera || isIE){ document.nativeGetElementById = document.getElementById; //redefine it! document.getElementById = function(id){ var elem = document.nativeGetElementById(id); if(elem){ //verify it is a valid match! if(elem.attributes['id'] elem.attributes['id'].value == id){ //valid match! return elem; } else { //not a valid match! //the non-standard, document.all array has keys for all name'd, and id'd elements //start at one, because we know the first match, is wrong! for(var i=1;idocument.all[id].length;i++){ if(document.all[id][i].attributes['id'] document.all[id][i].attributes['id'].value == id){ return document.all[id][i]; } } } } return null; }; } *//this is what I actually want to do* if(toggle = 1){ document.getElementById(pre_absent).disabled=true; document.getElementById(alternative_week_id).disabled=true; document.getElementById(pre_pretransplant).disabled=true; document.getElementById(pre_pediatric_clinic).disabled=true; }else{ document.getElementById(pre_absent).disabled=false; document.getElementById(alternative_week_id).disabled=false; document.getElementById(pre_pretransplant).disabled=false; document.getElementById(pre_pediatric_clinic).disabled=false; } } -- Scott Stewart ColdFusion Developer Office of Research Information Systems Research amp; Economic Development University of North Carolina at Chapel Hill Phone:(919)843-2408 Fax: (919)962-3600 Email: saste...@email.unc.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive:
Re: Javascript question
Hi, IMHO, the simplest on most efficient way to bypass the problem would be to make sure no element has a name which could be identical to the ID of another one. For instance, always use something like ID=id_ NAME=name_ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319287 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript question
jquery doesn't work with this layout, that's the first place I went. Not to keep beating the jQuery horse, but if jQuery is referencing the radio button by ID or some other non-positional selector, the layout shouldn't matter. Just to be sure, I wrote up a quick little test with 2 sets of radio buttons. This works find in FireFox and IE7: script type=text/javascript src=jquery-1.2.6.min.js/script script type=text/javascript $(document).ready(function() { $(input[type='radio'][name='radio1']).click(function() { var $clickedRadioButton= $(this); if($clickedRadioButton.val()== Yes) { $(#radio2AA).attr(checked,true); $(#radio2AA).attr(disabled,false); $(#radio2BB).attr(disabled,true); } else { $(#radio2BB).attr(checked,true); $(#radio2BB).attr(disabled,false); $(#radio2AA).attr(disabled,true); } }); }); /script form name=testForm method=post action=none table id=table1 cellpadding=2 cellspacing=2 style=border:1px solid black; tr td table id=table2 cellpadding=2 cellspacing=2 style=border:1px solid blue; tr tdJust a random cell to be different./td td table id=table3 cellpadding=2 cellspacing=2 style=border:1px solid red; tr td Okay, in the next cell is our set of radio buttons. /td td strongRadio #1/strongbr / input type=radio name=radio1 id=radio1AA value=Yes The answer is Yesbr / input type=radio name=radio1 id=radio1BB value=No The answer is Nobr / hr / strongRadio #2/strongbr / input type=radio name=radio2 id=radio2AA value=Yep You just answered Yesbr / input type=radio name=radio2 id=radio2BB value=Nope You just answered Nobr / /td /tr /table /td /tr /table /td /tr /table /form ...the only reason I can think of for the layout to affect the script is if one or more HTML elements are not closed properly: invalid HTML that perhaps the browser can compensate for and display correctly, but wrecks the DOM of the page. Of course, if it's IE 6 you're talking about, all bets are off. :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319293 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript question
and that would/does work. I don't know if it's an error with the layout or jquery can't traverse nested tables or what but I've never been able to get it to function consistently in this layout Brian Swartzfager wrote: jquery doesn't work with this layout, that's the first place I went. Not to keep beating the jQuery horse, but if jQuery is referencing the radio button by ID or some other non-positional selector, the layout shouldn't matter. Just to be sure, I wrote up a quick little test with 2 sets of radio buttons. This works find in FireFox and IE7: script type=text/javascript src=jquery-1.2.6.min.js/script script type=text/javascript $(document).ready(function() { $(input[type='radio'][name='radio1']).click(function() { var $clickedRadioButton= $(this); if($clickedRadioButton.val()== Yes) { $(#radio2AA).attr(checked,true); $(#radio2AA).attr(disabled,false); $(#radio2BB).attr(disabled,true); } else { $(#radio2BB).attr(checked,true); $(#radio2BB).attr(disabled,false); $(#radio2AA).attr(disabled,true); } }); }); /script form name=testForm method=post action=none table id=table1 cellpadding=2 cellspacing=2 style=border:1px solid black; tr td table id=table2 cellpadding=2 cellspacing=2 style=border:1px solid blue; tr tdJust a random cell to be different./td td table id=table3 cellpadding=2 cellspacing=2 style=border:1px solid red; tr td Okay, in the next cell is our set of radio buttons. /td td strongRadio #1/strongbr / input type=radio name=radio1 id=radio1AA value=Yes The answer is Yesbr / input type=radio name=radio1 id=radio1BB value=No The answer is Nobr / hr / strongRadio #2/strongbr / input type=radio name=radio2 id=radio2AA value=Yep You just answered Yesbr / input type=radio name=radio2 id=radio2BB value=Nope You just answered Nobr / /td /tr /table /td /tr /table /td /tr /table /form ...the only reason I can think of for the layout to affect the script is if one or more HTML elements are not closed properly: invalid HTML that perhaps the browser can compensate for and display correctly, but wrecks the DOM of the page. Of course, if it's IE 6 you're talking about, all bets are off. :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319294 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript question
Ok scott, you've piqued my interest. You've _got_ to share this interface that chokes jQuery. :) nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] On Fri, Feb 13, 2009 at 12:57 PM, Scott Stewart saste...@email.unc.eduwrote: and that would/does work. I don't know if it's an error with the layout or jquery can't traverse nested tables or what but I've never been able to get it to function consistently in this layout Brian Swartzfager wrote: jquery doesn't work with this layout, that's the first place I went. Not to keep beating the jQuery horse, but if jQuery is referencing the radio button by ID or some other non-positional selector, the layout shouldn't matter. Just to be sure, I wrote up a quick little test with 2 sets of radio buttons. This works find in FireFox and IE7: script type=text/javascript src=jquery-1.2.6.min.js/script script type=text/javascript $(document).ready(function() { $(input[type='radio'][name='radio1']).click(function() { var $clickedRadioButton= $(this); if($clickedRadioButton.val()== Yes) { $(#radio2AA).attr(checked,true); $(#radio2AA).attr(disabled,false); $(#radio2BB).attr(disabled,true); } else { $(#radio2BB).attr(checked,true); $(#radio2BB).attr(disabled,false); $(#radio2AA).attr(disabled,true); } }); }); /script form name=testForm method=post action=none table id=table1 cellpadding=2 cellspacing=2 style=border:1px solid black; tr td table id=table2 cellpadding=2 cellspacing=2 style=border:1px solid blue; tr tdJust a random cell to be different./td td table id=table3 cellpadding=2 cellspacing=2 style=border:1px solid red; tr td Okay, in the next cell is our set of radio buttons. /td td strongRadio #1/strongbr / input type=radio name=radio1 id=radio1AA value=Yes The answer is Yesbr / input type=radio name=radio1 id=radio1BB value=No The answer is Nobr / hr / strongRadio #2/strongbr / input type=radio name=radio2 id=radio2AA value=Yep You just answered Yesbr / input type=radio name=radio2 id=radio2BB value=Nope You just answered Nobr / /td /tr /table /td /tr /table /td /tr /table /form ...the only reason I can think of for the layout to affect the script is if one or more HTML elements are not closed properly: invalid HTML that perhaps the browser can compensate for and display correctly, but wrecks the DOM of the page. Of course, if it's IE 6 you're talking about, all bets are off. :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319299 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Javascript question
SHARE IT, SHARE IT, SHARE IT, SHARE IT, SHARE IT!! :OD Go on, take out any sensitive info (but make sure the structure remains the same). Adrian -Original Message- From: Nathan Strutz [mailto:str...@gmail.com] Sent: 13 February 2009 21:50 To: cf-talk Subject: Re: Javascript question Ok scott, you've piqued my interest. You've _got_ to share this interface that chokes jQuery. :) nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] On Fri, Feb 13, 2009 at 12:57 PM, Scott Stewart saste...@email.unc.eduwrote: and that would/does work. I don't know if it's an error with the layout or jquery can't traverse nested tables or what but I've never been able to get it to function consistently in this layout Brian Swartzfager wrote: jquery doesn't work with this layout, that's the first place I went. Not to keep beating the jQuery horse, but if jQuery is referencing the radio button by ID or some other non-positional selector, the layout shouldn't matter. Just to be sure, I wrote up a quick little test with 2 sets of radio buttons. This works find in FireFox and IE7: script type=text/javascript src=jquery-1.2.6.min.js/script script type=text/javascript $(document).ready(function() { $(input[type='radio'][name='radio1']).click(function() { var $clickedRadioButton= $(this); if($clickedRadioButton.val()== Yes) { $(#radio2AA).attr(checked,true); $(#radio2AA).attr(disabled,false); $(#radio2BB).attr(disabled,true); } else { $(#radio2BB).attr(checked,true); $(#radio2BB).attr(disabled,false); $(#radio2AA).attr(disabled,true); } }); }); /script form name=testForm method=post action=none table id=table1 cellpadding=2 cellspacing=2 style=border:1px solid black; tr td table id=table2 cellpadding=2 cellspacing=2 style=border:1px solid blue; tr tdJust a random cell to be different./td td table id=table3 cellpadding=2 cellspacing=2 style=border:1px solid red; tr td Okay, in the next cell is our set of radio buttons. /td td strongRadio #1/strongbr / input type=radio name=radio1 id=radio1AA value=Yes The answer is Yesbr / input type=radio name=radio1 id=radio1BB value=No The answer is Nobr / hr / strongRadio #2/strongbr / input type=radio name=radio2 id=radio2AA value=Yep You just answered Yesbr / input type=radio name=radio2 id=radio2BB value=Nope You just answered Nobr / /td /tr /table /td /tr /table /td /tr /table /form ...the only reason I can think of for the layout to affect the script is if one or more HTML elements are not closed properly: invalid HTML that perhaps the browser can compensate for and display correctly, but wrecks the DOM of the page. Of course, if it's IE 6 you're talking about, all bets are off. :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319301 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
What about installing a user agent switcher add on for firefox? this way you can sort of be testing in IE, Excuse a may be silly question, but how just switching the agent can help debugging? Firefox will make Javascript believe it is IE, but will it act as IE? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318854 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript debugger for ie
On Wed, Feb 4, 2009 at 7:19 AM, Claude Schneegans schneeg...@internetique.com wrote: What about installing a user agent switcher add on for firefox? this way you can sort of be testing in IE, Excuse a may be silly question, but how just switching the agent can help debugging? Firefox will make Javascript believe it is IE, but will it act as IE? I've not tried it. My assumption would be that if Firefox is rendering it as if it were being rendered in IE, then the JS would behave as if it were IE. Seems like a logical conclusion. But no.. I've not tried it to be able to say with 100% certainty. -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318859 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
I've not tried it. My assumption would be that if Firefox is rendering it as if it were being rendered in IE, then the JS would behave as if it were IE. Seems like a logical conclusion. But no.. I've not tried it to be able to say with 100% certainty. Changing the user agent does not affect the browser's behavior. It may affect the server's behavior, but that's it. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318862 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript debugger for ie
On Wed, Feb 4, 2009 at 10:34 AM, Dave Watts dwa...@figleaf.com wrote: I've not tried it. My assumption would be that if Firefox is rendering it as if it were being rendered in IE, then the JS would behave as if it were IE. Seems like a logical conclusion. But no.. I've not tried it to be able to say with 100% certainty. Changing the user agent does not affect the browser's behavior. It may affect the server's behavior, but that's it. Ah, gotcha. I was under the impression it would render as if it were the specified browser. What would be the advantage of switching the user agent otherwise? I can see if maybe a particular site only supported a given browser... would there be others? Just curious. -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318864 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
Ah, gotcha. I was under the impression it would render as if it were the specified browser. If it was so, why would Mozilla not ALWAYS support IE functions? What would be the advantage of switching the user agent otherwise? Very poor indeed. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318873 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
What would be the advantage of switching the user agent otherwise? I can see if maybe a particular site only supported a given browser... would there be others? Just curious. You can use it to tell the server to generate code for another browser, and there are all kinds of uses for that. I often do this to see how sites respond to Google Search Appliances, which send a specific user agent (gsa-crawler). I also do it when using Experts Exchange - if you identify your browser as Googlebot you get the content that Google indexes. If you're using Opera, many (poorly-written) sites don't work, so you may change your user agent to something more common. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:31 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
On Wed, Feb 4, 2009 at 12:02 PM, Dave Watts dwa...@figleaf.com wrote: What would be the advantage of switching the user agent otherwise? I can see if maybe a particular site only supported a given browser... would there be others? Just curious. You can use it to tell the server to generate code for another browser, and there are all kinds of uses for that. I often do this to see how sites respond to Google Search Appliances, which send a specific user agent (gsa-crawler). I also do it when using Experts Exchange - if you identify your browser as Googlebot you get the content that Google indexes. OK I'm with you so far... If you're using Opera, many (poorly-written) sites don't work, so you may change your user agent to something more common. ...and now I'm lost :) I'd normally assume that by don't work you mean they don't render properly. But with that being the crux of this particular tangent, I'm assuming that's not what you mean. What server side code would be poorly-written enough to not work based on the browser? -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318891 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
...and now I'm lost :) I'd normally assume that by don't work you mean they don't render properly. But with that being the crux of this particular tangent, I'm assuming that's not what you mean. What server side code would be poorly-written enough to not work based on the browser? I've run into plenty of sites which do one thing for IE, something else for Netscape/Firefox, and a default (crappy, reduced feature) thing for every other browser - even though some of those browsers would work fine with one of the first two cases. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318900 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
It is common to have to have 2 or 3 versions of CSS to accommodate for browser inconsistencies. A friend of mine does *nothing but* UI design and he says that he usually has at least 2 versions of CSS. So that plugin that Charlie showed me allowed me to see the the IE Stylesheet in FF and use Firebug (I am not fond of the IE debugger). Again thanx. not work based on the browser? I donno why browser/version would effect server side stuff unless it was AJAX-y/CSS type features that would too much a pain to warrant the expense of a rewrite. G! On Wed, Feb 4, 2009 at 4:54 PM, Dave Watts dwa...@figleaf.com wrote: ...and now I'm lost :) I'd normally assume that by don't work you mean they don't render properly. But with that being the crux of this particular tangent, I'm assuming that's not what you mean. What server side code would be poorly-written enough to not work based on the browser? I've run into plenty of sites which do one thing for IE, something else for Netscape/Firefox, and a default (crappy, reduced feature) thing for every other browser - even though some of those browsers would work fine with one of the first two cases. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318903 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
On Wed, Feb 4, 2009 at 1:54 PM, Dave Watts dwa...@figleaf.com wrote: ...and now I'm lost :) I'd normally assume that by don't work you mean they don't render properly. But with that being the crux of this particular tangent, I'm assuming that's not what you mean. What server side code would be poorly-written enough to not work based on the browser? I've run into plenty of sites which do one thing for IE, something else for Netscape/Firefox, and a default (crappy, reduced feature) thing for every other browser - even though some of those browsers would work fine with one of the first two cases. OK back with ya. Thanks. Unfortunately, this all leaves Richard back at square 1 :\ -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318904 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript debugger for ie
thanks for the recommendation... i have downloaded it and it tells me what line of code an error is on but it doesn't allow me to view that line of code, does it just alert you to the line or is there a way, like firebug, to get more details on the line and view the code etc... thanks (sorry dont mean to sound like i am asking for a tutorial, i just cannot work it out in the software and is the main thing i need it to have!) also, we are new to developing for all browsers (we have only programmed for firefox in the past) do you usually have a set of debuggers you use for the different browsers or do you have a combined tool (such as a plug in for eclipse, and if there is a good plug in for eclipse can anyone recommend) thanks http://www.debugbar.com/?langage=en Free for personal use. I find that debugging JS to be a very personal issue. This is very handy as well http://www.my-debugbar.com/wiki/IETester/HomePage ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318794 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript debugger for ie
i haven't really used it much... but really nothing holds a candle to firebug. What about installing a user agent switcher add on for firefox? this way you can sort of be testing in IE, yet have firebug available? https://addons.mozilla.org/en-US/firefox/addon/59 On Tue, Feb 3, 2009 at 3:16 PM, Richard White rich...@j7is.co.uk wrote: thanks for the recommendation... i have downloaded it and it tells me what line of code an error is on but it doesn't allow me to view that line of code, does it just alert you to the line or is there a way, like firebug, to get more details on the line and view the code etc... thanks (sorry dont mean to sound like i am asking for a tutorial, i just cannot work it out in the software and is the main thing i need it to have!) also, we are new to developing for all browsers (we have only programmed for firefox in the past) do you usually have a set of debuggers you use for the different browsers or do you have a combined tool (such as a plug in for eclipse, and if there is a good plug in for eclipse can anyone recommend) thanks http://www.debugbar.com/?langage=en Free for personal use. I find that debugging JS to be a very personal issue. This is very handy as well http://www.my-debugbar.com/wiki/IETester/HomePage ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318795 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
WOW... this is very powerful thanks Charlie, seems like a perfect answer :) i haven't really used it much... but really nothing holds a candle to firebug. What about installing a user agent switcher add on for firefox? this way you can sort of be testing in IE, yet have firebug available? https://addons.mozilla.org/en-US/firefox/addon/59 ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318798 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
Question: Have you tried using a javascript library that hides and handles the cross browser issues behind the scenes? JQuery is the hot one these days, but other like Prototype, YUI and others are available and usually have excellent documentation. These libraries can really take the headache out of cross browser issues. Wil ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318799 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
He only thing I have seen is the IE debugger in Aptana pro ($99). I use the FOSS version of Aptana and absolutely love it. http://www.aptana.com/docs/index.php/Installing_the_IE_debugger G! On Tue, Feb 3, 2009 at 6:16 PM, Richard White rich...@j7is.co.uk wrote: thanks for the recommendation... i have downloaded it and it tells me what line of code an error is on but it doesn't allow me to view that line of code, does it just alert you to the line or is there a way, like firebug, to get more details on the line and view the code etc... thanks (sorry dont mean to sound like i am asking for a tutorial, i just cannot work it out in the software and is the main thing i need it to have!) also, we are new to developing for all browsers (we have only programmed for firefox in the past) do you usually have a set of debuggers you use for the different browsers or do you have a combined tool (such as a plug in for eclipse, and if there is a good plug in for eclipse can anyone recommend) thanks http://www.debugbar.com/?langage=en Free for personal use. I find that debugging JS to be a very personal issue. This is very handy as well http://www.my-debugbar.com/wiki/IETester/HomePage ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318800 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
http://www.debugbar.com/?langage=en Free for personal use. I find that debugging JS to be a very personal issue. This is very handy as well http://www.my-debugbar.com/wiki/IETester/HomePage On Tue, Feb 3, 2009 at 5:14 PM, Richard White rich...@j7is.co.uk wrote: hi, sorry for the non-cf question but does anyone know a good opensource JS debugger for IE, that is similar to FireBug for FireFox, and is not the script debugger in IE (as i cannot get it to show on my browser) thanks richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318792 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: javascript debugger for ie
Nice find Charlie. Thanx. I am in cross browser hell right now Someone please kill me. G! On Tue, Feb 3, 2009 at 6:25 PM, Charlie Griefer charlie.grie...@gmail.comwrote: i haven't really used it much... but really nothing holds a candle to firebug. What about installing a user agent switcher add on for firefox? this way you can sort of be testing in IE, yet have firebug available? https://addons.mozilla.org/en-US/firefox/addon/59 -- Gerald Guido http://www.myinternetisbroken.com To invent, you need a good imagination and a pile of junk. -- Thomas A. Edison ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318803 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript debugger for ie
http://www.debugbar.com/ http://www.my-debugbar.com/wiki/CompanionJS/HomePage On Tue, Feb 3, 2009 at 2:14 PM, Richard White rich...@j7is.co.uk wrote: hi, sorry for the non-cf question but does anyone know a good opensource JS debugger for IE, that is similar to FireBug for FireFox, and is not the script debugger in IE (as i cannot get it to show on my browser) thanks richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318791 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: javascript debugger for ie
no i havent but will look into this, thanks i have been meaning to look into JQuery for some time and know that it will help us out if we do so this is the perfect excuse! thanks Question: Have you tried using a javascript library that hides and handles the cross browser issues behind the scenes? JQuery is the hot one these days, but other like Prototype, YUI and others are available and usually have excellent documentation. These libraries can really take the headache out of cross browser issues. Wil ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318801 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Javascript compatibility question
Is getElementById a method of a form? Shouldn't it just be document.getElementById()? Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 January 2009 16:30 To: cf-talk Subject: Javascript compatibility question Hey all, I'm trying to disable radio button based on a selection. These functions are called from an onClick. Any reason why they'd work in Firefox and not in IE 7? script language=javascript type=application/javascript function disableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=true; document.form1.getElementById(alternative_week_id).disabled=true; document.form1.getElementById(pre_pretransplant).disabled=true; document.form1.getElementById(pre_pediatric_clinic).disabled=true; document.form1.getElementById(pre_absent_n).disabled=true; document.form1.getElementById(pre_pretransplant_n).disabled=true; document.form1.getElementById(pre_pediatric_clinic_n).disabled=true; } function enableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=false; document.form1.getElementById(alternative_week_id).disabled=false; document.form1.getElementById(pre_pretransplant).disabled=false; document.form1.getElementById(pre_pediatric_clinic).disabled=false; document.form1.getElementById(pre_absent_n).disabled=false; document.form1.getElementById(pre_pretransplant_n).disabled=false; document.form1.getElementById(pre_pediatric_clinic_n).disabled=false; } /script -- Scott Stewart ColdFusion Developer ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317865 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Javascript compatibility question
Try the syntax of one of the following examples: document.form1.pre_absent.disabled = true; document.getElementById(pre_absent).disabled = true; HTH Steve From: Scott Stewart [saste...@email.unc.edu] Sent: Tuesday, January 13, 2009 11:29 AM To: cf-talk Subject: Javascript compatibility question Hey all, I'm trying to disable radio button based on a selection. These functions are called from an onClick. Any reason why they'd work in Firefox and not in IE 7? script language=javascript type=application/javascript function disableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=true; document.form1.getElementById(alternative_week_id).disabled=true; document.form1.getElementById(pre_pretransplant).disabled=true; document.form1.getElementById(pre_pediatric_clinic).disabled=true; document.form1.getElementById(pre_absent_n).disabled=true; document.form1.getElementById(pre_pretransplant_n).disabled=true; document.form1.getElementById(pre_pediatric_clinic_n).disabled=true; } function enableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=false; document.form1.getElementById(alternative_week_id).disabled=false; document.form1.getElementById(pre_pretransplant).disabled=false; document.form1.getElementById(pre_pediatric_clinic).disabled=false; document.form1.getElementById(pre_absent_n).disabled=false; document.form1.getElementById(pre_pretransplant_n).disabled=false; document.form1.getElementById(pre_pediatric_clinic_n).disabled=false; } /script -- Scott Stewart ColdFusion Developer Office of Research Information Systems Research amp; Economic Development University of North Carolina at Chapel Hill Phone:(919)843-2408 Fax: (919)962-3600 Email: saste...@email.unc.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317866 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript compatibility question
getElementById() is a javascript function that finds a specified element on a page it can be a form or page element. in this case I'm trying to disable/enable radio buttons. Adrian Lynch wrote: Is getElementById a method of a form? Shouldn't it just be document.getElementById()? Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 January 2009 16:30 To: cf-talk Subject: Javascript compatibility question Hey all, I'm trying to disable radio button based on a selection. These functions are called from an onClick. Any reason why they'd work in Firefox and not in IE 7? script language=javascript type=application/javascript function disableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=true; document.form1.getElementById(alternative_week_id).disabled=true; document.form1.getElementById(pre_pretransplant).disabled=true; document.form1.getElementById(pre_pediatric_clinic).disabled=true; document.form1.getElementById(pre_absent_n).disabled=true; document.form1.getElementById(pre_pretransplant_n).disabled=true; document.form1.getElementById(pre_pediatric_clinic_n).disabled=true; } function enableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=false; document.form1.getElementById(alternative_week_id).disabled=false; document.form1.getElementById(pre_pretransplant).disabled=false; document.form1.getElementById(pre_pediatric_clinic).disabled=false; document.form1.getElementById(pre_absent_n).disabled=false; document.form1.getElementById(pre_pretransplant_n).disabled=false; document.form1.getElementById(pre_pediatric_clinic_n).disabled=false; } /script -- Scott Stewart ColdFusion Developer ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317867 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Javascript compatibility question
Yup, I know, but is there a method form.getElementByID()? I've only ever used it in document. Fancy trying jQuery instead? Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 January 2009 16:51 To: cf-talk Subject: Re: Javascript compatibility question getElementById() is a javascript function that finds a specified element on a page it can be a form or page element. in this case I'm trying to disable/enable radio buttons. Adrian Lynch wrote: Is getElementById a method of a form? Shouldn't it just be document.getElementById()? Adrian ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317869 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript compatibility question
I've had problems using jquery with multiple nested tables in IE, and don't have time to delve into a JQuery solution unfortunately.. Adrian Lynch wrote: Yup, I know, but is there a method form.getElementByID()? I've only ever used it in document. Fancy trying jQuery instead? Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 January 2009 16:51 To: cf-talk Subject: Re: Javascript compatibility question getElementById() is a javascript function that finds a specified element on a page it can be a form or page element. in this case I'm trying to disable/enable radio buttons. Adrian Lynch wrote: Is getElementById a method of a form? Shouldn't it just be document.getElementById()? Adrian ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317870 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Javascript compatibility question
getElementById() is a javascript function that finds a specified element on a page it can be a form or page element. At least in IE, this methods applies only to the document object. see: http://www.w3.org/TR/2000/WD-DOM-Level-1-2929/level-one-html.html#ID-40002357 I'm surprised it works for FF, they're supposed to be more standard than the standard. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317871 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Javascript compatibility question
I think what Adrian's getting at is your reference to the elements should be document.getElementById('foo'), not document.form1.getElementById('foo'). can you give that a shot? On Tue, Jan 13, 2009 at 8:50 AM, Scott Stewart saste...@email.unc.eduwrote: getElementById() is a javascript function that finds a specified element on a page it can be a form or page element. in this case I'm trying to disable/enable radio buttons. Adrian Lynch wrote: Is getElementById a method of a form? Shouldn't it just be document.getElementById()? Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 January 2009 16:30 To: cf-talk Subject: Javascript compatibility question Hey all, I'm trying to disable radio button based on a selection. These functions are called from an onClick. Any reason why they'd work in Firefox and not in IE 7? script language=javascript type=application/javascript function disableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=true; document.form1.getElementById(alternative_week_id).disabled=true; document.form1.getElementById(pre_pretransplant).disabled=true; document.form1.getElementById(pre_pediatric_clinic).disabled=true; document.form1.getElementById(pre_absent_n).disabled=true; document.form1.getElementById(pre_pretransplant_n).disabled=true; document.form1.getElementById(pre_pediatric_clinic_n).disabled=true; } function enableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=false; document.form1.getElementById(alternative_week_id).disabled=false; document.form1.getElementById(pre_pretransplant).disabled=false; document.form1.getElementById(pre_pediatric_clinic).disabled=false; document.form1.getElementById(pre_absent_n).disabled=false; document.form1.getElementById(pre_pretransplant_n).disabled=false; document.form1.getElementById(pre_pediatric_clinic_n).disabled=false; } /script -- Scott Stewart ColdFusion Developer ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317873 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Javascript compatibility question
tried that, and no love... Charlie Griefer wrote: I think what Adrian's getting at is your reference to the elements should be document.getElementById('foo'), not document.form1.getElementById('foo'). can you give that a shot? On Tue, Jan 13, 2009 at 8:50 AM, Scott Stewart saste...@email.unc.eduwrote: getElementById() is a javascript function that finds a specified element on a page it can be a form or page element. in this case I'm trying to disable/enable radio buttons. Adrian Lynch wrote: Is getElementById a method of a form? Shouldn't it just be document.getElementById()? Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 January 2009 16:30 To: cf-talk Subject: Javascript compatibility question Hey all, I'm trying to disable radio button based on a selection. These functions are called from an onClick. Any reason why they'd work in Firefox and not in IE 7? script language=javascript type=application/javascript function disableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=true; document.form1.getElementById(alternative_week_id).disabled=true; document.form1.getElementById(pre_pretransplant).disabled=true; document.form1.getElementById(pre_pediatric_clinic).disabled=true; document.form1.getElementById(pre_absent_n).disabled=true; document.form1.getElementById(pre_pretransplant_n).disabled=true; document.form1.getElementById(pre_pediatric_clinic_n).disabled=true; } function enableOnPaidLeave(){ document.form1.getElementById(pre_absent).disabled=false; document.form1.getElementById(alternative_week_id).disabled=false; document.form1.getElementById(pre_pretransplant).disabled=false; document.form1.getElementById(pre_pediatric_clinic).disabled=false; document.form1.getElementById(pre_absent_n).disabled=false; document.form1.getElementById(pre_pretransplant_n).disabled=false; document.form1.getElementById(pre_pediatric_clinic_n).disabled=false; } /script -- Scott Stewart ColdFusion Developer ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317876 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Javascript compatibility question
Yeah, what Charlie said :OD -Original Message- From: Charlie Griefer [mailto:charlie.grie...@gmail.com] Sent: 13 January 2009 17:11 To: cf-talk Subject: Re: Javascript compatibility question I think what Adrian's getting at is your reference to the elements should be document.getElementById('foo'), not document.form1.getElementById('foo'). can you give that a shot? On Tue, Jan 13, 2009 at 8:50 AM, Scott Stewart saste...@email.unc.eduwrote: getElementById() is a javascript function that finds a specified element on a page it can be a form or page element. in this case I'm trying to disable/enable radio buttons. Adrian Lynch wrote: Is getElementById a method of a form? Shouldn't it just be document.getElementById()? Adrian ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317877 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4