Ask Ben Web Log Entries

Showing 16 - 30 of 171   < Prev | Next >

Ask Ben: Detecting When DOM Elements Have Been Removed With jQuery

Posted: June 30, 2009 at 10:11 AM by Ben Nadel

Tags: Ask Ben, Javascript / DHTML

I know that jQuery is great for event management, but I was wondering if you have come across a way to detect if a DOM element (say a row in a table) was removed? I have a table and I want to run an ajax request every time a tr was removed, but there are several ways that the tr could be removed. If you look at the W3C, there is actually an event... read more »

Comments (11)  |  Post Comment  |  Ask Ben  |  Permalink



Ask Ben: Formatting A Date Span In ColdFusion

Posted: June 25, 2009 at 9:28 AM by Ben Nadel

Tags: Ask Ben, ColdFusion

I'm new to CF. I have values for startDate and endDate. Let's say my startDate is June 12, 2009 and my endDate is June 30, 2009. How do I display it to look like 'June 12-30, 2009'. And if the months are different for startDate and endDate, how do I display 'June 12 - December 12, 2009'. Thank you for your help. In ColdFusion, there's no inherent... read more »

Comments (15)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Converting Javascript Variables Into ColdFusion Variables

Posted: June 22, 2009 at 9:51 AM by Ben Nadel

Tags: Ask Ben, ColdFusion, Javascript / DHTML

How can I convert a JavaScript variable into a coldfusion variable? I have been asked this question enough times that I figured it was be time to turn it into an actual Ask Ben blog post for future reference. Often times, when front-end developers start getting into server-side scripting (hopefully using ColdFusion), there is some confusion as to... read more »

Comments (5)  |  Post Comment  |  Ask Ben  |  Permalink



Ask Ben: Dynamic Form Field Population With jQuery

Posted: June 10, 2009 at 2:49 PM by Ben Nadel

Tags: Ask Ben, ColdFusion, Javascript / DHTML

Hi Ben, Sorry for not clear enough with my question. Here is my scenerio. I have three input fields: 1) Empno as a combo box; 2) Ename as a text box, and 3) sal as text box.. Now i have all the empno's from the table in the combo box. AS the user selects one of employee number.. related data (ename and sal) should appear in the text boxes.. Can yo... read more »

Comments (10)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Collecting And Relating Sibling XML Nodes In A ColdFusion XML Document

Posted: May 22, 2009 at 10:19 AM by Ben Nadel

Tags: Ask Ben, ColdFusion

I am just starting out with xml and CF. I don't get alot of opportunity to go much beyond cfquery and cfoutput so I have welcomed the chance to get into an xml project. This post has helped me a great deal but I am still having trouble. The xml that I am being supplied has the <id> at the same level of the data I need to relate to it. I know... read more »

Comments (8)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Print Part Of A Web Page With jQuery

Posted: May 21, 2009 at 9:10 PM by Ben Nadel

Tags: Ask Ben, Javascript / DHTML

Ben, great new look!! Quick question, I am implementing a jQuery modal pop-up in my app and I want the users to be able to print only the content of that modal window. Any idea? Thanks! To be honest, I've never done this before, so I am not sure if the following solution is truly cross browser compliant. The jQuery plugin that I authored below wa... read more »

Comments (44)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Selecting XML Nodes That Have A Given Parent Node Using XPath

Posted: May 5, 2009 at 10:44 AM by Ben Nadel

Tags: Ask Ben, ColdFusion

Let's say I have an XML file with the following data in it: [private information]. Right now, the way the component parses the XML file, it returns all instances of DUNS it finds. Is there any way to limit the tag that is searches through and only return say the DUNS from the BasicInfo parent tag? If so, can you provide an example on how that migh... read more »

Comments (0)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Executing ColdFusion Custom Tag Code If First Run Only

Posted: May 4, 2009 at 3:42 PM by Ben Nadel

Tags: Ask Ben, ColdFusion

Someone asked me earlier about executing part of a ColdFusion custom tag only if it was the first instance of the tag run of the given page. Basically, what they were trying to do was create reusable UI widgets that had associated Javascript. The given UI widget tags could be used any number of times on the page, but they only wanted the Javascrip... read more »

Comments (14)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Manually Enforcing Basic HTTP Authorization In ColdFusion

Posted: April 28, 2009 at 9:53 AM by Ben Nadel

Tags: Ask Ben, ColdFusion

I'm working with a remote sms interface through a web service, and our endpoint is a cfc file that they hit. Our cfc returns wddx and is a remote cfc extended through ColdSpring. My question is: if we wanted to return an http statuscode of 401 Bad Credentials in the event Basic http authentication fails, will ColdFusion allow us to simply specify ... read more »

Comments (7)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Pulling Unique SQL Records That Match ALL Join Conditions

Posted: April 23, 2009 at 10:00 AM by Ben Nadel

Tags: Ask Ben, ColdFusion, SQL

The reader question is far too long to put here, but the jist of it was that the reader had a primary table that joined to several "property" tables in a One-to-Many kind of relationship. These properties could be selected in a search form and the reader wanted to be able to return all primary table records that matched at least every selected pro... read more »

Comments (12)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Changing The Root Node In A ColdFusion XML Document

Posted: April 21, 2009 at 9:20 AM by Ben Nadel

Tags: Ask Ben, ColdFusion

I just had a quick regex. I need to replace the first and last xml nodes in an xml string. Basically was doing a quick and dirty way to change the root node of an xml document instead of creating a new root node and copying recursively all the data from one xml object to the new xml object. I can do a simple find "xxx" and replace it with "yyy" bu... read more »

Comments (6)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Accessing Cached CFCs With AJAX via Remote Proxies

Posted: April 15, 2009 at 10:12 AM by Ben Nadel

Tags: Ask Ben, ColdFusion, Javascript / DHTML

Hi Ben, not sure if you already have a post on this, as I'm kind of at a loss with what to search for. I'm building a small application that makes use of AJAX calls (using jQuery) to a CFC instance, saved in my application scope. Making normal calls to this will persist alreay-added data, like you would expect. However, when I make my AJAX call, i... read more »

Comments (18)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Using jQuery's triggerHandler() To Skip Default Behaviors

Posted: March 12, 2009 at 9:45 AM by Ben Nadel

Tags: Ask Ben, Javascript / DHTML

Ben, I have a somewhat simple jquery q for you. I have x number of divs... inside each div i have a checkbox next to each checkbox i have a span tag with some text. i want to make it where if they click on the text OR the checkbox, it will highlight that div (addClass('red')). i was looking at using the trigger and when you click on the text porti... read more »

Comments (4)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Building An AJAX, jQuery, And ColdFusion Powered Application

Posted: March 3, 2009 at 10:37 AM by Ben Nadel

Tags: Ask Ben, ColdFusion, Javascript / DHTML

Mr. Nadel, I'm very eager to learn how to create apps like you've created. I'm just getting into AJAX and I'm more of a junior in Javascript. I've been working with Coldfusion for the past 8 years...But I really want to learn how to build my own apps using AJAX...to get a better understanding of how AJAX works, where do I start, and I want to cont... read more »

Comments (22)  |  Post Comment  |  Ask Ben  |  Permalink


Ask Ben: Parsing CSV Strings With Javascript Exec() Regular Expression Command

Posted: February 19, 2009 at 10:03 AM by Ben Nadel

Tags: Ask Ben, Javascript / DHTML

Just curious if you can help me with this.... I have a user enter the following string: website "content approval" new - into a text box and need to break it up so that it is 3 separate words eg: 1) website 2) content approval 3) new I have tried using the following RegEx - "([^\\"]|\\.)*" but this only gets whats enclosed in the double quotes, ... read more »

Comments (24)  |  Post Comment  |  Ask Ben  |  Permalink

Showing 16 - 30 of 171   Pages: 1 2 3 4 5 6 7 8 9 10 » < Prev | Next >
Recent Blog Comments
Nov 21, 2009 at 11:03 AM
Groovy Operator Overloading Does Not Work In The ColdFusion Context
Hi Ben, Thanks for this informative post. Now I am reading ur old posts too ... read »
Nov 21, 2009 at 10:56 AM
HostMySite.com Has The Best ColdFusion Hosting
@Mehul, Yes very nice people, however several downtimes per day which was not acceptable. Hence we had to move out. I am glad you are having good luck with them so far. ... read »
Nov 20, 2009 at 11:32 PM
Five Months Without Hungarian Notation And I'm Loving It
I've used headless camel case for years for not only ColdFusion variables, but also SQL tables and fields... pretty much everything involving code. I also subscribe to the "don't abbreviate and clea ... read »
Nov 20, 2009 at 11:00 PM
Five Months Without Hungarian Notation And I'm Loving It
@Marcel, Yeah, I always err on the side of longer but more readable variable names. As for the camel casing of CF methods and the headless camel casing of custom items, I get around this by always ... read »
Nov 20, 2009 at 10:56 PM
Five Months Without Hungarian Notation And I'm Loving It
I use the following and love it: my.namespace.MyComponents.functionMethodsOrUDF() CONSTANT_VALUES_OR_PROPERTIES One thing I always try is to CamelCaseBuiltInColdFusionFunctions() so others can tell ... read »
Nov 20, 2009 at 5:38 PM
Learning ColdFusion 8: CFImage Part I - Reading And Writing Images
Hi Ben, Great article. I've been looking around to see if ColdFusion image engine can programatically create the following "wrap around" effect: http://www.creativepro.com/article/photoshop-s-she ... read »
Nov 20, 2009 at 5:35 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
@Dave: I talked to Gert he suggested: <cfhttp method="get" url="http://{some cf website}" result="stuff" addtoken="yes" /> Note the addition of cfhttp attribute addtoken. That should persist y ... read »