Re: pass variable to cfdiv

2013-02-20 Thread Raymond Camden

Then again - why can't you use URL variables? I don't think I understood
you.


On Tue, Feb 19, 2013 at 5:51 PM, Sergey Senyuk b2eng...@prettyvancouver.com
 wrote:


 No, it's on the same server.

 The structure is:
 Website_1.com and website_2.com on the same server
 files of website_2.com located inside the main folder of website_1.com 
 (website1/website_2)
 In the ColdFusion it is some kind of security.
 a
 href=javascript:ColdFusion.navigate('page.cfm?ID=1','div2');Link
 2/a
 and
 a
 href=javascript:ColdFusion.navigate('http://website_1.com/page.cfm?ID=1
 ','div2');Link
 2/a
 working only for Website_1.com and not for Website_2.com (no error but
 nothing on output)

 

~|
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:354591
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Question about CF Patches

2013-02-20 Thread funand learning

All -

Has anybody faced a problem where you have to clear browser cache for
application that requires log in? We have applied patches two weeks back,
but last week we were not able to login into an application until the
browser cache was cleared, and it repeated again yesterday too. This never
happened before applying the patches. We are running Coldfusion 8

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:354592
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


How would you optimize this SQL?

2013-02-20 Thread Torrent Girl

Hello all

I was told that the following sql is taking too long to run but the person 
doing load testing:

SELECT @intCourseCompletions=(SELECT COUNT(intMemberStageID) as completions 
FROM tblMemberStages WHERE bitCompleted=1)

It is a stored proc.

Any suggestions on how I can optimize it for better performance?

I just want to count the number of completions. 

~|
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:354593
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: How would you optimize this SQL?

2013-02-20 Thread DURETTE, STEVEN J

Well, that code would be equivalent to:

SELECT @intCourseCompletions = COUNT(intMemberStageID) FROM tblMemberStages 
WHERE bitCompleted = 1;

However I believe to get any performance increase you will need an index on 
bitCompleted.

CREATE INDEX myindexname ON tblMemberStages (bitCompleted);

You could also try: SELECT @intCourseCompletions = sum(cast(bitCompleted as 
int)) FROM tblMemberStages;

The conversion to INT may or may not take longer. The index is probably your 
best bet but try both ways to see which works best.

Steve

-Original Message-
From: Torrent Girl [mailto:moniqueb...@gmail.com] 
Sent: Wednesday, February 20, 2013 11:07 AM
To: cf-talk
Subject: How would you optimize this SQL?


Hello all

I was told that the following sql is taking too long to run but the person 
doing load testing:

SELECT @intCourseCompletions=(SELECT COUNT(intMemberStageID) as completions 
FROM tblMemberStages WHERE bitCompleted=1)

It is a stored proc.

Any suggestions on how I can optimize it for better performance?

I just want to count the number of completions. 



~|
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:354594
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Missing Template Handler

2013-02-20 Thread Robert Harrison

CF Missing Template Handler

We have a new site running on IIS7.5.  We have the 404 working for all pages 
except .cfm pages. We have the admin set to use the missing template handler, 
but it's not working. We're getting a blank page.

Any thoughts... works fine on our IIS6 sites.

Thanks,
Robert

Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_

~|
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:354595
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How would you optimize this SQL?

2013-02-20 Thread Torrent Girl

 Well, that code would be equivalent to:
 
 SELECT @intCourseCompletions = COUNT(intMemberStageID) FROM 
 tblMemberStages WHERE bitCompleted = 1;
 
 However I believe to get any performance increase you will need an 
 index on bitCompleted.
 
 CREATE INDEX myindexname ON tblMemberStages (bitCompleted);
 
 You could also try: SELECT @intCourseCompletions = 
 sum(cast(bitCompleted as int)) FROM tblMemberStages;
 
 The conversion to INT may or may not take longer. The index is 
 probably your best bet but try both ways to see which works best.
 
 Steve
 
 -Original Message-
 From: Torrent Girl [mailto:moniqueb...@gmail.com] 
 Sent: Wednesday, February 20, 2013 11:07 AM
 To: cf-talk
 Subject: How would you optimize this SQL?
 
 
Thank you.



~|
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:354596
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How would you optimize this SQL?

2013-02-20 Thread Bobby

You could also add schema prefixes to your tables and columns (or alias
them) as well as make the 1 a parameter.

That should help with execution plan caching.


Declare @myBit int
Set @myBit = 1
SELECT @intCourseCompletions = COUNT(m.intMemberStageID) FROM
dbo.tblMemberStages m WHERE m.bitCompleted = @myBit;



On 2/20/13 11:30 AM, Torrent Girl moniqueb...@gmail.com wrote:


 Well, that code would be equivalent to:
 
 SELECT @intCourseCompletions = COUNT(intMemberStageID) FROM
 tblMemberStages WHERE bitCompleted = 1;
 
 However I believe to get any performance increase you will need an
 index on bitCompleted.
 
 CREATE INDEX myindexname ON tblMemberStages (bitCompleted);
 
 You could also try: SELECT @intCourseCompletions =
 sum(cast(bitCompleted as int)) FROM tblMemberStages;
 
 The conversion to INT may or may not take longer. The index is
 probably your best bet but try both ways to see which works best.
 
 Steve
 
 -Original Message-
 From: Torrent Girl [mailto:moniqueb...@gmail.com]
 Sent: Wednesday, February 20, 2013 11:07 AM
 To: cf-talk
 Subject: How would you optimize this SQL?
 
 
Thank you.





~|
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:354597
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Missing Template Handler

2013-02-20 Thread Robert Harrison

Does anyone have the missing template handler working for IIS7 or above?  We 
have all missing pages except .cfm working.  Any thoughts. 



Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_

~|
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:354598
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Trying to understand something in the browsers

2013-02-20 Thread Dennis Powers

This may be slightly off the exact topic but I stumbled upon something while
writing a file upload script that I am trying to understand.  Let me explain
how I got there:  The original goal was when someone submitted the
multipart/form-data form with the file that I would hide the submit button
and show an animated pseudo progress bar image in its place.   

div id='submitbutton'
{buttons here}
div
div id='progressimage' style='display:none;'
{image here}
/div



In the JavaScript onsubmit function the script after performing validation
would change the  submitbutton to display: none and the progressbar div to
display block. This would show something while the file uploaded and
prevent them from re-submitting.

[code]
document.getElementById(submitButtonDiv).style.display = none;
document.getElementById(progressBar).style.display = block;
[/code]

It worked as expected in Chrome and Firefox but not in IE or Opera.  In IE
and Opera the submit button would be hidden but the image would not show or
if it did would not be animated.  What I noticed is that when I cleared the
browsers cache (all of them) it still worked in Chrome and FF but the image
would not even show in IE.  

After some time with Google I changed the code to this:

[code]
document.getElementById(submitButtonDiv).style.display = none;  
if (navigator.appName == Microsoft Internet Explorer) {
document.getElementById(progressBar).innerHTML = ;
document.getElementById(progressBar).style.display = block;
document.getElementById(progressBar).innerHTML = img
src='images/progress_bargreen.gif' width='150' height='16' border='0';
} else {

document.getElementById(progressBar).style.display = block; 
} 
[/code] 

And it worked perfectly in all browsers empty or full cache.  Now I am
trying to understand why.  Is it because IE does not download images inside
hidden div's until or unless the style for it is changed? Or does the
rendering engine in IE process and render the inserted html first so that
the image is fully rendered and active before the submit or does in IE the
style change take place in conjunction with the submit thereby preventing
the image from fully rendering?  Does anyone of you much smarter than I am
people know why this change in the JavaScript works?






Dennis Powers
UXB Internet - A website Design and Hosting Company
P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844
W: http://www.uxbinternet.com
W: http://www.ctbusinesslist.com




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354599
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Trying to understand something in the browsers

2013-02-20 Thread Robert Harrison

This is really a Java Script issue, but I do this all the time.  If you have 
DreamWeaver you can use show/hide layers very easily to do this.  If not, I can 
send you some code off-line if you'd like. 

Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_

~|
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:354600
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Alternate to Compare()

2013-02-20 Thread Pradeep Viswanathan Rajasekaran

Hi All,

Is there an alternate function for compare() to do string compare in
ColdFusion ?

I am guessing that I seem to be getting wrong results from compare() when
the string contains some ASCII / Non-printable character(s).

This data is being pulled from LDAP and being compared and updated to the
data on my DB.

I did a manual character to character ASCII compare between the
LDAP.variable to the Query.variable on my DB and ASCII codes are the same,
however compare of the whole string using
compare(LDAP.variable,Query.variable) results in 1

Any thoughts ?

Thanks in Advance!


BR,
Pradeep


~|
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:354601
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How would you optimize this SQL?

2013-02-20 Thread Dave Watts

 You could also add schema prefixes to your tables and columns (or alias
 them) as well as make the 1 a parameter.

 That should help with execution plan caching.

Actually, caching the execution plan with a parameter here is probably
a bad idea - at least half the time!

When you have a bit value (on/off) as a parameter, the execution plan
will either be very very good, or very very bad. You're better off not
using a parameter (which will give you two execution plans ultimately
that are more specific and both very very good) or using WITH
RECOMPILE to avoid the use of any cached execution plans at all.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354602
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How would you optimize this SQL?

2013-02-20 Thread Bobby

Will it even cache the plan without the 1 being a parameter?

In either case, I'd still advocate the use of schema prefixes/aliases.


On 2/20/13 1:15 PM, Dave Watts dwa...@figleaf.com wrote:


 You could also add schema prefixes to your tables and columns (or alias
 them) as well as make the 1 a parameter.

 That should help with execution plan caching.

Actually, caching the execution plan with a parameter here is probably
a bad idea - at least half the time!

When you have a bit value (on/off) as a parameter, the execution plan
will either be very very good, or very very bad. You're better off not
using a parameter (which will give you two execution plans ultimately
that are more specific and both very very good) or using WITH
RECOMPILE to avoid the use of any cached execution plans at all.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354603
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Missing Template Handler : RESOLVED

2013-02-20 Thread Robert Harrison

Found a solution that overrides the problems with IIS not serving up the 
missing template handler from the CF administrator.  Put this in the 
application.cfc file:

cffunction name=onMissingTemplate returnType=boolean 
output=false
 cfinclude template=404.cfm
/cffunction   

Thanks Ray Camden... found that (or a variation thereof) in your blog. 


Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_

~|
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:354604
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Missing Template Handler

2013-02-20 Thread Russ Michaels

Yes we have it working here.
Are you sure there are no errors ipccurring n the template?
Iis7 will not show cf errors by default.

Regards
Russ Michaels
www.michaels.me.uk
www.cfmldeveloper.com - Free CFML hosting for developers
www.cfsearch.com - CF search engine
On Feb 20, 2013 5:21 PM, Robert Harrison rob...@austin-williams.com
wrote:


 Does anyone have the missing template handler working for IIS7 or above?
  We have all missing pages except .cfm working.  Any thoughts.



 Robert Harrison
 Director of Interactive Services

 Austin  Williams
 Advertising I Branding I Digital I Direct
 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
 T 631.231.6600 X 119   F 631.434.7022
 http://www.austin-williams.com

 Blog:  http://www.austin-williams.com/blog
 Twitter:  http://www.twitter.com/austin_

 

~|
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:354605
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Alternate to Compare()

2013-02-20 Thread Adam Cameron

By the time CF is doing the compare, it doesn't know one string came from
an LDAP query and the other from a DB: it just sees two strings.

Can you provide some stand-alone code that demonstrates what you are
seeing? I am sceptical that the situation is what you are thinking it is.

-- 
Adam

On 21 February 2013 07:13, Pradeep Viswanathan Rajasekaran 
pradeeepv...@gmail.com wrote:


 Hi All,

 Is there an alternate function for compare() to do string compare in
 ColdFusion ?

 I am guessing that I seem to be getting wrong results from compare() when
 the string contains some ASCII / Non-printable character(s).

 This data is being pulled from LDAP and being compared and updated to the
 data on my DB.

 I did a manual character to character ASCII compare between the
 LDAP.variable to the Query.variable on my DB and ASCII codes are the same,
 however compare of the whole string using
 compare(LDAP.variable,Query.variable) results in 1

 Any thoughts ?

 Thanks in Advance!


 BR,
 Pradeep


 

~|
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:354607
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How would you optimize this SQL?

2013-02-20 Thread Dave Watts

 Will it even cache the plan without the 1 being a parameter?

Sure, by default. If you just run a query like SELECT * FROM
mytable, the database server will cache that execution plan.
Parameters usually let you more effectively reuse execution plans,
that's all. For example, if you had two queries without parameters,
each would have its own execution plan. Now, usually, the execution
plans would just be very similar, and it would make sense to have one
execution plan that works for any value of the parameter. But with
bit/binary values, this is not the case.

 In either case, I'd still advocate the use of schema prefixes/aliases.

Me too.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354606
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Alternate to Compare()

2013-02-20 Thread Pradeep Viswanathan Rajasekaran

I don't have the exact code now, let me just type the steps

1. Get data from ldap,
2. Update in DB if LDAP. ColumnValue != dbquery.column

This is a scheduler as you may have guessed.

I use the compare function for the second step

Every time the scheduler runs,  there are few a some few records which gets
updated always even if there is no change in LDAP data

in fact I did even this,
1. Query ldap for a specific record - cfldap query
2. Update the specific record
3. Query this specific record– select query
4. Cfdump compare (cfldap.columnvalue, selectQuery.ColumnValue)

The result of Cfdump is 1,  it should be 0 right?

I thought the database is the cause and performed a character by character
comparison of the ldap value and the db value.

Looped Through every character of both strings and printed the ASCII using
asc function and checked them manually.

The ASCII code matched for every single character of both strings. The
reason I choose to do a character by character compare is because there
were spaces and some symbols on this data.
On Feb 21, 2013 12:26 AM, Adam Cameron adamcameroncoldfus...@gmail.com
wrote:


 By the time CF is doing the compare, it doesn't know one string came from
 an LDAP query and the other from a DB: it just sees two strings.

 Can you provide some stand-alone code that demonstrates what you are
 seeing? I am sceptical that the situation is what you are thinking it is.

 --
 Adam

 On 21 February 2013 07:13, Pradeep Viswanathan Rajasekaran 
 pradeeepv...@gmail.com wrote:

 
  Hi All,
 
  Is there an alternate function for compare() to do string compare in
  ColdFusion ?
 
  I am guessing that I seem to be getting wrong results from compare() when
  the string contains some ASCII / Non-printable character(s).
 
  This data is being pulled from LDAP and being compared and updated to the
  data on my DB.
 
  I did a manual character to character ASCII compare between the
  LDAP.variable to the Query.variable on my DB and ASCII codes are the
 same,
  however compare of the whole string using
  compare(LDAP.variable,Query.variable) results in 1
 
  Any thoughts ?
 
  Thanks in Advance!
 
 
  BR,
  Pradeep
 
 
 

 

~|
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:354608
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Alternate to Compare()

2013-02-20 Thread Adam Cameron

There's no point describing the situation: all we can do with that is nod
and go OK, that's nice.

You need to give us some code that demonstrates what you are seeing.

This is standard troubleshooting: don't simply stop at it doesn't work,
but work through to isolate and identify exactly what the problem is. The
problem is almost certainly *not* just the compare() function doesn't work
with non-ASCII characters, because someone else (or indeed really a lot of
people, given that would be a fairly fundamental failing in the function)
would have encountered this, and raised a bug for it. This hasn't happened,
so it's unlikely to be the issue.

So you're not yet far enough through your investigations as to what is
wrong to draw any meaningful conclusions, and you'renot giving US anything
useful to go on to help.

In constructing a portable reproduction case you will eliminate elements of
the process that are irrelevant (like the strings coming from LDAP and the
DB respectively), and pare it down to actually what matters. And, indeed,
you will pretty much then know exactly what te problem is. If it's a
problem with your code or your data or your general expectations, you can
fix it. If it's a problem with CF, you can raise a bug and work around it.

If you can come up with a repro case but cannot work out what's going on,
you have portable code to share with us so we can have a look.

This is kinda troubleshooting 101, I'm afraid.

By way of example, here's a repro case that demonstrates there *isn't* an
intrinsic problem with compare() and non-ascii characters:

cfprocessingdirective pageencoding=UTF-8
cfset s1 = ต่อให้ ทุ่มเท ด้วย 
ใจทั้งใจ จะ มอง ไป ทางใด ยัง 
เห็น ภาพ เธอ
ใน สายตา จะ เติม ความหวาน ให้ 
กับ โลก นี้ ได้ ทั้ง ใบ รับรู้ 
บ้าง ไหม หรือ
หัวใจ เธอ ไม่มี บอก ฉัน สักที 
แต่ ข้างใน ฟูมฟาย เป็นอะไร 
ไม่รู้ หัวใจ ละลาย
แต่ ข้างใน มัน อิน เป็นอะไร 
ไม่รู้ หัวใจ มัน ฟิน
cfset s2 = ต่อให้ ทุ่มเท ด้วย 
ใจทั้งใจ จะ มอง ไป ทางใด ยัง 
เห็น ภาพ เธอ
ใน สายตา จะ เติม ความหวาน ให้ 
กับ โลก นี้ ได้ ทั้ง ใบ รับรู้ 
บ้าง ไหม หรือ
หัวใจ เธอ ไม่มี บอก ฉัน สักที 
แต่ ข้างใน ฟูมฟาย เป็นอะไร 
ไม่รู้ หัวใจ ละลาย
แต่ ข้างใน มัน อิน เป็นอะไร 
ไม่รู้ หัวใจ มัน ฟิน
cfset s3 = ต่อให้ ทุ่มเท ด้วย 
ใจทั้งใจ จะ มอง ไป ทางใด ยัง 
เห็น ภาพ เธอ
ใน สายตา จะ เติม ความหวาน ให้ 
กับ โลก นี้ ได้ ทั้ง ใบ รับรู้ 
บ้าง ไหม หรือ
หัวใจ เธอ ไม่มี บอก ฉัน สักที 
แต่ ข้างใน ฟูมฟาย เป็นอะไร 
ไม่รู้ หัวใจ ละลาย
แต่ ข้างใน มัน อิน เป็นอะไร 
ไม่รู้ หัวใจ มัน ฟิา!--- last char is
different ---
cfoutput
compare(s1, s2): #compare(s1, s2)# (should be 0)br /
compare(s1, s3): #compare(s1, s3)# (should be not 0)br /
compare(s1, ucase(s2)): #compare(s1, ucase(s2))# (should be not 0)br /
compareNoCase(s1, ucase(s2)): #compareNoCase(s1, ucase(s2))# (should be
0)br /
/cfoutput

(that Thai came from http://thailipsum.com/#nice5, I have no idea what it
means. It's supposedly lorem ipsum equiv.).

You should be deriving something along those lines to demonstrate your own
situation.

-- 
Adam



On 21 February 2013 09:54, Pradeep Viswanathan Rajasekaran 
pradeeepv...@gmail.com wrote:


 I don't have the exact code now, let me just type the steps

 1. Get data from ldap,
 2. Update in DB if LDAP. ColumnValue != dbquery.column

 This is a scheduler as you may have guessed.

 I use the compare function for the second step

 Every time the scheduler runs,  there are few a some few records which gets
 updated always even if there is no change in LDAP data

 in fact I did even this,
 1. Query ldap for a specific record - cfldap query
 2. Update the specific record
 3. Query this specific record– select query
 4. Cfdump compare (cfldap.columnvalue, selectQuery.ColumnValue)

 The result of Cfdump is 1,  it should be 0 right?


Re: Changing bind value in form field: RESOLVED

2013-02-20 Thread Jaime Muniz

I didn't get any responses to my post.
Probably because I wasn't clear on my email.

But for those that may have a similar problem in the future.

I solved the problem by binding to a CFC that takes the value from the 
input field and subtracting the value of 1.
It seems a bit over kill for such a simple task. However, I could figure 
out how to do in the client side.

Regards,
Jaime



On 2/19/2013 4:43 PM, Jaime Muniz wrote:
 I have a form in which I want to copy a field using bind like this:

 cfinput type=text name=fieldname  bind={Tubes}/

 This works great except what I would really like to do is subtract 1
 form the  bind value.
 I searched Google and found post that suggested this:

 cfinput type=text name=fieldname  bind={Tubes - 1}/

 But that doesn't seem to work.
 I tried various other scenarios without any success.
 I suspect it may take some javascript magic which I'm not very good at.

 Anyone have a suggestion?

 Regards,
 Jaime




 

~|
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:354610
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Trying to understand something in the browsers

2013-02-20 Thread UXB

 This is really a Java Script issue,

It is but is tied to exactly HOW the browser does it's thing.  I hide and
show layers all the time but it was this particular issue, showing a
layer/div with an image in it immediately prior to form submission, and
getting the image to show and animate in IE was vexing.  

The code:
document.getElementById(progressBar).style.display = block; 
or 
$(#progressBar).show(); 

should have worked fine but in this case it didn't where explicitly defining
the HTML for the div did.  I know it's a personal quirk, but I'd just like
to understand why if anyone knows.



Dennis Powers
UXB Internet - A website Design and Hosting Company
P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844
W: http://www.uxbinternet.com
W: http://www.ctbusinesslist.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354611
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm