JavaScript help.

Discussion in 'Software' started by Publius, Dec 2, 2005.

  1. Publius

    Publius Sergeant

    Ok, this is a little convoluted, so I will try to be as specific as possible. I am working with a browser based informatics system in our laboratory and am having a little trouble with what should be a simple javascript implementation.

    The code is build on a Java backbone and is written in iXML (hence the indentations) with support for scripting languages and html built in. Here is the code with the script:

    The dashes are line continuations that are necessary for the formatting and the indents aren't showing up, so it may be a little hard to follow, but here is basically what is going on:

    1. The grid input creates a table of input fields 8 across and 13 high. The purpose is for the user to be able to scan a stack of barcoded plates to enter into the system. Ignore anything with a ~ in it -- it is system specific and doesn't do anything to the HTML output, just the the DB. The onchange calls the script written at the top.

    2. The scanners tab to the next field after scanning in anything, so the field status has changed and the script gets called with each entry.

    3. The script sets _c.count.value to begin at 1 with the first field change and count up and displays this count in the text input at the bottom the code (with the purpose being to help the tech keep track of the number of plates they have scanned in)

    So the problem I am having is that if someone scans something wrong, or twice and goes back and deletes something out of a field, the script gets called and the counter goes up again, when I would ultimately like for it to go down if the information in a field is deleted.

    Any help would be appreciated. I have tried several different iterations, and cannot get it to work. JavaScript is not a strongpoint of mine, though I can usually get simple things like this worked out.

    Don't worry about the formatting, any script changes you suggest I can format into the iXML intents.

    Thanks in advance.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds