Script/validation question

I have a form with fields called mileage and time, if the person filling in the form misses the field time, and enters a number into the field time, I want a message to pop up saying they need to first enter their mileage (up to 100.0).
I know how to check for the range and make the totals equal no more than the allowed maximums, but I don't know how to make one field dependant on another field.
Suggestions?
Thanks.

Thankyou, that works very well. So now I have tried the same script on another field, like this -
if (NumericField1.rawValue>3 || NumericField3.rawValue>2 || NumericField5.rawValue>100) {
false;
} else {
true;
My intent is to have a field that is optional to begin with become required if any of those 3 fields above have a number greater than the ones shown above. Just for sh#@% & giggles I tried with true; and false; reversed.
But once again, get no response, like it is just ignored (in Preview). I did open Acrobat Pro and check the Preferences/Javascript section, checked the boxes for all the debugger stuff. When I open the doc in Acrobat it gives no errors.

Similar Messages

  • I keep getting error messages that a script "may have stoped responding", The script in question is "contentAreaUtils.js".

    I just updated to FireFox v3.6.8, after using v3.5 successfully for many months. With the new version I keep getting error messages that a script "may have stopped responding", The script in question is "contentAreaUtils.js". My OS is Win2k SP4, with 253,424 KB RAM.
    Is there a known fix. If not, is there an easy way to revert to FireFox v3.5 ?

    Attached is an image of the error message.

  • Requesting guidance on how best to deal with removal of CreateElementSteps for tables when option to 'script validation for new constraints' is enabled during schema compare

    I have a DeploymentPlanModifer subclass that is responsible for removing certain tables from a deployment plan under specific conditions. It is relatively trivial to find the
    CreateElementSteps I need and subsequently remove them via
    DeploymentPlanModifier.Remove(), but...
    ... if in my comparison I have enabled the 'Script validation for new constraints' option, the deployment plan will contain a
    DeploymentScriptDomStep with a Batch containing AlterTableConstraintModificationStatements for tables with foreign key constraints. My problem starts here - there will be an orphaned
    AlterTableConstraintModificationStatement for each of the tables that I removed. Obviously, execution of the generated script comes to a grinding halt when asking SQL Server to to alter a table that is never created.
    I'm able to get around this by digging around in the aforementioned batches and removing the orphaned alter statements, but this seems really hacky, which makes me think I'm missing the proper way of dealing with this.
    So... if anyone is aware of a more correct way of avoiding this problem, I would really appreciate finding out more about it.
    Thanks in advance for any help. :-)

    Hi Greg. Unfortunately there is not an easy solution here. Walking the deployment model, spotting potential issues and excluding them really is what you have as an option here. The alternative is to pre-process the dacpac to have it in the form you want,
    but I'm not sure if this is an option in your case and it also has limitations.
    Regards,
    Kevin

  • Can send me recent real time sap script interivew question?

    Hi any one plz send me the real time sap script interivew questions... or mail me on [email protected]

    Hi,
    Please check the links,
    http://www.sap-img.com/sapscripts/faq-for-sap-scripts.htm
    FAQ on Scripts
    If this data isn't enough, then you can search for SAP script interview questions in SDN, you get more results.
    Regards,
    Hema.
    Reward points if it is useful.

  • Struts and validation question ?

    hi,
    i am using the struts framework for my application, i have a simple jsp logon page (username, password)
    i have defined a validtion.xml file
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE form-validation PUBLIC
              "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
              "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
        Validation Rules for the Struts Example Web Application
        $Id: validation.xml,v 1.8 2003/05/25 22:51:20 dgraham Exp $
    -->
    <form-validation>
        <!-- ========== Default Language Form Definitions ===================== -->
        <formset>
            <form name="logonForm">
                <field property="username"
                        depends="required, minlength,maxlength">
                    <arg0   key="prompt.username"/>
                    <arg1   key="${var:minlength}" name="minlength"
                       resource="false"/>
                    <arg2   key="${var:maxlength}" name="maxlength"
                       resource="false"/>
                    <var>
                        <var-name>maxlength</var-name>
                        <var-value>16</var-value>
                    </var>
                    <var>
                        <var-name>minlength</var-name>
                        <var-value>3</var-value>
                    </var>
                </field>
                <field property="password"
                        depends="required, minlength,maxlength">
                    <arg0   key="prompt.password"/>
                    <arg1   key="${var:minlength}" name="minlength"
                       resource="false"/>
                    <arg2   key="${var:maxlength}" name="maxlength"
                       resource="false"/>
                    <var>
                        <var-name>maxlength</var-name>
                        <var-value>16</var-value>
                    </var>
                    <var>
                        <var-name>minlength</var-name>
                        <var-value>3</var-value>
                    </var>
                </field>
            </form>
            <form name="registrationForm">
                <field property="fromAddress"
                        depends="required,email">
                    <arg0   key="prompt.fromAddress"/>
                </field>
                <field property="fullName"
                        depends="required">
                  <arg0     key="prompt.fullName"/>
                </field>
                <field property="replyToAddress"
                        depends="email">
                    <arg0   key="prompt.replyToAddress"/>
                </field>
                <field property="username"
                        depends="required">
                  <arg0     key="prompt.username"/>
                </field>
            </form>
        </formset>
    </form-validation>i have also the validation-rules.xml file provided by the struts lib.
    i would like to force the content of 'username' property to be alphabetic.
    i guess i have to create my own element
    <validator name="alphabeticString"...> inside the validation-rules.xml file, but i am newbie in javascript programming.
    i have tree question.
    1) why the validation code inside the validator element is written in javascript since it's not going to be executed at client side???
    2)can i use java instead ? (to code teh validation ...)
    3)has anyone got a code to solve this problem ?
    thanks for your help

    i would like to force the content of 'username' property to be alphabetic.
    i guess i have to create my own element
    <validator name="alphabeticString"...> inside the validation-rules.xml file,
    but i am newbie in javascript programming.Not for something that simple... there's a validator rule called mask, which takes a regular expression as an argument, so if you want only a-z: "[a-zA-Z]*" should work.
    1) why the validation code inside the validator element is written in javascript since it's not going to be executed at client side???It is validated on the client, or can be. You have to include the javascript with the html:javascript tag library tag and specify the form name. Then you need to put the onsubmit="return validateFormName();" attribute in the form tag. If JS isn't supported, it'll still default back to the server side validation.
    2)can i use java instead ? (to code teh validation ...)Don't include the JS stuff.

  • [JS][CS3] Script deployment question

    Hi everyone,
    I am currently writing scripts in a corporate environment (~30 users), and I'm contemplating the easiest and most efficient way of deploying the scripts. We have a couple of scripts already with the users that are located locally on their machines. As time goes on we'll be writing more and more scripts and updating the existing ones as necessary.
    My current inclination is to stop saving the files locally on the individual machines and instead put a shortcut to a shared server folder in the scripts folder instead. In my testing it seems to work fine without any significant delay, and it automatically populates all of the files in linked folder. I basically want to be able to make sure that users are always launching the most up-to-date code and that any future scripts can be easily deployed without me walking around to everyone's desk (or worse, e-mailing instructions and hoping for the best).
    Are there any downsides/performance issues to this approach? It's a strictly desktop environment, so I don't have to worry about laptop users who are not connected to the network. Is there an alternate way that would be smoother?
    Thanks!

    We've tried it both ways. On our 12 InCopy machines (OSX), we have a symbolic link from /Applications/Adobe InCopy CS5/Scripts/Scripts Panel/ to a shared folder. This works great as long as our file server doesn't go down, and all sorts of other things would break horribly. And the User scripts folder is still available for any machine-specific customizations.
    For our 4 InDesign machines, we decided that was a little too much risk. So instead we have a script, copyScripts.jsx, that just copies scripts from the file server to the Application scripts folder. So everytime there is a change, we go around to those 4 machines and run copyScripts. This works OK.
    It's a little bit of a pain but it also insulates us a bit from bugs, and it means that whoever is using InDesign can decide to not update the scripts if they are in the middle of something critical. They can choose to defer taking the script updates.
    I think if we had to do it over, we probably wouldn't bother with the copyScripts mechanism. The centralized shared folder works pretty well. But it's not so annoying that we've gotten rid of it. And for 4 machines, it's not a huge burden.
    Also, there are some questions of development. If it's convenient to do development in the ESTK, having the shared folder means you cannot just rightclick in the Scripts panel and choose Edit Script. Or if you do, then any changes you save as you are developing the script are instantly available to everyone, potentially breaking their work if there are problems, or if there is debugging output ,etc., etc. So you need to make sure you do a development in a different place. Just something to keep in mind.

  • XSLT Validation Question

    Well I'm diving into XSLT for the first time.  I've gotten the RSS feed to display just fine, but my problem is with the XHTML 1.0 strict validation and it could just be DW.
    What I have is a XSLT fragment file, saved as .xsl, with the feed.  I then used the server behaviors to add the fragment to my primary PHP document.  It seems that when DW adds this code into a PHP document it adds a script to the document and then includes the xsl file where I place it on the page.  However, the beginning of the XSL file shows:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    That is the line that the validator says won't validate because the only place it is allowed is at the beginning of the file but since DW is including the xsl fragment file in the middle of a file it won't validate.  Is the XSL fragment document still valid without that code at the top of it?

    Maybe this helps?
    http://www.objectsbydesign.com/projects/xslt/xhtml.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • XML Validation using java for SQL Injection and script validation

    I have an input coming from xml file.
    I have to read that input and validate the input against sql injections and scripts.
    I require help now how to read this xml data and validate against the above two options.
    I am a java developer.
    in this context what is marshelling?

    http://www.ibm.com/developerworks/library/x-javaxmlvalidapi.html?ca=dgr-lnxw07Java-XML-Val
    http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/package-summary.html
    The following code validates the xml against a xml schema
    // define the type of schema - we use W3C:
    String schemaLang = "http://www.w3.org/2001/XMLSchema";
    SchemaFactory factory = SchemaFactory.newInstance(schemaLang);
    Schema schema = factory.newSchema(new StreamSource("sample.xsd"));
    Validator validator = schema.newValidator();
    // at last perform validation:
    validator.validate(new StreamSource("sample.xml"));Message was edited by:
    haishai

  • Java Digital Signature - certificate validation question

    I am not sure if this is possible but here is my problem/question:
    I need to publish a web based program in Citrix. My question is, everytime a user logs into Citrix and executes this application they are prompted to trust the Java certificate. Usually a user would choose "always trust" and they would not be prompted again. However, the Citrix environment is setup so that when a user logs out of Citrix all their user configuration is deleted. So the next time they log in, they are prompted once again to trust the Java cert.
    Is there a way to automatically sign this certificate before it prompts a user or a way to script something that wouldn't ask the user again to validate this? Sorry if this sounds like I have no idea what I am talking about but I don't :)
    The Citrix admin said he could launch this command or script (if possible) before the application is launched so it would sign the cert or place the needed cert in the users profile. Hope this makes sense.
    Any suggestions would be greatly appreciated.
    Thanks in advance,
    Scott

    Try the PDFBox mailing-list.

  • Script format question: Title over

    Question: In the script format when using a "TITLE OVER" is it a General, Shot or an Action format. Appreciate any input here, thanks.
    Rich

    It a good question, as it is worth thinking how the elements in our screenplays will be used down the line. So for example, although the formatting of making it a Shot certainly would put TITLE OVER in caps, and making it Action would allow the paragraph it is in to be lower and upper case, it better to think how the elements may be used as metadata when you move on from writing, rather than how they look on the page. The tags and elements will be used by others in many different ways as the script moves through the planning and shooting steps.
    Shot elements will be processed by an application like Adobe OnLocation which will create a placeholder shot for it for the shoot. That could be theoretically correct in this case as the title will need to be shot. However to answer your question I think General is the appropriate element, just as the Title and Author are General on the titlle page.
    Are there other elements of the screenplay that will need to be tagged in special ways so they are available as the right kind of metadata later in the production process?

  • [CS3:Mac]Script Runner question...

    Hi,<br /><br />I'm trying to perform a simple test  to run a javascript file in my plugin.<br />My first question is do I need to setup/register/add something in plugin to be able to run a script in plugin? the reason I ask this, i get an error in line:<br />InterfacePtr<IScriptRunner>   scriptRunner(scriptManager,UseDefaultIID()); <br />scriptRunner is always NULL.<br /><br />Does anyone know what is wrong here?<br /><br />this is my code snippet:<br /><br />           PMString      jsFullPath("Volumes/HD1/.../MyJavaScript.jsx");      // a path to my java script file          <br />        do {<br />          const IDFile outFile(jsFullPath); <br />          InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss)); <br />          ASSERT( scriptManager ) ;<br />          if(scriptManager == NULL) {<br />               break;<br />          }<br />          InterfacePtr<IScriptRunner>   scriptRunner(scriptManager,UseDefaultIID()); <br />          ASSERT( scriptRunner ) ;<br />          if(scriptRunner == NULL) {  // ******* Always returns NULL *****************//<br />               break;<br />          }<br />               ...<br />          ...<br />               ...  //set other params here<br /><br />          ErrorCode err = scriptRunner->RunFile(outFile, param,..); <br />     <br />     }while(kFalse);<br /><br />Thanks,<br />Mor

    I'm testing this code with different version of CSx, The code works fine on CS3 version but fails( in a line that I marked) in other version .
    Never mind should be OK on CS3.
    Thanks,

  • Table validation question

    Hi
    I have created 2 tables zposition, zwork.
    The fields in zposition is department and position.
    The fields in zwork is empid, department, position, firstname and lastname.
    I wanted to create a validation that when i insert the data into the zwork, the system will automatically check against the zposition tables for the department and position that was store inside it. How do i do it?

    in ur zwork table where u find the fields department and position..
    in the table fields of zwork just put the cursor on this field say department and click the key button(on the top) it will propose for a check table and in there give the zposition table relavant field department.
    the answer is there in ur question itself ...
    // check against the zposition tables for the department and position--> u need to propose the check table on that field .
    so all in ur are validating the zwork department entry with zposition department field..

  • Time Validation question

    I am using the time validation and it works well, however my
    case (which I think would be common) doesn't seem to be supported,
    or I am just not sure how to configure. I want someone to enter in
    a time such as '8:45 AM' or '11:30 PM'. It seems as though it
    requires either a leading zero, or a single diget, but not a way to
    do both. The code below allows for the '8:45 PM' option. But not
    11:45 PM.
    <script type="text/javascript">
    var eventtime = new
    Spry.Widget.ValidationTextField("eventtime", "time", {format:"h:mm
    tt", hint:"8:00 AM", validateOn:["blur", "change"],
    useCharacterMasking:true});
    </script>
    The example on this page is forces the leading zero.
    http://labs.adobe.com/technologies/spry/samples/validationwidgets/TextfieldValidationSampl e.html
    Am I missing something or does that pretty much require users
    to always do leading zero in order to enter the full range of
    time?

    The textfield validation widget implementation doesn't
    support variable length for time format. To cover your use-case you
    might use the "hh:mm:tt" format and add the leading zero for single
    digit case.
    The time formats that are accepted are: "HH:mm" (default),
    "HH:mm:ss", "hh:mm tt", "hh:mm:ss tt", "hh:mm t", "hh:mm:ss t".

  • Script validation

    a)I need to check the date validation in javascript.i.e from-date should be less than to-date...both from-date and to-date should be in the format MM/DD/YYYY format.
    b)i want to check the date difference is comes under catagories of
    i)Daily(from-date and to-date difference is one day)
    ii)Weekly(from-date and to-date difference is seven days)
    iii)Monthly(from-date and to-date difference is thirty days)
    iv)Semi-Annually(from-date and to-date difference is 180 days)
    v)Annually(from-date and to-date difference is 360 days)

    So maybe you should ask this question on a javascript forum and not a java one?

  • Data Template construction AND data template validation questions:

    Hello World.
    I am new to Oracle BI and I have sucessfully used the BI Java APIs to create from start to finish a pdf report process. I use the DataProcessor, RTFProcessor, and FOProcessor classes to do this. My question is other than the most simple of Data Templates being used, how is everyone building their data templates? And I would also like to know how are developers validating the actual data template file? I have submitted a request through my MetaLink account for obtaining either a "dtd" or "xsd" file that could be used to validate a constructed data template. I have not received any real answers. I plan on using either XMLSpy or MyEclispse 6 to create my data templates, but I need a "rule book" dtd or xsd file in order to use the auto prompting feature. Making a data template "in the dark" cannot be the method of choice for all of the developers that visit this forum. I see some really fancy/detailed reports and I would like to see how people are building there data templates. Building the data template is at least half the battle when constructing a BI report.
    Thanks for your time.

    Notepad is the developer's choice for data definitions, seriously.
    I have seen and used XMLSpy and have Stylus Studio but they are really a bit of overkill for the data templates. I use Stylus Studio for some of our XML-FO format templates, but that is another story.
    Scott
    Edited by: ScottC on Oct 22, 2008 3:00 PM

Maybe you are looking for

  • How can i create automatic home directory for ldap users

    HI i have successfully bineded solaris 10 with AD . now AD users can able to login to solaris box but the thing is ia m getting error like homedirectory is missing.. i tried with auto_master with some script and it's not executing while logging . Reg

  • Entering username and password in URL, 4400g, v5.2 ??

    Hi, I am trying to display contents of a website which requires me to login each time i exit the webpage. Is there a way to include the username and password in the url itself or is there a way to change the DMP web account to match the username and

  • How to fix the bug of JDK1.3?

    i installed Tomcat 3.2.3 as Windows NT service successfully. but when i logged out and logged in again, the tomcat service stopped! you know, i've set the service as auto-start. so i used jdk1.2.2 instead of jdk1.3, and it worked well. but i still wa

  • Do I need to uninstall my trial version of CS6 and install using disk to get After Effects?

    Do I need to uninstall my trial version of CS6 and install using disk to get After Effects?

  • Cant connect to Windows after conneting to Mac

    The first time I used my iPod (30 video), I connected it to a Mac computer. Later, when I tried connecting it to my own computer (windows operated) the iTunes did not recognize it. And when I ran the updater I got a message saying I need to restore m