Re: listtoarray?

2008-06-06 Thread Jarlath Gallagher
This will do it for you...

I think!!! If you already have this resolved apologies...

If not have fun

cfset variables.TestList = qu_45_tb_45_split_0_split_q_67

cfset variables.TestList = replace(variables.TestList,_split_,,,all)
cfset variables.TestList = replace(variables.TestList,_,,,all)
cfset variables.SplitTest = ListToArray(variables.TestList,',')
 
cfdump var=#variables.SplitTest#

 Hi
 
 we have various string values like the following:
 
 qu_45_tb_45_split_0_split_q_67
 
 we need to break this string down into 3 array elements and split it 
 based on the string '_split_'
 
 if the listtoarray function used this actual sequence to break the 
 string up then we would be given an array:
 
 elem[1] = qu_45_tb_45
 elem[2] = 0
 elem[3] = q_67
 
 which is how we need it. but of course the listtoarray uses each 
 string charaacter as a delimeter to break the string down and 
 therefore doesnt produce what we need
 
 is there an alternative that we can use that will break this down 
 based on the entire sequence '_split_'
 
 we have looked through the livedocs and are sure this is achievable 
 through the uses of 2 or 3 functions but cannot worj out quiet how to 
 do it
 
 thanks for your help
 
 richard 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306949
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Need some advice on speeding up query...

2008-04-23 Thread Jarlath Gallagher
Hey there,

Not sure if this input will alleviate your issues more than the methods 
mentioned previously but i had a similar problem polling the gracenote db for a 
massive number of matching records. 

The method i used was to run the SQL Analyzer tool primarily to streamline my 
query but also only retrieving from the DB the records that i was displaying. 
I.E generate the record numbers you should retrieve by using the page number 
and records by page value. 

I.E. Page 1 1 - 20
 Page 2 21 - 40
 Page 3 41 - 60
 Etc.

This way you are only ever retrieving 20 records at a time. You can use SELECT 
TOP #X# FROM TABLE_Y process by building the SQL Script dynamically...

Hope this input might help just a little...
 Hi, all...
 
 Up till now, my db's have been relatively small
 and fairly quick when being queried.  I've never had to bother
 with indexes or other methods of optimizing queries.
 
 However, I've now got a db of about 6400 real estate properties.
 
 I've put together a Browse Properties page, which returns
 20 records at a time and displays pagination.
 
 The query is pretty slow.
 
 Would indexes or perhaps another approach to this query
 make it quicker?
 
 Here's the code that pulls together records from the tables
 containing the various property types...
 
 cfquery name=get_properties datasource=#dsn#
   

 select sa.street_number as prop_street_number, sa.street_name as 
 prop_street_name,
   
 sa.city as prop_city, sa.public_remarks_01 as prop_public_remarks_01,
   
 sa.public_remarks_02 as prop_public_remarks_02, sa.list_price as 
 prop_list_price,
   
 (select sap.photo_filename from smlc_acr_photos sap where sap.
 photo_mls_number =
 sa.mls_number limit 1) as prop_photo_filename
  
 from smlc_acr sa
 
 union   

 select sc.street_number as prop_street_number, sc.street_name as 
 prop_street_name,
   
 sc.city as prop_city, sc.public_remarks_01 as prop_public_remarks_01,
   
 sc.public_remarks_02 as prop_public_remarks_02, sc.list_price as 
 prop_list_price,
   
 (select scp.photo_filename from smlc_com_photos scp where scp.
 photo_mls_number =
 sc.mls_number limit 1) as prop_photo_filename
  
 from smlc_com sc
 
 union

 select sl.street_number as prop_street_number, sl.street_name as 
 prop_street_name,
   
 sl.city as prop_city, sl.public_remarks_01 as prop_public_remarks_01,
   
 sl.public_remarks_02 as prop_public_remarks_02, sl.list_price as 
 prop_list_price,
   
 (select slp.photo_filename from smlc_lot_photos slp where slp.
 photo_mls_number =
 sl.mls_number limit 1) as prop_photo_filename
  
 from smlc_lots sl
 
 union 

 select sr.street_number as prop_street_number, sr.street_name as 
 prop_street_name,
   
 sr.city as prop_city, sr.public_remarks_01 as prop_public_remarks_01,
   
 sr.public_remarks_02 as prop_public_remarks_02, sr.list_price as 
 prop_list_price,
   (select srp.photo_filename from smlc_ren_photos srp where srp.
 photo_mls_number =
 sr.mls_number limit 1) as prop_photo_filename
  
 from smlc_ren sr
 
 union

 select sres.street_number as prop_street_number, sres.street_name as 
 prop_street_name,
   
 sres.city as prop_city, sres.public_remarks_01 as 
 prop_public_remarks_01,
   
 sres.public_remarks_02 as prop_public_remarks_02, sres.list_price as 
 prop_list_price,
   
 (select sresp.photo_filename from smlc_res_photos sresp where sresp.
 photo_mls_number =
 sres.mls_number limit 1) as prop_photo_filename
  
 from smlc_res sres
 
 /cfquery


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304052
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 cftextarea with rich text

2008-04-23 Thread Jarlath Gallagher
Hi,

If you use the javascript API @ 
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API#FCKeditor_JavaScript_API

you can use a method called editorinstancename.GetHtml(); this will give you 
the inner html from the editor. you can write this to a variable and check the 
length of that from there...

hope this helps

 I am trying to check whether or not a rich text textarea has a value 
 in JavaScript. On a normal textarea box I can just use the elementname.
 value == '' but that is not working when I have rich text turned on.
 
 Anyone have any ideas how to check it when rich text is on?
 
 Thanks! 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304063
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Download File Filter Question

2008-04-23 Thread Jarlath Gallagher
You mean you are using input type=file?? -- am i correct in assumin this??

If so you can add accept=[MIME-type]...

Replace [MIME-type] with your chosen file type definition...


When you are using enctype=multipart/form-data to create a browse field
for file selection, is there any way to define a default file type filter
for the browse/select window?  Right now it come up with the filter *.*. How
could I make it come up with say, *.gif or *.jpg?

This has always bothered me. Anyone know?

Thanks


Robert B. Harrison
Director of Interactive services
Austin  Williams
125 Kennedy Drive, Suite 100 Hauppauge NY 11788
T : 631.231.6600 Ext. 119 
F : 631.434.7022
www.austin-williams.com

Great advertising can't be either/or... It must be . 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304067
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


FCKEditor

2008-04-07 Thread Jarlath Gallagher
Hi All,

I have installed fckeditor on my dev environment and have had it up and running.

I am trying to implement the 
oEditor.Commands.GetCommand('NewPage').Execute(); event. This functions 
without problem in firefox but causes a application exception in Internet 
Explorer. This causes the browser to forcibly shut down. When i remove the call 
to this event in the javascript function the page does not crash...

Any help is greatly appreciated... 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302834
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4