Try logging each variable and it's type using typeOf. That'll help you move int 
the right direction. 

On Oct 4, 2011, at 9:35 PM, Lists <[email protected]> wrote:

> 
> The triple === in JavaScript at least is a strict comparison. It not only 
> checks for truthiness, but that both sides are the same type. 
> 
> Have you tried simple eq or == 
> 
> On Oct 4, 2011, at 9:17 PM, "Rick Faircloth" <[email protected]> wrote:
> 
>> 
>> if  (  activeLinkID === 'search_properties' && currentPage === 'index.cfm'
>> )
>>   {  window.location = 'modules/search-properties/search-properties.cfm';
>> }
>> 
>> if  (  activeLinkID === 'search_properties' && currentPage === ''
>> )
>>   {  window.location = '../search-properties/search-properties.cfm';
>> }
>> 
>> My first code, that still seems valid, was:
>> 
>> if   (  activeLinkID === 'search_properties' && (currentPage === 'index.cfm'
>> || currentPage === '')  )
>>    {  window.location = 'modules/search-properties/search-properties.cfm'
>> }
>> else {  window.location = '../search-properties/search-properties.cfm'
>> }
>> 
>> 
>> No syntax errors, but the page is not changed
>> to search-properties.cfm.
>> 
>> These lines are bypassed as if conditions are not met,
>> and the conditions are met.
>> 
>> They work if the URL ends in 'index.cfm', but not if the
>> URL is just the domain name.
>> 
>> I've tried every version of this I can think of.
>> 
>> Clues, anyone?
>> 
>> Rick
>> 
>> 
>> 
>> 
> 
> 

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

Reply via email to