Need to wait on Bind to complete before submitting a CFFORM
I have a situation where a CFDIV bind expression needs to complete before the cfform click takes effect. My assumption was that the Bind could set a hidden variable that would trigger a CFINPUT error routine when the cfform's button was pressed. But it turns out that the variable doe not update in time for this to work. Is there any way to tell the submit button to wait for the CFDIV bind to complete? Here's a code fragment to show what I was trying to do. cfinput name=Password type=password tabindex=12 value=#DefPassword# size=20 required=yes message=Please enter your Password cfdiv style=float:right; width: 100px; ID=Userdiv bind=url:CheckLogon2.cfm?Email={Email}Userid={Userid}Password={Password} bindonload=Nonbsp;/cfdiv cfinput type=hidden value=1 range=1,1 message=This Password is not valid for the Email Address or Userid you entered name=LogonError1 id=LogonError1 cfinput name=Logon type=submit tabindex=13 value=Logon class=Button ~| 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:353973 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Need to wait on Bind to complete before submitting a CFFORM
Have the form call a custom function onsubmit and check the values in your form fields before it allows form submission. Regards Russ Michaels www.michaels.me.uk www.cfmldeveloper.com - Free CFML hosting for developers www.cfsearch.com - CF search engine On Jan 20, 2013 4:46 PM, John Pullam jpul...@mcleansystems.com wrote: I have a situation where a CFDIV bind expression needs to complete before the cfform click takes effect. My assumption was that the Bind could set a hidden variable that would trigger a CFINPUT error routine when the cfform's button was pressed. But it turns out that the variable doe not update in time for this to work. Is there any way to tell the submit button to wait for the CFDIV bind to complete? Here's a code fragment to show what I was trying to do. cfinput name=Password type=password tabindex=12 value=#DefPassword# size=20 required=yes message=Please enter your Password cfdiv style=float:right; width: 100px; ID=Userdiv bind=url:CheckLogon2.cfm?Email={Email}Userid={Userid}Password={Password} bindonload=Nonbsp;/cfdiv cfinput type=hidden value=1 range=1,1 message=This Password is not valid for the Email Address or Userid you entered name=LogonError1 id=LogonError1 cfinput name=Logon type=submit tabindex=13 value=Logon class=Button ~| 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:353974 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Need to wait on Bind to complete before submitting a CFFORM
Why don't you use a javascript submit interception, then the Javascript could check the results returned in the div and allow the submit or not? -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Mon, Jan 21, 2013 at 3:46 AM, John Pullam jpul...@mcleansystems.comwrote: I have a situation where a CFDIV bind expression needs to complete before the cfform click takes effect. My assumption was that the Bind could set a hidden variable that would trigger a CFINPUT error routine when the cfform's button was pressed. But it turns out that the variable doe not update in time for this to work. Is there any way to tell the submit button to wait for the CFDIV bind to complete? Here's a code fragment to show what I was trying to do. cfinput name=Password type=password tabindex=12 value=#DefPassword# size=20 required=yes message=Please enter your Password cfdiv style=float:right; width: 100px; ID=Userdiv bind=url:CheckLogon2.cfm?Email={Email}Userid={Userid}Password={Password} bindonload=Nonbsp;/cfdiv cfinput type=hidden value=1 range=1,1 message=This Password is not valid for the Email Address or Userid you entered name=LogonError1 id=LogonError1 cfinput name=Logon type=submit tabindex=13 value=Logon class=Button ~| 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:353975 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Need to wait on Bind to complete before submitting a CFFORM
Have the form call a custom function onsubmit and check the values in your form fields before it allows form submission. I'm probably missing something here but I need to lookup data in a database after the email address and password are provided. I was using a cfc behind the scenes to do that when the bind was triggered and then updating the on-page variable. How might I do that from the submit button? I'm really hoping to be able to post any bad email/password error message in a javascript window alert and not do it on a new page. ~| 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:353976 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Need to wait on Bind to complete before submitting a CFFORM
Why don't you use a javascript submit interception, then the Javascript could check the results returned in the div and allow the submit or not? I think that solution has the same problem. Because the bind is asynchronous, it doesn't necessarily finish execution when you are in the submit logic. I found from testing it out and issuing javascript alert messages that usually the submit fires before the bind runs. ~| 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:353977 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Need to wait on Bind to complete before submitting a CFFORM
Well there are a number of ways you could do it, one that is probably the best is to disable the submit button and have some javascript returned with the info that will enable the submit button. Another is to look at the ExtJS docs for 3.1 if running on ColdFusion 9+ and see if there is another way, for example hook into an event on the div loaded or something, and the reactivate the submit button. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Mon, Jan 21, 2013 at 5:08 AM, John Pullam jpul...@mcleansystems.comwrote: Have the form call a custom function onsubmit and check the values in your form fields before it allows form submission. I'm probably missing something here but I need to lookup data in a database after the email address and password are provided. I was using a cfc behind the scenes to do that when the bind was triggered and then updating the on-page variable. How might I do that from the submit button? I'm really hoping to be able to post any bad email/password error message in a javascript window alert and not do it on a new page. ~| 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:353978 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Need to wait on Bind to complete before submitting a CFFORM
Yes and if you o onSubmit=return javascriptFunction(); then you could in that function, check the contents of the div, if it is still empty then then data hasn't been returned and you return false to stop the form submitting. If it contains a success then you could return true which will then allow the submit. What part of that doesn't make sense? -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Mon, Jan 21, 2013 at 5:13 AM, John Pullam jpul...@mcleansystems.comwrote: Why don't you use a javascript submit interception, then the Javascript could check the results returned in the div and allow the submit or not? I think that solution has the same problem. Because the bind is asynchronous, it doesn't necessarily finish execution when you are in the submit logic. I found from testing it out and issuing javascript alert messages that usually the submit fires before the bind runs. ~| 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:353979 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
activeLink(string)
I am using your cfLib component âactiveLink(string)â which works great.. Searching for a solution to the following question, and would appreciate any advice on this matter: When the links are found, for example on a web page - I want to open each link to extract the data to an excel spreadsheet. I know how to extract the data to be displayed on a spreadsheet, although having problems opening a link. Is there a way to do this, and if so can you point me to an example? Tom ~| 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:353980 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
cfhttp -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Mon, Jan 21, 2013 at 5:20 AM, Tom Small t...@re-base.net wrote: I am using your cfLib component âactiveLink(string)â which works great.. Searching for a solution to the following question, and would appreciate any advice on this matter: When the links are found, for example on a web page - I want to open each link to extract the data to an excel spreadsheet. I know how to extract the data to be displayed on a spreadsheet, although having problems opening a link. Is there a way to do this, and if so can you point me to an example? Tom ~| 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:353981 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
Have been using cfhttp although found activeLink simple to use. If there is a better way can you let me know? Tom ~| 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:353982 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
Never heard of activeLink before, maybe you should contact the author directly. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 ~| 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:353983 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
I have sent him an email and got it from cfLib. You mentioned cfhttp - can you point me in the right direction? ~| 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:353984 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
In the same place all this is usually found http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_09.html -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Mon, Jan 21, 2013 at 5:38 AM, Tom Small t...@re-base.net wrote: I have sent him an email and got it from cfLib. You mentioned cfhttp - can you point me in the right direction? ~| 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:353985 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
I have look over this but could not workout how to achieve my issue.. ~| 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:353986 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
Ok you say link, what is the link? Is it a web address or what? -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 ~| 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:353987 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
It is hyperlinks on a web page that once clicked opens data about a person, for example name, email, position, telephone - this is the link and thanks for your reply - http://rg.kcl.ac.uk/staffprofiles/?by=A ~| 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:353988 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
I don't understand your problem, you want to get a page scrape the link and go and get the information and scrape it again to store it into a spreadsheet. And you saying you can't work out how to use cfhttp to load the page and then parse this? Have you tried going to the website google.com and searching for scraping links from web page I think you will find a thousand or more articles that will describe how this works, then you should be able to then use cfhttp to do this. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 ~| 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:353989 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: activeLink(string)
I have been looking at screen scraping using cfhttp and found something from cfLib that works just as good. I will solve it, so no problems and thanks for your reply ~| 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:353990 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm