App.alert show over and over after each keystroke

I am preparing a pdf form for my department in which doctors will need to quantify the amount of tracer found in 17 heart arteries. The amount of tracer in the patient will be compared when the patient is under stress and when he is at rest.
Then it will calculate the sum of the 17 scores at stress (SSS) and the sum of the score at rest (SRS), and then will calculate the difference between the 2 scores (SDS).
The rationale is that the score of each 17 segments at rest cannot (should not) be higher than the score at stress, however under a few circumstances this can happen. But to be sure that the user knows it's abnormal, it will tell that it should not be like that, and need to agree this is the case.
The problem is that if this happen, each keystroke thereafter will re-trigger the question. How can I make sure that once it asks the question for that particular segment, it will not ask it again?
The other issue is that in these rare cases, we still want to collect what should be the answer if this didn't happen. So I created another set of score at rest (these will be hidden on the final form, but left it there so I can see the results during the design of the form) that should copy the results of the raw data. But in the case of when the rest score is higher than the stress score, it will take the stress value. The problem is that it calculates the SRS one stroke late. How do I fix this?
Here is a link to my form.
Dropbox - Sample Perfusion form.pdf

// The Fieldname shoud have the following hierarchy-Name-Format
// It's important in my case that the naming of the fields for stress and rest perfussion have the follwing format: "Part1.Part2.99 " (Parent-Child-Format)
// sample:
// "Feld.sss.10", "Feld.sss.11"........"Feld.sss.27"
// "Feld.srs.10", "Feld.srs.11"........"Feld.srs.27"
// for this code its important that the last to char have two digits: 01 intead of 1, 02 instead of 2 etc..
// Better you begin with 10 and 11,12,13..27
// The other three result fields a named xsss, xsrs, xsds.
// The two raw field, i didn't make. You must describe in more detail.
// This is the main core. The rest is very little and easy.
xFeldname = "Feld."        // Fieldname Part1 for Stress/Rest Perfusion (Parent or Groupname)
xFeldExtSss = "sss."        // Fieldname Part2 for Stress Perfusion (Child 1)
xFeldExtSrs = "srs."         // Fieldname Part2 for Rest Perfusion (Child 2)
xFieldSSS = "xsss"          // Fieldname for calculated Field SSS (as I understand it: sum of the Stress Perfusion, less than 9)
xFieldSRS = "xsrs"          // Fieldname for calculated Field SRS (as I understand it: sum of the Rest Perfusion, less than 9)
xFieldSDS = "xsds"         // Fieldname for Field SDS (as I understand it: It's the difference from the Field SSS and SRS)
sxsField = this.getField(xFeldname)
sxsField.setAction("Validate", "xcompare(event.targetName, event.value)")
if (typeof okFields == "undefined") {
    okFields = new Array()
function xcompare(xField, xValue) {
    var xSuff = xField.substring(xField.length - 2)
    var srsName = xFeldname + xFeldExtSrs + xSuff
    var sssName = xFeldname + xFeldExtSss + xSuff
    if (xField == srsName) {
        var xSSS = this.getField(sssName).value
        var xSRS = xValue
        var srsorsss = xFeldExtSrs
    } else {
        var xSSS = xValue
        var xSRS = this.getField(srsName).value
        var srsorsss = xFeldExtSss       
    if (xSRS > xSSS) {
        if (okFields.indexOf(xSuff) == -1) {
            if (app.alert("..your alert: The SRS is bigger than SSS. Is this OK?......", 2, 2) == 4) {
                okFields.push(xSuff)
                this.getField(srsName).textColor = color.red
                this.getField(sssName).textColor = color.red
            } else {
                event.rc = false
                return
    } else {
        var xFind = okFields.indexOf(xSuff)
        if (xFind != -1) {
            delete okFields[xFind]
            this.getField(srsName).textColor = color.black
            this.getField(sssName).textColor = color.black
    if (event.rc = true) xcalculate(xField, xValue, xSuff, srsorsss)
function xcalculate(xField, xValue, xSuff, srsorsss) {
    var xTemp = xField.substring(0, xField.length - 2)
    var xSum = 0
    if (xValue >= 1 && xValue < 9) {
        var sxsField = this.getField(xTemp)
        var xTemp = sxsField.getArray()       
        xSum = parseInt(event.value)
        for (i = 0; i < xTemp.length; i++) {
            if (xValue < 1 || xValue > 8) continue
            if (xTemp[i].name == xField) continue
            if (xTemp[i].value == "") continue
            if (xTemp[i].value > 8) continue
            xSum += parseInt(xTemp[i].value)       
        if (srsorsss == xFeldExtSss) {
            this.getField(xFieldSSS).value = xSum
        } else {
            this.getField(xFieldSRS).value = xSum
        this.getField(xFieldSDS).value = this.getField(xFieldSSS).value - this.getField(xFieldSRS).value

Similar Messages

  • Yahoo is my home page and News, Sports, Business links now shows a few sentences after each main URL link. How do I put it back to show just the URL links?

    Yahoo is my home page and News, Sports, Business categories/links changed and now shows a few sentences after each main URL link/topic. How do I put it back to show just the URL links/topics without having to scroll down and down the page. All the extra sentences after the links causes too much scrolling to view the topics.

    Those steps did not solve my problem. Here is an example of what I see although it's not exact copy/paste. All I want to see are the links but I get all the verbiage after the links
    Firefox 17.0.1 version
    ''' '''Ask Stacy: How Can I Rebuild My Credit?''''''
    Here’s a question familiar to millions of Americans… Stacy, My wife and I recently filed for bankruptcy due to high medical bills we were unable to pay. We purposefully didn’t add our Wells Fargo credit ...
    Money Talks News
    '''Analysis: High stakes for Cuba in Chavez's cancer battle'''
    HAVANA (Reuters) - As Venezuelan President Hugo Chavez recovers in Havana from his fourth cancer operation, Cubans face renewed worries about their economic future if the country's top ally dies or has to step down from office. Cuba has staked its economic well-being on the success - and generosity…
    41 mins agoReuters
    [$$] Playing FICC or Treat With Bank Investors
    '''Playing FICC or Treat With Bank Investors'''
    The Wall Street Journal
    AdChoices
    '''Cybergeddon
    A digital crime thriller from Anthony E. Zuicker, the creator of CSI. Only on Yahoo!
    And here is what Internet Explore shows: All LINKS below
    '''Molten gold signals mining's return to Calif.'s Mother Lode'''
    '''Century-old fight for Budweiser name hits new snag'''
    '''NRA goes silent after Connecticut school shooting'''
    '''.Authorities: Kansas man who killed 2 cops dies'''

  • HT201270 ITunes not Showing iPad and iPhone after IOS7 upgrade.

    ITunes not Showing iPad and iPhone after IOS7 upgrade. I have reinstalled iTuned. Repaired services...etc

    Hey Sliqueg,
    There are a few troubleshooting articles that can help resolve the issue. Check them out here:
    For Windows:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    For Mac OS X:
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X
    http://support.apple.com/kb/TS1591
    Sincerely,
    Delgadoh

  • Iphone apps not showing up on Mac after Sync

    I've synced, but there are apps on my phone that are not showing up on the Mac. When I go to Itunes, the check box for "Sync Apps" is NOT checked. When I check it however, it warns me that all apps on my phone (and their respective data) will be erased and replaced with ones on the Mac. I don't want to lose all the new apps and data for said apps. I just want to get my new apps over to the computer.
    Any help?
    Thanks

    Once I add the new apps to my Mac
    An important piece of info there that you neglected to mention in your initial post. Have you never synced with this computer before?

  • ALL apps deleted from iPhone and iTunes after newest iTunes download

    ALL of my boyfriend's apps were deleted from his iPhone 3G AND iTunes after he downloaded the newest version of iTunes onto his PC. Does anyone know why this happened? Can he get all of those apps back somehow?
    Thanks!

    The only way all iTunes content on his iPhone can be removed is if he synced his iPhone with iTunes after the current iTunes version was installed and his iTunes library on his computer is now empty. A warning message should have been provided indicating this would happen if he proceeded with the sync.
    His iTunes library on his computer is now completely empty - no music or anything else?
    Nothing available in the iTunes named folder located in his Music folder?

  • Monitor showing static and blinking after 10.6.7 update

    I have a MacBook unibody 13 inches attached to a Cinema Display. After I completed the upgrade to 10.6.7 the monitor now shows static and/or blinks randomly. It is difficult to replicate the problem, as it happens at very random intervals of time (sometimes a day goes by without it happening). Is anybody else experiencing the same problem?

    The first thing i would usually try with a display issue is on the Macbook try resetting the Parameter RAM (http://support.apple.com/kb/ht1379) to help the graphics cards communicate with the external display.
    If it's still happening it might be the connection or the actual Cinema Display so Thomas' questions are definitely a good next step.

  • When I download any app it shows waiting and it's not been downloading for hours what should I do

    Hello I am trying to download app to my iPhone but I cannot it shows waiting and it never been downloading what should i do?

    Open iTunes on the iPhone and check the downloads folder to make sure there are no downloads stuck in there.
    Some users report having PodCast downloads stuck and deleting them resolves the issue.

  • App just shows waiting and won't update

    My iPhoto app just Shows a "Waiting" status and won't update.

    Try the steps outlined in this document, that you have not yet tried:
    iOS: Troubleshooting applications purchased from the App Store

  • My iphone won't download apps, just show waiting and won't download podcasts. Help!

    My phone won't download any apps, just say waiting instead of loading or downloading.
    Also won't download any podcasts or songs

    Try Settings => Store, sign out and sign back in
    Also try Settings => WiFi, toggle off/on
    Try Settings => General => Reset => Reset Network Settings
    (this will erase any WiFi password you had entered in previously)
    Try downloading to computer's iTunes and sync to the device after that.

  • App keep showing up in update after I have deleted it from ipad

    free app GPS Drive Motion X is giving me problems. I cannot delete it from ipad. when I do delete it it soon shows up as an update in the app store a few minutes later . Please help.   I have the 3rd generation ipad. I have reset my ipad using the home button and power button and that didn't help either.

    Plantz67,
    Another users has found a solution that may possbily work for you. Here is a link to the thread https://discussions.apple.com/message/21038805#21038805#21038805, let me know if this helps resolve your issue.

  • IWeb doesn't show JPEGs and PDFs after move to new computer.

    I bought a new Mac mini (running OS X 10.8.2), moved all files from the old one, installed the most recent Domain.sites file from the old computer into the new computer's User/Library/Application Support/iWeb, but now iWeb opens with all embedded .jpg and .pdf files missing and a long list of "missing file" error messages appearing on startup. All of the .html, .png, .gif, .css and .js files appear to be working O.K. Everything in the "Sites" folder is unchanged since iWeb worked perfectly in the old computer. What can I do to fix this?

    Version 1.1.2. I didn't realize until you asked and I checked, that iWeb has been discontinued and I must have transferred my version over from my old computer along with all the other applications. I see I can still buy an old CD version of iLife '09 from third-party vendors that includes iWeb '09, which is presumably version 3.0 and upgradable to 3.0.4 -- near as I can tell the last version before the program went out of production. Evidently iWeb 1.1.2 has compatibility issues with OS X Mountain Lion? I don't want to buy iWeb '09 (the other components of iLife '09 are useless, since 2012 versions were shipped with OS X 10.8) unless I can get some assurance it will work with my existing files. I have RapidWeaver 4.4.2 but I don't have time to recreate everything from scratch. It's frustrating that there's evidently no way to export all the work I've put into my iWeb website over the years into a form that can be edited using other web design software. Or is there? I bought RapidWeaver expecting to be able to open and edit my iWeb files. It's all HTML and JavaScript, isn't it? Why aren't all my files interchangeable between web design programs?

  • Can't upgrade iWork 09 to iWork 13, App Store shows INSTALLED and will NOT download

    When I purchased a MBP in 2010 it came with iWork 09.  Each time I launch either Keynote, Pages, or Numbers it tells me there is a new version available and asks if I would like to install.  If I say "YES" I get taken to the app store and each of the apps says "INSTALLED" and does not have a download option. 
    I tried manually moving /Applications/iWork 09 to /tmp but when I revisit the app store it wants to charge me for the free upgrade.
    No idea how to fix this.
    I wanted to demo this cool new collaboration feature, but it looks like it will have to wait.

    DO NOT GET IWORK 13!!!!!!! IT REDUCES FUNCTIONALITY AND CANNOT OPEN OLD KEYNOTES!!!!! IT DOES NOT SUPPORT EVERYTHING THAT IT USED TO!!!!! ITS NOT WORTH THE EFFORT!!!!!!!!

  • Health app not showing steps and calories

    It's about 5 days that the health app is not showing steps, calories and other data which was showing before. I have added two data source to provide data for health App and both them are provideding data.

    I take it you have already gone into the Health app and set up your Medical ID card, correct?
    The Medical ID card will show up on the Lock Screen password entry screen when Emergency option on the bottom left-hand side of the screen is clicked.
    It does not show up anywhere if you do not have a passcode lock on the screen.
    Cheers,
    GB

  • HT201272 why did my apps just stop opening and workng after i synced to my ne laptop and how do i get them to work??

    most of my apps won't open after syncing to a new laptop why and how can I fix this?

    If it's apps that you've downloaded from the App Store that you're having the problem with, and the Apple built-in apps are ok, then try downloading any free app from the store (as that appears to reset something) and then re-try them - the free app can then be deleted.

  • Contacts app only shows ICE and Myself

    Help! When I go to Contacts, "Contacts Setup" "Sync with online accounts" and "Import contacts" are displayed. Already tried them all. I cannot get to view all my contacts from Facebook, Google+, etc! Even if I add new contacts, later on nothing still shows!
    Solved!
    Go to Solution.

    Go to contacts-filters.
    All we have to decide is what to do with the time that is given to us - J.R.R. Tolkien

Maybe you are looking for