- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 11
- Posts with Upvotes
- 11
- Upvoting Members
- 6
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: init() is just a standard convention most people adopt with components. The init() function initializes any variables needed by the component's functions. Then returns a reference to the current component. ie [code] Test.cfm <cfset myObj = createObject("component", "MyComponent").init(dsn="My DSN")> MyComponent.cfc <cfcomponent> <cffunction name="init" output="false" returntype="MyComponent"> <cfargument name="dsn" type="string"> <!--- initialize … | |
| Re: Depends on what else the stack trace says. All we can tell from that is that something goes wrong when checking your jvm version. What's the rest of the trace? Check the logs if needed. |
Re: Double the pound signs. ie Use ## instead of # [code] examples: <cfset value = "print ## sign"> <cfoutput>print ## symbol</cfoutput> [/code] | |
Re: I doubt there is anything built in, but you could roll your own. Grab the textarea value, split it on some sort of word boundary (space, etcetera) and validate. | |
Re: > Here's the code that's producing it. What you posted works perfectly w/CF10 and mySQL. Are you 100% positive that's the SQL you're using? Because a common cause of that error is forgetting the comma before the date mask ie DATE_FORMAT(Events.event_date "%W") instead of DATE_FORMAT(Events.event_date , "%W") | |
Re: > does this new id already exist in the array If you're looking for a magic function, there isn't one. You must loop through the array elements one by one. Pull out each structure, check it's ID. If it matches throw an error. It's as simple as that. | |
Re: > `decrypt(ToString(toBinary(strBase64Value)),"keycode")` If there are only 2 arguments, it's not AES. It defaults to a legacy algorithm called [CFMX_COMPAT](http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c1c.html). Most CF apps don't use that anymore. I wouldn't bother trying to replicate it in c#. Better to decrypt and re-encrypt with whatever algorithm you plan to use in the new … | |
Re: Arrgh... the site ate my response. Anyway, that's a sql UPDATE. The basic syntax is: http://www.w3schools.com/SQl/sql_update.asp <cfquery ...> UPDATE TheTableName SET ImagePathColumnName = <cfqueryparam value="#variableWithPath#" cfsqltype="(your type here)"> WHERE PrimaryKeyColumn = <cfqueryparam value="#variableWithPrimaryKey#" cfsqltype="(your type here)"> </cfquery> If you need specifics, post your table structure and form code. | |
Re: Try a regular expression like `ReFind("[^\d]", form.theFieldName)` If the value's required, check the `LEN(...)` too. | |
Re: > 1. What are the circumstances you would use it. > 2. What are the advantages and disadvantages to using it over HTML? > 3. Is it compatible with CSS,Javascript, PHP, and MySQL? If you've used PHP (which I think you have) then you already know the answers to most … | |
Re: ColdFusion supports several persistent scopee. Take a look at the documentation for the `session` (per user) and `application` (entire app) scoopes. | |
Re: It doesn't make sense to use both in the same block. As jsmall26 said cflocation always wins because it runs first - on the server. The browser never even sees the javascript. The javascript belongs on the form page. It should execute before the form is submitted. Save the cflocation … | |
Re: HTML file inputs do not allow multiple file selection. AFAIK you need flash, etc. Take a look at a control like swfupload http://webdeveloperplus.com/jquery/multiple-file-upload-with-progress-bar-using-jquery/ | |
Re: > I need to loop over the first 5 arrays, then have another loop to output any remaining data greater than 5 If you elements, can't you just loop twice? Loop from 1-5, if there are enough elements <cfset firstLoopMax = Min(variables.albumEdit.albumCnt, 5)> <cfset lastShownIndex = 1> <cfloop from="1" to="#firstLoopMax#" … | |
Re: I'm not familiar with it, but the links here might help http://stackoverflow.com/questions/11175499/coldfusion-iis-pci-scan-servletexec-vunerability | |
Re: > And I get this error: > > Invalid parameter type. It's hard to follow all of that without seeing the values. Can you put together a small *concrete* example of the QoQ that's failing (with the values)? Btw, do you really have to use a QoQ? Couldn't you use … | |
Re: The 1st option should have a VALUE too, ie `<option value="0">Choose an order number</option>` But other than that it looks ok. 1) Is that the exact code used? 2) Maybe one of the query values is causing a problem. Do some debugging and ump the query values. Can you post … | |
Re: On what line does the error occur? I don't know the app, so I'm guessing based on what I see. "dtRan" appears to be the name of a column in a query. There are 2 queries in the code (cfspExportInfo and cfspExport). The error suggests one of them does not … | |
Re: > I am having problems with pagination using cfloop and the grouping of cfoutput Trying to combine cfloop start/endRow and a grouped output is just asking for pain. I honestly doubt it's possible. You either need to do *real* pagination ie only return x records in the query or drop … | |
Re: [QUOTE=;][/QUOTE] {Reaches for can of troll-spammer-be-gone} | |
Re: [QUOTE=;][/QUOTE] [quote]your code is very easy to hack and if you're using similar formed queries, I can do some dangerous things.[/quote] Sad there are still apps out there with this kind of unprotected code .. Makes you want to ask for the company web developer's credentials before doing business online. | |
Re: I don't see a stray characters. If it only happens with .cfm files, check your Application.cfm/cfc files. It runs every time you request a .cfm page. So it might be the culprit. | |
Re: [quote]That won't work. <cflocation> only works with relative paths[/quote] cflocation can redirect to an absolute url ie http://www.somesite.com, so I don't think that's the problem. | |
Re: [QUOTE=;][/QUOTE] Unfortunately I don't know how to decode UTF16. If it were a regular UTF8 string - or the values always had 2 leading zeroes - you could decode it like any 2 char hex string. Loop and grab every 4 characters. Use inputBaseN to get the ascii code, and … | |
Re: [QUOTE=;][/QUOTE] We need to see the INSERT code to hazard a guess. | |
Re: [QUOTE=;][/QUOTE] Sorry you're asking in the wrong zone. This is ColdFusion. ASP.net is next door ;-) [url]http://www.daniweb.com/web-development/aspnet/18[/url] | |
Re: [QUOTE=;][/QUOTE] [quote]My problem is when I try to select a Year, the models dont change based on that selection[/quote] If that's the desired result, your binds are backward. Year is bound to model. So when the year list changes when a model is selected, not the other way around. | |
Re: I haven't done anything like this. So I can't say whether there's a better option. But it certainly sounds doable from a technical standpoint. It's just a series of cfhttp posts and db queries on your end. What issues are you seeing? |