Category Archives: Code

Javascript – Test if form element exists

var myobj = document.form.fieldname; if (myobj != null || myobj != ‘undefined’){ //do something }

Posted in Code, Javascript, Snippets | Comments Off on Javascript – Test if form element exists

horizontal menu challenges

I needed to implement a self contained Horizontal menu that shows the user which section they are in by using a highlight that is different from the rest of the menu bar. No breadcrumbs. Using coldfusion allowed me to do … Continue reading

Posted in Code, CSS, Problems & Fixes | Comments Off on horizontal menu challenges

Coldfusion and Pausing Javascript

I had an interesting problem this week. I had a page with a CFQuery, a CFLoop to output the query, and a javascript function. The problem was that the javascript function was occurring before the loop would draw the output. … Continue reading

Posted in Code, Coldfusion, Javascript, Problems & Fixes, Snippets | Comments Off on Coldfusion and Pausing Javascript

looping over Arrays

Yippee we can now easily loop over arrays in CF8. <cfloop array=”arrayname” index=”i”> <cfoutput>#i#</cfoutput> </cfloop> #i# will show us the values in the array. You can ofcourse apply logic to the output so that dates an numbers are formatted.

Posted in Code, Coldfusion, Snippets | Comments Off on looping over Arrays

CFMail Adding multiple attachments with CFMAILPARAM

In building a project for work I needed to add potentially multiple attachments to an email. Fortunately, CFMail has a way to add header and additional information. <cfmail to=”somebody@domain.com” from = “yourstruly@domain.com” subject=”something” server=”yourmailserver”> <p>Here are your attachments.</p> <cfmailparam file=”c://yourpath/filename.ext”> … Continue reading

Posted in Code, Coldfusion, Problems & Fixes, Snippets | Comments Off on CFMail Adding multiple attachments with CFMAILPARAM