Ask Ben Web Log Entries

Showing 1 - 15 of 157   < Prev | Next >

Ask Ben: Overriding Core jQuery Methods

Posted: June 30, 2009 at 2:06 PM by Ben Nadel

Tags: Ask Ben, Javascript / DHTML

Is there a way to overload the included remove() function in jquery? Possibly a separate js file? For example we are using the min version and it would be cool to not have to add this in each time we upgraded to a new version that has come out? jQuery is such a well thought out, powerful Javascript library, that it actually uses itself to build i... read more »

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



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 (7)  |  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 (12)  |  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 (14)  |  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 (3)  |  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 (15)  |  Post Comment  |  Ask Ben  |  Permalink

Showing 1 - 15 of 157   Pages: 1 2 3 4 5 6 7 8 9 10 » < Prev | Next >
Recent Blog Comments
Jul 4, 2009 at 9:42 AM
FLV 404 Error On Windows 2003 Server
I bookmarked this page. Thanks for given this great post.... ... read »
Jul 4, 2009 at 4:00 AM
Terms Of Service / Privacy Policy Document Generator
thanks ben, I'm not a big fan of contracts so to find your no no-nesense ToS generator has helped me no end. all the best matt ... read »
Justice
Jul 3, 2009 at 11:10 PM
Create A Running Average Without Storing Individual Values
@Ben, I think you're going about this the wrong way. You're trying to use complicated techniques when there is a simple and beautiful technique readily available (a la Gary Funk's comment). Instead ... read »
Bob
Jul 3, 2009 at 9:19 PM
Project HUGE: Huge In A Hurry - Get Big - Phase 3 / Week 1
a good technical explanation http://crossfitphoenix.typepad.com/crossfit_phoenix_forging_/the-overhead-squat.html ... read »
Jul 3, 2009 at 9:03 PM
Create A Running Average Without Storing Individual Values
If I wanted to do this and only carry two numbers, I'd keep track of the sum and N. Then you are pretty much accurate all the time. average = (sum + new_number) / (N + 1) But all this was in a for ... read »
Roland Collins
Jul 3, 2009 at 8:58 PM
Create A Running Average Without Storing Individual Values
@Martin - not just floating point though. Depending on what langauge you're working in, decimals can cause just as many headaches if they're not precise enough. But again, for most applications, th ... read »
Isnogood
Jul 3, 2009 at 7:16 PM
Project HUGE: Huge In A Hurry - Get Big - Phase 3 / Week 1
Watch this http://www.nsca-lift.org/videos/default.shtml ... read »
Aaron
Jul 3, 2009 at 7:13 PM
Project HUGE: Get Big, Phase One (Chat Waterbury - Huge In A Hurry)
I've just finished the 3rd week of phase 3, and have to agree that the overhead squats are hard. I think this is most due to the wide grip on which places more pressure on your upper back. Only this ... read »