$.ajax context option

All the context does is it sets the value of this in the callbacks. So if you’re in an event handler, and you want this in the callbacks to be the element that received the event, you’d do: context:this, success:function() { // “this” is whatever the value was where this ajax call was made } … Read more

How do you use MYSQL in ColdFusion? [closed]

I’m surprised if you couldn’t find anything on how to connect to a MySQL datasource. Here’s Adobe’s list of settings to use in CF Administrator. The important part here is the name you give it. Because then in your queries or stored procs, you use that name to reference the datasource: <cfquery name=”yourQuery” datasource=”name of … Read more

Remove the string from URL

Here is one way to do it. <cfset normalURL = “http://test.com/myhome/live”> <cfoutput><p>#normalURL#</p></cfoutput> Output from above code: http://test.com/myhome/live <cfset stringAfterLastSlash = ListLast(normalURL,”https://stackoverflow.com/”)> <cfoutput><p>#stringAfterLastSlash#</p></cfoutput> Output from above code: live <cfset stringRemovedFromURL = Replace(normalURL,”/#stringAfterLastSlash#”,””)> <cfoutput><p>#stringRemovedFromURL#</p></cfoutput> Output from above code: http://test.com/myhome You can play with this code and see the results here.