Is there a way to bypass the form Validation

I'm getting really upset with the Coldfusion built-in form validation for any HTML formfield ending by _date , _required, _time and so on...
My application proposes to the users to create some Properties for an object and later on to modify the values for all these properties.
I've got a piece of code building dynamically some form fields named just like the properties (by a simple cfloop on a DB query getting the property list).
And a registering page to records the new value in the DB.
But it crashes onto the classical "
Form entries are incomplete or invalid.
I can't control what the users set as property name (one of them was Checklist_required).
Is there any way to prevent this error by disabling this auto validation ?
(I'd like to avoid having to rename any field dynamically created and rename any forms variables before registering them on the DB : it's just NO WAY for me to rename the properties created by the users)

Fober1, that's not how it works.  It's pretty much the ultimate example of the disjoint between how HTML forms work and how the naive CFML Cfform / cfinput design wished they work.
When a request is being processed by the coldfusion server, it just looks at the list of FORM (POST) variable names (whether it came from cfform or not; URL/GET params are exempt), and for those with certain suffixes (_date, _required, etc.), and it assumes their existence is intended to request validation another field without that suffix.  It doesn't actually know or care whether form submission, nor the HTML rendered in the user's browser, actually came from "cfform" or "cfinput".   The composition of the request that comes in (when a user clicks on "submit", or a hacker uses any tool imaginable) is out of the server's hands.  The cfform code is not used during form submission processing, because the receiving template (the form action="this_one.cfm") doesn't even have to be the same template that has the cfform in it. There could be multiple conflicting cfforms directing users to request the same template on a single site, with or without the validation, even without considering what a whole other person might decide to send to your server.
The fact that it can work as intended for a typical user is irrelevant, because the purpose of validation is to deal with the atypical situation.  A malicious or merely mischievous user that wanted to circumvent the validation would simply modify a copy of the page to leave out the "validation request" fields.    For the developer to truly validate the input, additional code must be written, making the feature not only inadequate, but a complete waste of time.  There absolutely should be a way to disable it at worst; Ideally, it would be taken out of coldfusion completely.  It's not only useless, it's a security risk, wooing programmers to write code that doesn't do what they think it does.
The error message it gives isn't so great, either, and it's a pity that it can't show more than one validation message at a time, either.  If more than one input is invalid, you could end up going through one round after another of submit + back button.
edit: I forgot to add the other important reason that this feature should never have existed: It is a nuisance to everyone else who doesn't want to use it at all, too!  Those suffixes simply couldn't have been a worse choice, colliding with probably thousands of peoples' variable names.  Why not "*_cfval_date" "*_cfval_time" etc?

Similar Messages

  • I am trying to switch laptops with my mom, and successfully wiped mine and restored it, but now her password won't allow her into my computer, even though it says it's her account. Is there any way to bypass the password screen?

    I am trying to switch laptops with my mom, and successfully wiped mine and restored it, but now the password that she used on her computer isn't working on this computer. Is there any logical reason why the two passwords would be different, if I restored her information from a Time Machine backup? Aditionally, Is there a way to bypass the password page on startup to make a password that my mom knows?

    If Disk Warrior does not work you can try the following steps (but they may not work if the disk has a hardware error).
    Get the disk (DVD or CD) that came with the system (since you have it listed as 10.6.8).  If it is 10.7 or 10.8 use the Recovery partition to boot from or the USB installer if you have that option.
    Insert the disk then power down
    HOLDING the C key, power up to boot from the disc.
    Get to Disk Utility
    If Disk Utility will now show your hard drive, use DU to REPAIR the disk.
    When it completes the Repair process successfully as indicated in DU, do a shut down.  If Repair is not successful then an different course of action is indicated below.
    Then HOLDING THE APPLE (or Command key depending on your keyboard) KEY AND THE OPTION KEY AND THE LETTER P AND R KEYS, continue hiolding them until you hear the chime tone for the THIRD time then release all four keys.
    If REPAIR is not successful, use the Install disc as a boot and REINSTALL THE OS X OPERATING SYSTEM  DO NOT ERASE THE DISK OR VOLUME FIRST.  REPEAT DO NOT erase the disk or volume before trying to reinstall the OS X operating system.  After re-installing the OS do a software update.  Note that ERASING the disk is NOT required to do an OS re-install.  This allows your existing data and application files to remain.
    If that fails then you are down to the "bitter end" of erasing the volume and reinstalling the OS and then all the other software.
    If erasing the Volume fails then your last hope is to completely erase the entire hard drive, repartion the disk  and try a re-install.
    If that fasils then you may have a defective hard disk.

  • My computer keyboard has a bad "M" key so I cannot login into my computer from boot     is there a way to bypass the login to reset my macbook pro

    my computer keyboard has a bad "M" key so I cannot login into my computer from boot     is there a way to bypass the login to reset my macbook pro

    Late reply, but if anyone is experiencing the same problem, I've found a solution. For whatever reason, some macbooks don't recognize usb flash drives during the boot-up phase, even though the usb ports themselves are powered (I tested this with a multimeter). The solution then, was to use an external USB hard drive that has its own power supply to install Snow Leopard. I don't know why, but it's the only way I got my macbook (Macbook 2,1/A1181) to recognize the install drive. Every was smooth sailing from there!

  • If I backed up with a newer version of iOS than the phone I am trying to backup to.. Is there any way to bypass the setup assistant in order to download the new iOS on the new phone then go back and restore from my old phone?

    if I backed up with a newer version of iOS than the phone I am trying to backup to.. Is there any way to bypass the setup assistant in order to download the new iOS on the new phone then go back and restore from my old phone?

    Try deleting your last backup by turning off iCloud Backup in Settings>iCloud>Storage & Backup, then tap Manage Storage, swipe across your backup and tap Delete, then go back and turn iCloud Backup back on again.  If it still won't back up, you may have an app that is preventing the backup from succeeding.  To locate which one, go to Settings>iCloud>Storage & Backup>Manage Storage, tap the name of your device under Backups, under Backup Options tap Show All Apps, then turn them all to Off (including camera roll) and try backing up again.  If it succeeds, then the camera roll and/or one of your apps is preventing the backup and you'll have to located by process of elimination. Turn the camera roll On and try backing up again.  If it succeeds, turn some of your apps to On and try backing up again.  If it succeeds again, turn some more apps to On then try again; repeat this process until it fails.  Eventually you'll be able to locate the problem app and exclude it from your backup.

  • Is there a way to distribute the forms as HTML email?

    Is there a way to distribute the forms as HTML emails?
    Thanks,
    K

    The only thing I can think of is to leave the email as a draft and add a reminder  (using the "Reminders" app) to send it at a certain day and time.
    The other way would be to create a calendar event to which you attach an script that sends the email.

  • I have a macbook pro 10.6.8. My question is, is there a way to bypass the startup items (programs) when booting the computer?

    I perform music with my Macbook pro.  so I have several music applications that startup automatically when the computer boots. they look for the audio interface that they are supposed to talk to and then everything is good.  but sometimes I boot my computer when it is not connected to the audio interface and this breaks the conncetion link between the music applications and the audio interface.  If the is a way to bypass (turn off) the startup items as I boot the computer when it is not connected to the audio interface, then I'd no longer have this problem.  is there a way to do so?
    Burr

    Burr Johnson wrote:
    ...but sometimes I boot my computer when it is not connected to the audio interface and this breaks the conncetion link between the music applications and the audio interface.
    This is a third party software problem you need to contact the developer to fix, perhaps they already have a update and you need to apply it.
    Nothing should "break" if it's not connected to hardware as with portables people are always connecting and disconnecting.
    If it's breaking the connection between two other pieces of software then it's poorly designed.
    Some hardware + software combinations are meant for pernament desktop installations as a integrated system, not for portables.
    The only case I can think of that software won't work without the hardware attached if the hardware is a form of content protection, that it won't run without the dongle etc., attached.

  • Is there a way to make the Form Wizard group things in the order I want it to?

    I am creating a multi-page checklist. Each question has a radio button with the possible answers of yes, no or n/a. When I run the Form Wizard, it detects the boxes I created, in Word using the Developer, but it puts all the yes's in a group, all the no's in a group and leaves the n/a's out. Is there a way to make it so when the Form Wizard creates the radio buttons, it puts a yes, no and n/a in one group? I don't want to have to create a sepearte group for each question. These checklists are long and there are hundreds of questions.

    The auto field detection feature is designed to look for Yes/No text labels next to each radio button group -- not specifically n/a. Do you have a group label to the left or above each group? This is how each group is determined -- if it's not there they'll default to check boxes. For more detail on how the auto field detection feature works, check out the tutorial Designing Forms for auto field detection. Also, there were a few improvements in the 9.2 release, so make sure you're using this point release or later.

  • Is there a way to export the form data directly in mysql or using php

    Hi,
    I am using Acrobat XI to collect form data and export it as csv/ xml, then I need to import it manually to mysql. Just wondering if there is any way to automate this process so I can just select/ upload the form file and data can be imported to mysql database. I know some php also and tried finding any script but not yet found. So if there is any php script to extract the data from filled form that would also work for me.
    Any help would be appreciated.
    Thanks

    The ADBC, Acrobat Data Base Connection, has been removed from Acrobat starting with version 8.
    LiveCycle created forms support database connectivity.
    See can adobe acrobat pro connect to the sql database? (JavaScript)

  • Is there a way to bypass the first two inspection block after first cycle in Vision builder AI?

    I want to inspect the C-C of a matrix of holes (holes side by side). But when I do re-cycle the routine, the hole #'s change location (not in same place twice) and the my C-C are all not side by side and all over the place. For example, diaganal 4 holes away, etc...

    laj,
    I'm not sure that I completely understand the question that you are asking in your post. You may want to repost your question with some additional information and explanation to allow this forum to help you more effectively.
    As for the question that you posed in the title of your email, can you bypass the first two steps of your Vision Builder for Automated Inspection (VBAI) script? The answer is unfortunately no. VBAI is designed to repeatedly run through the same script and does not allow only a portion of the script to run.
    If you need more control over your application than VBAI can provide, you may need to move a programming language like LabVIEW, which will allow for lower level decision making.
    Please post a follow up if you have any additio
    nal information you would like to add, or have additional questions.
    Regards,
    Jed R.
    Applications Engineer
    National Instruments

  • Is there any way to bypass the

    wheels in the calendar and just enter date and time from the keyboard?  I find getting the wheels to stop accurately to be nearly impossible, rendering the calendar a major annoyance.

    Afraid not.
    Now if you have access to another calendar, for example, if you have outlook on your computer, you can make the appointment there then e-mail it to yourself and import it into the calendar app and the app will display your appointment.
    Is it faster than the date wheels? Dunno. just another way to do it.
    Another way would be to look for another app.

  • Is there a way to make the form automatically calculate datas?

    Hello,
    I am very new to this, are there any forms which - as the user enter datas - will automatically calculate costs?
    Many thanks,
    D

    Hi,
    Unfortunately, it is not possible to perform calculations in Adobe FormsCentral.
    If you want to distribute forms with calculative fields, you may use one of the following Adobe products:-
    Adobe Acrobat:- PDF creator, edit PDF | Adobe Acrobat XI
    Adobe EchoSign:- Electronic Signature Software, Digital Signatures | Adobe EchoSign
    Regards,
    Nakul

  • Is there a way to make fillable forms iPad aware?

    I'm creating fillable forms, in Adobe Acrobat Pro 9, for medical professionals who are having their patients fill them out on iPads using the PDF Expert app. Is there a way to make the forms iPad aware?
    For example, when you enter an event in your iPad or iPhone calander there's that wheel where you can choose the date. I want that wheel to show up when patients are filling out a date on their forms.
    I know that you can alter the PDF form to extend to Reader so is there a way to do something similar with PDF Expert? Or is that not a possiblity yet?

    There are a number of apps for the iPad/iPhone/eReaders/tablets that can process Acrobat forms but not LiveCycle Desiger forms. Adobe has Adobe Reader X for mobile.
    There are links for develpers on that page.
    Have you tried contacting the PDF Expert developers?

  • Is there a way to bypass user login as its not being recognised

    I have disabled automatic login and now I can't login as it does not like the username an or password, is there a way to bypass the user login, please help ASAP

    http://osxdaily.com/2011/08/24/reset-mac-os-x-10-7-lion-password/

  • Is there a way to bypass activity type/ cost element for CJ20n Activity?

    Hi Experts,
    Is there a way to bypass the activity type set in the Internal tab of a particular activity in CJ20n?
    Here's a background of the scenario:.
    - In CJ20n, under WBS element 100->Network 10->Activity 1, under the internal tab, the activity type set up is ACT1
    - Under person assignment, I have 2 resources assigned Person 1 and Person 2, with the following values:
      Person 1          Work: 1.0h Dur. 10D
      Person 2          Work: 2.0h Dur. 15D
    - In infotype 135, person 1 has a cost element set as ACT2 and person 2 has a cost element ACT3.
    - The problem is that when you bring up the Plan/ Actual comparision report (ctrl+F11 in CJ20n), the costs are consolidated for ACT1 and negates the cost elements for Person 1 and Person 2
    Is there a way to bypass this and use the individual cost elements set up for person 1 and person 2?

    I dont think this is possible for the scenario that you explained. I mean, you have a single activity which has 2 resources assigned and each of these resources has a different activity type. Standard SAP allows only 1 activity type for an activity.
    Just a query, why dont you create 2 different activities for these resources since the activity types are diff for both?

  • Is there a way to change the LUt extension form .CUBE to .cube. on export. TX

    Is there a way to change the LUt extension form .CUBE to .cube. on export with this script in photoshop For MAC:
    Chris Cox wrote:
    The file extensions are written by the export plugin.  (which incidentally has a comment that two studios wanted all caps extensions, but I failed to write down which ones in the comments)
    To change the filenames, you'd want to add something at the end of doExportLUTs() that uses the supplied path and substitutes the desired extensions, then renames the file.
    Thank you
    // Export Color Lookup Tables automation in JavaScript
    // IN_PROGRESS - why can't ColorSync Utility open any profile with a grid of 160 or larger?
    // 150 works, 160 fails -- sent samples in email to Apple on Nov 8, 2013; they are investigating
    // DEFERRED - right to left filenames (Arabic) come out wrong because of appending "RGB" and file extensions
    // This seems to be a bug in JavaScript's handing of strings, not sure we can solve it easily.
    // It might possibly be handled by checking bidi markers in UTF8 stream and adding custom handling for appending text/extensions.
    @@@BUILDINFO@@@ ExportColorLookupTables.jsx 1.0.0.0
    // BEGIN__HARVEST_EXCEPTION_ZSTRING
    <javascriptresource>
    <name>$$$/JavaScripts/ExportColorLookupTables/Menu=Color Lookup Tables...</name>
    <menu>export</menu>
    <enableinfo>true</enableinfo>
    <eventid>9AA9D7D6-C209-494A-CC01-4E7D926DA642</eventid>
    </javascriptresource>
    // END__HARVEST_EXCEPTION_ZSTRING
    #target photoshop
    const appUIState = app.displayDialogs;
    app.displayDialogs = DialogModes.NO; // suppress all app dialogs
    app.bringToFront(); // make Photoshop the frontmost app, just in case
    // on localized builds we pull the $$$/Strings from a .dat file
    $.localize = true;
    // from Terminology.jsx
    const classApplication = app.charIDToTypeID('capp');
    const classProperty = app.charIDToTypeID('Prpr');
    const enumTarget = app.charIDToTypeID('Trgt');
    const eventGet = app.charIDToTypeID('getd');
    const eventSet = app.charIDToTypeID('setd');
    const kcolorSettingsStr = app.stringIDToTypeID("colorSettings");
    const kDither = app.charIDToTypeID('Dthr');
    const keyTo = app.charIDToTypeID('T   ');
    const typeNULL = app.charIDToTypeID('null');
    const typeOrdinal = app.charIDToTypeID('Ordn');
    const kFloatWindowStr = app.stringIDToTypeID("floatWindow");
    const typePurgeItem = app.charIDToTypeID('PrgI');
    const enumClipboard = app.charIDToTypeID('Clpb');
    const eventPurge = app.charIDToTypeID('Prge');
    const keyExportLUT = app.charIDToTypeID( "lut " );
    const keyFilePath = app.charIDToTypeID( 'fpth' );
    const keyDescription = app.charIDToTypeID( 'dscr' );
    const keyCopyright = app.charIDToTypeID( 'Cpyr' );
    const keyDataPoints = app.charIDToTypeID( 'gPts' );
    const keyWriteICC = app.charIDToTypeID( 'wICC' );
    const keyWrite3DL = app.charIDToTypeID( 'w3DL' );
    const keyWriteCUBE = app.charIDToTypeID( 'wCUB' );
    const keyWriteCSP = app.charIDToTypeID( 'wCSP' );
    const kScriptOptionsKey = "9AA9D7D6-C209-494A-CC01-4E7D926DA642"; // same as eventID above
    const sGridMin = 7; // these must match the slider range defined in the dialog layout
    const sGridMax = 256;
    const sGridDefault = 32;
    // our baseline UI configuration info
    var gSaveFilePath = ""; // overwritten by document path
    var gDescription = ""; // overwritten by document name
    var gCopyright = ""; // "Adobe Systems Inc., All Rights Reserved";
    var gGridPoints = sGridDefault;
    var gDoSaveICCProfile = true;
    var gDoSave3DL = true;
    var gDoSaveCUBE = true;
    var gDoSaveCSP = true;
    gScriptResult = undefined;
    // start doing the work...
    main();
    app.displayDialogs = appUIState; // restore original dialog state
    gScriptResult; // must be the last thing - this is returned as the result of the script
    function readOptionsFromDescriptor( d )
      if (!d)
      return;
      if (d.hasKey(keyFilePath))
      gSaveFilePath = d.getString( keyFilePath ); // will be overridden by UI
      if (d.hasKey(keyDescription))
      gDescription = d.getString( keyDescription ); // will be overridden always
      if (d.hasKey(keyCopyright))
      gCopyright = d.getString( keyCopyright );
      if (d.hasKey(keyDataPoints))
      var temp = d.getInteger( keyDataPoints );
      if (temp >= sGridMin && temp <= sGridMax)
      gGridPoints = temp;
      if (d.hasKey(keyWriteICC))
      gDoSaveICCProfile = d.getBoolean( keyWriteICC );
      if (d.hasKey(keyWrite3DL))
      gDoSave3DL = d.getBoolean( keyWrite3DL );
      if (d.hasKey(keyWriteCUBE))
      gDoSaveCUBE = d.getBoolean( keyWriteCUBE );
      if (d.hasKey(keyWriteCSP))
      gDoSaveCSP = d.getBoolean( keyWriteCSP );
    function createDescriptorFromOptions()
      var desc = new ActionDescriptor();
      desc.putString( keyFilePath, gSaveFilePath ); // will be overridden by UI
      desc.putString( keyDescription, gDescription ); // will always be overridden by document name
      desc.putString( keyCopyright, gCopyright );
      desc.putInteger( keyDataPoints, gGridPoints );
      desc.putBoolean( keyWriteICC, gDoSaveICCProfile );
      desc.putBoolean( keyWrite3DL, gDoSave3DL );
      desc.putBoolean( keyWriteCUBE, gDoSaveCUBE );
      desc.putBoolean( keyWriteCSP, gDoSaveCSP );
      return desc;
    function doExportUI()
      // DEFERRED - it might be nice to be able to run without UI
      //  Right now we can't, but someone could modify the script if they so desire
      const sDescription = localize("$$$/AdobeScript/Export3DLUT/Description=Description:");
      const sCopyright = localize("$$$/AdobeScript/Export3DLUT/Copyright=Copyright:");
      const sQuality = localize("$$$/AdobeScript/Export3DLUT/Quality=Quality");
      const sGridPoints = localize("$$$/AdobeScript/Export3DLUT/GridPoints=Grid Points:");
      const sFormatsToSave = localize("$$$/AdobeScript/Export3DLUT/Formats=Formats");
      const sOpenButton = localize("$$$/JavaScripts/psx/OK=OK");
      const sCancelButton = localize("$$$/JavaScripts/psx/Cancel=Cancel");
      const strTextInvalidType = localize("$$$/JavaScripts/Export3DLUT/InvalidType=Invalid numeric value. Default value inserted.");
      const strTextInvalidNum = localize("$$$/JavaScripts/Export3DLUT/InvalidNum=A number between 7 and 256 is required. Closest value inserted.");
      const strNoExportsSelected = localize("$$$/JavaScripts/Export3DLUT/NoExportTypesSelected=No export types were selected.");
      const strExportPrompt = localize("$$$/JavaScripts/Export3DLUT/ExportColorLookup=Export Color Lookup");
      const strUntitledLUT = localize("$$$/JavaScripts/Export3DLUT/UntitledLUTFilename=untitled.lut");
      const sSaveICC = localize("$$$/AdobeScript/Export3DLUT/ICCProfile=ICC Profile");
      // these are not localized, since they refer to file format extensions
      const sSave3DL = "3DL";
      const sSaveCUBE = "CUBE";
      const sSaveCSP = "CSP";
      // strings similar to JPEG quality
      const sPoor = localize("$$$/AdobeScript/Export3DLUT/Poor=Poor");
      const sLow = localize("$$$/AdobeScript/Export3DLUT/Low=Low");
      const sMedium = localize("$$$/AdobeScript/Export3DLUT/Medium=Medium");
      const sHigh = localize("$$$/AdobeScript/Export3DLUT/High=High");
      const sMaximum = localize("$$$/AdobeScript/Export3DLUT/Maximum=Maximum");
      const ui = // dialog resource object
      "dialog { \
      orientation: 'row', \
      gp: Group { \
      orientation: 'column', alignment: 'fill', alignChildren: 'fill', \
      description: Group { \
      orientation: 'row', alignment: 'fill', alignChildren: 'fill', \
      st: StaticText { text:'Description:' }, \
      et: EditText { characters: 30, properties:{multiline:false}, text:'<your description here>' } \
      copyright: Group { \
      orientation: 'row', alignment: 'fill', alignChildren: 'fill', \
      st: StaticText { text:'Copyright:' }, \
      et: EditText { characters: 30, properties:{multiline:false}, text:'<your copyright here>' } \
      qual: Panel { \
      text: 'Quality', \
      orientation: 'column', alignment: 'fill', alignChildren: 'fill', \
      g2: Group { \
      st: StaticText { text:'Grid Points:' }, \
      et: EditText { characters:4, justify:'right' } \
      drp: DropDownList {alignment:'right'} \
      sl: Slider { minvalue:7, maxvalue:256, value: 32 }, \
      options: Panel { \
      text: 'Formats', \
      orientation: 'column', alignment: 'fill', alignChildren: 'left', \
      ck3DL: Checkbox { text:'3DL', value:true }, \
      ckCUBE: Checkbox { text:'CUBE', value:true } \
      ckCSP: Checkbox { text:'CSP', value:true } \
      ckICC: Checkbox { text:'ICC Profile', value:true } \
      gButtons: Group { \
      orientation: 'column', alignment: 'top', alignChildren: 'fill', \
      okBtn: Button { text:'Ok', properties:{name:'ok'} }, \
      cancelBtn: Button { text:'Cancel', properties:{name:'cancel'} } \
      const titleStr = localize("$$$/AdobeScript/Export3DLUT/DialogTitle/ExportColorLookupTables=Export Color Lookup Tables");
      var win = new Window (ui, titleStr ); // new window object with UI resource
        // THEORETICALLY match our dialog background color to the host application
        win.graphics.backgroundColor = win.graphics.newBrush (win.graphics.BrushType.THEME_COLOR, "appDialogBackground");
      // poor, low, medium, high, max
      var MenuQualityToGridPoints = [ 8, 16, 32, 64, 256 ];
      function GridPointsToQualityMenuIndex( num )
      var menu = MenuQualityToGridPoints;
      var menuItems = menu.length;
      if (num <= menu[0])
      return 0;
      if (num >= menu[ menuItems-1 ])
      return (menuItems-1);
      for (var i = 0; i < (menuItems-1); ++i)
      if ((num >= menu[i]) && (num < menu[i+1]))
      return i;
      return 0; // just in case of a logic failure
      // insert our localized strings
      var drop = win.gp.qual.g2.drp; // for easier typing
      drop.add('item', sPoor ); // 0
      drop.add('item', sLow ); // 1
      drop.add('item', sMedium ); // 2
      drop.add('item', sHigh ); // 3
      drop.add('item', sMaximum ); // 4
      drop.selection = drop.items[2]; // Medium
      win.gp.description.st.text = sDescription;
      win.gp.copyright.st.text = sCopyright;
      win.gp.qual.text = sQuality;
      win.gp.qual.g2.st.text = sGridPoints;
      win.gp.options.text = sFormatsToSave;
      win.gp.options.ck3DL.text = sSave3DL;
      win.gp.options.ckCUBE.text = sSaveCUBE;
      win.gp.options.ckCSP.text = sSaveCSP;
      win.gp.options.ckICC.text = sSaveICC;
      win.gButtons.okBtn.text = sOpenButton;
      win.gButtons.cancelBtn.text = sCancelButton;
      // set starting parameters
      win.gp.description.et.text = gDescription;
      win.gp.copyright.et.text = gCopyright;
      win.gp.options.ckICC.value = gDoSaveICCProfile;
      win.gp.options.ck3DL.value = gDoSave3DL;
      win.gp.options.ckCUBE.value = gDoSaveCUBE;
      win.gp.options.ckCSP.value = gDoSaveCSP;
      // global flag/hack to keep the UI pretty
      var gGlobalPreventChanges = false;
      with (win.gp.qual)
      sl.value = gGridPoints;
      g2.et.text = gGridPoints;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(gGridPoints) ];
      // global flag is ugly, but recursive change calls are uglier
      g2.et.onChange = function () {  if (gGlobalPreventChanges) { return; }
      gGlobalPreventChanges = true;
      var val = Number(this.text);
      this.parent.parent.sl.value = val;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(val) ];
      gGlobalPreventChanges = false; };
      sl.onChanging = function () {   if (gGlobalPreventChanges) { return; }
      gGlobalPreventChanges = true;
      var val = Math.floor(this.value);
      this.parent.g2.et.text = val;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(val) ];
      gGlobalPreventChanges = false; };
      // DEFERRED - we should also set the value if the same menu item is selected again (reset)
      // but the JSX toolkit doesn't support that
      drop.onChange = function()
      if (gGlobalPreventChanges) { return; }
      gGlobalPreventChanges = true;
      var theSelection = this.selection.text;
      if (theSelection != null) { // only change if selection made
      var theSelectionIndex = this.selection.index;
      var newGridPoints = MenuQualityToGridPoints[ theSelectionIndex ];
      win.gp.qual.g2.et.text = newGridPoints;
      win.gp.qual.sl.value = newGridPoints;
      gGlobalPreventChanges = false;
      win.onShow = function ()
      this.qual.sl.size.width = 128;
      this.layout.layout(true);
      win.gButtons.cancelBtn.onClick = function () { this.window.close(2); };
      // validate inputs when the user hits OK
        var gInAlert = false;
      win.gButtons.okBtn.onClick = function ()
      if (gInAlert == true)
      gInAlert = false;
      return;
      var gridText = win.gp.qual.g2.et.text;
      var w = Number(gridText);
      var inputErr = false;
      if ( isNaN( w ) )
      if ( DialogModes.NO != app.playbackDisplayDialogs )
      gInAlert = true;
      alert( strTextInvalidType );
      gInAlert = false;
      win.gp.qual.g2.et.text = sGridDefault;
      win.gp.qual.sl.value = sGridDefault;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(sGridDefault) ];
      return false;
      if ( (w < sGridMin) || (w > sGridMax) )
      if ( DialogModes.NO != app.playbackDisplayDialogs )
      gInAlert = true;
      alert( strTextInvalidNum );
      gInAlert = false;
      if ( w < sGridMin)
      inputErr = true;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(sGridMin) ];
      win.gp.qual.g2.et.text = sGridMin;
      win.gp.qual.sl.value = sGridMin;
      return false;
      if ( w > sGridMax)
      inputErr = true;
      drop.selection = drop.items[ GridPointsToQualityMenuIndex(sGridMax) ];
      win.gp.qual.g2.et.text = sGridMax;
      win.gp.qual.sl.value = sGridMax;
      return false;
      if (inputErr == false)
      win.close(true);
      return;
      win.center(); // move to center the dialog
      var ret = win.show();  // dialog display
      if (2 == ret)
      return false; // user cancelled
      // user hit OK, copy values from dialog
      gDescription = win.gp.description.et.text;
      gCopyright = win.gp.copyright.et.text;
      gGridPoints = win.gp.qual.sl.value;
      gDoSave3DL = win.gp.options.ck3DL.value;
      gDoSaveCUBE = win.gp.options.ckCUBE.value;
      gDoSaveCSP = win.gp.options.ckCSP.value;
      gDoSaveICCProfile = win.gp.options.ckICC.value;
      // if no files are going to be saved, then we have zero work to do
      if ((false == gDoSaveICCProfile) && (false == gDoSave3DL) &&
      (false == gDoSaveCUBE) && (false == gDoSaveCSP) )
      // tell the user that no formats were selected
      alert( strNoExportsSelected );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return false;
      // prompt user for directory and output base filename
      // default to directory and filename of current document
      var currentDocumentPath
      try
      // if the file has no path (not saved), then this throws
      var documentPath = app.activeDocument.fullName.fsName; // Get the OS friendly file path and name
      documentPath = documentPath.replace(/\....$/,''); // remove extension, if there is one
      documentPath = documentPath + ".lut"; // add dummy extension
      currentDocumentPath = File ( documentPath );
      catch (e)
      // if there was no document path, default to user's home directory
      var defaultName = "~/" + strUntitledLUT;
      currentDocumentPath = File(defaultName);
      var fname = currentDocumentPath.saveDlg(strExportPrompt);
      if (fname == null)
      return false;
      gSaveFilePath = fname.fsName;
      return true;
    function doExportLUTs( path )
      const keyUsing     = charIDToTypeID( 'Usng' );
      const eventExport = charIDToTypeID( 'Expr' );
      var desc = new ActionDescriptor();
      var desc2 = new ActionDescriptor();
      desc2.putString( keyFilePath, path );
      desc2.putString( keyDescription, gDescription );
      desc2.putInteger( keyDataPoints, gGridPoints );
      // assemble the full copyright string, if needed
      var copyrightAssembled = gCopyright;
      if (gCopyright != "")
      var theDate = new Date();
      // the year is from 1900 ????
      var theYear = (theDate.getYear() + 1900).toString();
      // Localization team says to just use the year
      var dateString = theYear;
      copyrightAssembled = localize("$$$/JavaScripts/Export3DLUT/Copyright=(C) Copyright ") + dateString + " " + gCopyright;
      desc2.putString( keyCopyright, copyrightAssembled );
      // select output format
      desc2.putBoolean( keyWriteICC, gDoSaveICCProfile );
      desc2.putBoolean( keyWrite3DL, gDoSave3DL );
      desc2.putBoolean( keyWriteCUBE, gDoSaveCUBE );
      desc2.putBoolean( keyWriteCSP, gDoSaveCSP );
        desc.putObject( keyUsing, keyExportLUT, desc2 );
      try
      var resultDesc = executeAction( eventExport, desc, DialogModes.NO );
      catch (e)
      if ( e.number != 8007 ) { // don't report error on user cancel
      var str = localize("$$$/JavaScripts/Export3DLUT/ExportLUTFailed=Unable to run the Export Color Lookup plugin because ");
      alert( str + e + " : " + e.line );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return false;
      return true;
    function doRenderGrid( points )
      // call the grid rendering plugin to do the work
        const keyRenderGrid = charIDToTypeID( "3grd" );
      const keyDataPoints2 = charIDToTypeID( 'grdP' );
      var args = new ActionDescriptor();
        args.putInteger( keyDataPoints2, points);
      try
      var result = executeAction( keyRenderGrid, args, DialogModes.NO );
      catch (e)
      if ( e.number != 8007 ) { // don't report error on user cancel
      var str = localize("$$$/JavaScripts/Export3DLUT/RenderGridFailed=Unable to render color grid because ");
      alert( str + e + " : " + e.line );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return false;
      return true;
    function resizeDocumentInPixels( width, height )
      var myDocument = app.activeDocument;
      var originalRulerUnits = app.preferences.rulerUnits;
      app.preferences.rulerUnits = Units.PIXELS;
      myDocument.resizeCanvas( width, height, AnchorPosition.MIDDLECENTER)
      app.preferences.rulerUnits = originalRulerUnits;
    function GetColorSettings()
      var desc1 = new ActionDescriptor();
      var ref1 = new ActionReference();
      ref1.putProperty( classProperty, kcolorSettingsStr );
      ref1.putEnumerated( classApplication, typeOrdinal, enumTarget );
      desc1.putReference( typeNULL, ref1 );
      var result = executeAction( eventGet, desc1, DialogModes.NO );
      var desc2 = result.getObjectValue( kcolorSettingsStr );
      return desc2;
    function GetColorConversionDitherState()
      var settings = GetColorSettings();
      if (settings.hasKey(kDither))
      return settings.getBoolean( kDither );
      else
      return null;
    function ConvertTo16Bit()
      const eventConvertMode = charIDToTypeID( 'CnvM' );
      const keyDepth = charIDToTypeID( 'Dpth' );
      var modeDesc16Bit = new ActionDescriptor();
      modeDesc16Bit.putInteger( keyDepth, 16 );
      var result = executeAction( eventConvertMode, modeDesc16Bit, DialogModes.NO );
    // state = true or false
    function SetColorConversionDither( state )
      var desc1 = new ActionDescriptor();
      var ref1 = new ActionReference();
      ref1.putProperty( classProperty, kcolorSettingsStr );
      ref1.putEnumerated( classApplication, typeOrdinal, enumTarget );
      desc1.putReference( typeNULL, ref1 );
      var desc2 = new ActionDescriptor();
      desc2.putBoolean( kDither, state );
      desc1.putObject( keyTo, kcolorSettingsStr, desc2 );
      executeAction( eventSet, desc1, DialogModes.NO );
    function PurgeClipboard()
      var desc1 = new ActionDescriptor();
      desc1.putEnumerated( typeNULL, typePurgeItem, enumClipboard );
      var result = executeAction( eventPurge, desc1, DialogModes.NO );
    // This helps us avoid resizing existing document views in tabbed document mode.
    // This is new functionality, and will not work in older Photoshop versions.
    function MoveDocumentToNewWindow()
      var desc1 = new ActionDescriptor();
      var result = executeAction( kFloatWindowStr, desc1, DialogModes.NO );
    function main()
      try
      var tempDoc = null;
      var tempDoc2 = null;
      // do basic troubleshooting first
      // make sure there is a document
      if (!app.activeDocument)
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // check the document mode
      var mode = app.activeDocument.mode;
      if (mode != DocumentMode.RGB
      && mode != DocumentMode.LAB
      && mode != DocumentMode.CMYK)
      var str = localize("$$$/JavaScripts/Export3DLUT/UnsupportedColorMode=Could not export Color Lookup Tables because only RGB, LAB, and CMYK color modes are supported.");
      alert(str);
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // check the document depth, for safety
      var depth = app.activeDocument.bitsPerChannel; // an object, not a number - why? I have no idea...
      var bitsPerChannel = 1;
      if (depth == BitsPerChannelType.EIGHT)
      bitsPerChannel = 8;
      else if (depth == BitsPerChannelType.SIXTEEN)
      bitsPerChannel = 16;
      else if (depth == BitsPerChannelType.THIRTYTWO)
      bitsPerChannel = 32;
      else
      var str = localize("$$$/JavaScripts/Export3DLUT/UnsupportedImageDepth=Could not export Color Lookup Tables because only 8, 16, and 32 bits/channel are supported.");
      alert(str);
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // Check layer types: background plus adjustments only
      // For now, don't check each layer - a multiply solid layer still works as a color adjustment, as does selective blending
      // Users will get odd results from other layer types (layer masks, pixel layers, etc.)
      try
      app.activeDocument.backgroundLayer.visible = true;
      catch (e)
      if (activeDocument.layers.length == 1)
      alert( localize("$$$/JavaScripts/Export3DLUT/NoAdjustmentLayers=Could not export Color Lookup Tables because this document has no adjustment layers.") );
      else
      alert( localize("$$$/JavaScripts/Export3DLUT/NoBackground=Could not export Color Lookup Tables because this document has no background.") );
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // look for last used params via Photoshop registry, getCustomOptions will throw if none exist
      try
      var desc = app.getCustomOptions(kScriptOptionsKey);
      readOptionsFromDescriptor( desc );
      catch(e)
      // it's ok if we don't have any existing options, continue with defaults
      // set some values from the document
      gDescription = app.activeDocument.name;
      // ask the user for options, bail if they cancel at any point
      if ( doExportUI() == false)
        gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      return;
      // we're good to go, so save our parameters for next time
      app.putCustomOptions(kScriptOptionsKey, createDescriptorFromOptions() );
      // remove file extension from filePath, if there is one
      gSaveFilePath = gSaveFilePath.replace(/\....$/,'');
      // calculate the size of image we need
      var width = gGridPoints * gGridPoints;
      var height = gGridPoints;
      if (mode == DocumentMode.CMYK)
      height = gGridPoints*gGridPoints;
      // duplicate the user document so we don't mess it up in any way
      tempDoc = app.activeDocument.duplicate("temporary");
      // make the temporary document active
      app.activeDocument.name = tempDoc;
      // to avoid resizing existing document views in tabbed mode
      MoveDocumentToNewWindow();
      // convert 8 bit documents to 16 bit/channel for improved quality of merged adjustments
      if (bitsPerChannel == 8)
      ConvertTo16Bit();
      depth = BitsPerChannelType.SIXTEEN;
      // resize the temporary canvas to our target size
      resizeDocumentInPixels( width, height )
      // select background layer
      tempDoc.activeLayer = tempDoc.backgroundLayer;
      // render lookup base grid
      var worked = doRenderGrid( gGridPoints );
      if (worked != true)
      tempDoc.close( SaveOptions.DONOTSAVECHANGES );
      return; // error should have already been shown, and there is not much we can do
      // do not flatten here -- the export automatically gets flattened data
      // and we may need layers for LAB->RGB conversion below
      // export the chosen formats
      worked = doExportLUTs( gSaveFilePath );
      if (worked != true)
      tempDoc.close( SaveOptions.DONOTSAVECHANGES );
      return; // error should have already been shown, and there is not much we can do
      // for LAB documents to export 3DLUT (which are inherently RGB), we have to do additional work
      // As a bonus, this works for CMYK as well!
      if ( mode != DocumentMode.RGB )
      var filePath = gSaveFilePath + "RGB";
      var oldDitherState = GetColorConversionDitherState();
      try
      SetColorConversionDither(false);
      const targetProfileName = "sRGB IEC61966-2.1";
      // new document temp2 in sRGB, matching depth of original
      var originalRulerUnits = app.preferences.rulerUnits;
      app.preferences.rulerUnits = Units.PIXELS;
      tempDoc2 = app.documents.add( width, gGridPoints, 72, "temp2",
      NewDocumentMode.RGB, DocumentFill.WHITE,
      1.0, depth, targetProfileName );
      app.preferences.rulerUnits = originalRulerUnits;
      // make the new doc active
      app.activeDocument.name = tempDoc2;
      // to avoid resizing existing document views in tabbed mode
      MoveDocumentToNewWindow();
      // insert grid
      worked = doRenderGrid( gGridPoints );
      if (worked == true)
      tempDoc2.selection.selectAll();
      tempDoc2.activeLayer = tempDoc2.backgroundLayer;
      tempDoc2.selection.copy();
      tempDoc2.close( SaveOptions.DONOTSAVECHANGES );
      tempDoc2 = null;
      // make sure temp1 is active
      app.activeDocument.name = tempDoc;
      // resize for RGB grid
      resizeDocumentInPixels( width, gGridPoints );
      tempDoc.selection.selectAll();
      tempDoc.paste(true);
      PurgeClipboard(); // so we don't leave an odd, large item on the clipboard
      tempDoc.selection.deselect();
      tempDoc.flatten();
      // convert temp1 to sRGB
      tempDoc.convertProfile( targetProfileName, Intent.RELATIVECOLORIMETRIC, true, false );
      // export the chosen formats
      worked = doExportLUTs( filePath );
      // at this point we still have to clean up, even if the call failed, so fall through
      else
      tempDoc2.close( SaveOptions.DONOTSAVECHANGES );
      catch (e)
      if ( e.number != 8007 ) { // don't report error on user cancel
      var str = localize("$$$/JavaScripts/Export3DLUT/UnableToConvertRGB=Unable to convert image to RGB because ");
      alert( str + e + " : " + e.line );
      if (tempDoc2 != null) tempDoc2.close( SaveOptions.DONOTSAVECHANGES );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
      // always reset the dither state
      SetColorConversionDither( oldDitherState );
      PurgeClipboard(); // so we don't leave an odd, large item on the clipboard
      } // if not RGB
      // always close temp document without saving
      tempDoc.close( SaveOptions.DONOTSAVECHANGES );
      catch (e)
      if ( e.number != 8007 ) { // don't report error on user cancel
      var str = localize("$$$/JavaScripts/Export3DLUT/UnableToExport=Unable to export LUT because ");
      alert( str + e + " : " + e.line );
      // always close temp document without saving
      if (tempDoc != null) tempDoc.close( SaveOptions.DONOTSAVECHANGES );
      gScriptResult = 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script

    Hi blabla12345,
    (untested and without warranty)
    replace this line:
    const sSaveCUBE = "CUBE";
    with this:
    const sSaveCUBE = "cube";
    Have fun

Maybe you are looking for

  • KEEP GETTING FOLLOWING MESSAGE Could not initialize the application's security component.

    everytime click on firefox icon to use browser message box appears Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has n

  • Cannot display a named part of a HTML page

    Hallo, I want to display a named part of a HTML page in a JEditorFrame. I have index.html and a part of it is named with <a name="label1"> My Java code looks as follows      url = this.getClass().getResource("/Res/index.html#label1");However, I get n

  • Publish doesn't match preview

    My .fla looks great. The preview .swf looks even better. When I publish, the .swf file is all messed up...transitions don't happen, text is missing.... BUT, strangely enough, a mac Projector works fine! What's going on?

  • Moving images from LR 4 to Photoshop CS 6

    I cannot move my images from lightroom 4 to photoshop cs5.Iam using a Nikon D600.Other images shot on other camers I can move.

  • Macbook is acting very very slow.....

    Not long ago I noticed that my Macbook was prone to acting slowly from time to time, which seemed to be okay until a couple of days ago when the whole system bogged down entirely. After managing to restart my system, by pushing the power button until