Help writing first Java Script

HELP!! I am writing my first Java Script for a class but cannot figure out what I am doing wrong. I have created a from and need to write a script to verify that all form entries are filled before allowing the data to submit. Can some one please look at my code below and tell me what I am doing wrong!! Thank you
<HTML>
<HEAD>
<TITLE>Project 8 IT 117 Section 01 6/13/2003</TITLE>
</HEAD>
<BODY BGCOLOR="#007FFF">
<FONT FACE="Arial">
<STRONG><UL>
<LI>Search our stock
</UL>
<UL>
<LI>Place an order
</UL>
<UL>
<LI>Out-of-print searches
</UL>
<UL>
<LI>Events calendar
</UL></STRONG>
<SCRIPT LANGUAGE="JavaScript">
<!--
function submit() {
     alert("Information submitted!")
function verify() {
     if document.info.elements[0].value=="" ||
     document.info.elements[1].value=="" ||
     document.info.elements[2].value=="" ||
     document.info.elements[3].value=="" ||
     document.info.elements[4].value=="" ||
     document.info.elements[5].value=="" ||
     document.info.elements[6].value=="" {
          alert("Please complete each field")
     }     else {
          submit()
//-->
</SCRIPT>
<H2>Sign up for our mailing list.</H2>
<FORM NAME="info">
<STRONG>First Name:<INPUT TYPE="TEXT" SIZE="20" NAME="FIRSTNAME">
Last Name:<INPUT TYPE="TEXT" SIZE="20" NAME="LASTNAME"><BR>
Street Address:<INPUT TYPE="TEXT" SIZE="50" NAME="ADDRESS"><BR>
City:<INPUT TYPE="TEXT" SIZE="20" NAME="CITY">
State:<INPUT TYPE="TEXT" SIZE="6" NAME="STATE">
Zip Code:<INPUT TYPE="TEXT" SIZE="15" NAME="ZIPCODE"><BR>
E-Mail:<INPUT TYPE="TEXT" SIZE="50" NAME="E-MAIL">
<BR>Click here to submit this information. <INPUT TYPE="BUTTON" VALUE="Send now!" onClick="SUBMITTED()"></STRONG>
</FORM>
</FONT>
</BODY>
</HTML>

Just a thought, but shouldn't you be calling "verify()" instead of "SUBMITTED()" in your onClick handler? And warnerja is right, javascript is not really java.

Similar Messages

  • Need help writing a Java rule in PDF Forms

    I have created an invoice for my contractors via "forms", and in turn made each cell either a drop down list or "read only" field so they cannot change the rate of pay, etc.  Here is my issue...My first drop down cell is titled "Job Description".  When the contractor selects one of the 8 dropdown options within the Job Description field, I would like it to automatically fill in the hourly rate that is associated with that particular job description (or skill).  I currently have my "rate" cell as a drop down, and I want to make that a read only, and when you select the A1 position from Job Description, it will populate the "rate" field with the appropriate amount for that A1 rate.  I believe this can be done with writing some Java script, but I have never played with Java and I don't really have the time to teach myself.  If anyone can help with me a quick tutorial, or even the formula I should use, so that I can just plug and play, that would be super helpful.  If this is a time consuming issue, I would be interested in paying someone to do it for me. Thank you!

    Hi George,
    I was able to copy my data over to a fresh document, and now it works just fine....thank you so much for your insight and help!
    I have another question if you have a moment. 
    I am trying to do a simple calculation of start time and end time for my employees.  Do I need to do this via a javascript, and if so, what area in properties of the result field should I copy it to?  for the purpose of the script, the fields are as follows:
    DataField1 = start time
    DataField2 = end time
    DataField3 = total time
    I would like to use the h:MM tt format for my time fields if possible.
    I've attached a link to the file through my dropbox account, and you'll notice that I created three new fields at the top of the invoice just to test the time calculations before i mock up the whole document.
    Dropbox - Contractor Invoice Template (1).pdf
    Any help you can give me would awesome! 
    Thank you!!

  • Help for compiling first Java script

    Friends,
    I am a begginer java programmer. Iam trying to compile a java script using .bat file which contains
    c:\j2sdk\bin\javac -classpath <c:\j2sdk\lib\dt.jar> . ReadOnlyMaker.java
    But it comes back with error as below
    >c:\j2sdk\bin\javac -classpath ReadOnlyMaker.java 0<c:\j2sdk\lib\dt.jar 1>.
    Access is denied.
    I have admin rights on this machine but the directory j2sdk , where java is installed, is always staying readonly even after changing permissions in properties tab.
    Not sure what is going wrong , Any one can Pl. help ?
    Thanks,

    First of all you don't need to be in the ..\..\bin directory to execute the javac.exe, java.exe, etc pgms as commands. If not already set up correctly, you can just add this to your System PATH.
    Next, start by executing from the directory your .java PGM is in.
    Then, what is that <...> stuff?
    Lastly, if it's a .java file, it's a pgm file and not a javascript. Javascript goes is only for web work, embedded in html.
    ~Bill

  • How do I get expert help to solve Java Script error in PS?

    My Photoshop CC (and previous versions) do not see Java script, therefore any automation functions do not work.
    I have been dealing with Adobe support in India since September and have had no resolution. Although they keep saying the case has been escalated, I have yet to talk to anyone who seems to have any understanding past following a check list.
    Please help- how do I get in touch with someone who can actually troubleshoot the problem?

    I think an extension is the most likely culprit.
    Tools > Add-ons > Extensions category
    * You might try updating your extensions, in case updates are available. The "gear" icon > Check for Updates is the easiest way
    * If no updates are available or the problem persists, try to '''disable''' all nonessential extensions (i.e., all the ones you do not absolutely need to tolerate using Firefox today). Simply click all those Disable buttons and then restart Firefox.
    Can you browse for an extended period without seeing the message?

  • Please help: Running a java script form the windows command line.

    Hello forum,
    I'm trying to run a java script from the command line on
    windows but I always get the "Failed to open document" alert.
    I typed the following in the run command line:
    "flash.exe" C:\Documents and Settings\Hasan.Atieh\My
    Documents\science\java scripts\testing jsfl\get_files_mx2004.jsfl
    now I copied and pasted the path of my java script file from
    the windows explorer address bar so I'm sure that the java script
    file exists in the specified path.
    Any thoughts why am I getting the message!!

    :oops: never mind... issue resolved. I didn't quote the java
    script file path but thats because the help documents on flash
    didn't say that.
    this is what flash help say:
    To run a script from the command line on Windows:
    Use the following syntax (add path information as required):
    "flash.exe" myTestFile.jsfl

  • Help with first java app!

    Hello all. I'm very new to java, and I'm trying to create my first GUI app. The idea behind this app is for the user to enter number of hours worked and the rate of pay, and then it will mutliply them together and give you the result.
    I have my main class which sets up the frame then calls my panel class
    Inside my panel class I have two panels, one for the twi input textfields (hours and rate of pay) and one panel for the button and the result text field.
    I cannot figure out how to do get the value of both text fields and mutliply them together when the botton is clicked. Here's my code:
    import javax.swing.*;
    public class FirstProject
         public static void main (String[] args)
              //Sets up the frame
              JFrame frame = new JFrame ("My first Java app");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(300, 200); frame.setVisible(true);
              //Foreground panel class
              foreground fg = new foreground();
              //Add stuff
              frame.getContentPane().add(fg);
              frame.setVisible(true);
              frame.pack();
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.xml.bind.Marshaller.Listener;
    public class foreground extends JPanel implements ActionListener
         public foreground()
              //Setup the layout
              setLayout (new BoxLayout (this, BoxLayout.Y_AXIS));
              //Setup input panel
              JPanel input = new JPanel();
              input.setBackground(Color.white);
              input.setBorder(BorderFactory.createLineBorder(Color.black, 1));
              //Setup output panel
              JPanel output = new JPanel();
              output.setBackground(Color.white);
              output.setBorder(BorderFactory.createLineBorder(Color.black, 1));
              //Add main media
              add(input);
              add(output);
              //--**INPUT BOX**--\\
              //Setup the hours label
              JLabel hour = new JLabel("Number of hours worked: ");
              //Setup the rate of pay label
              JLabel pay = new JLabel("Enter your rate of pay: ");
              //Setup the rate of pay text field
              TextField paytext = new TextField("20", 3);
              //Setup the hour text field
              TextField hrtext = new TextField("40", 0);
              //Add objects for input
              input.add(hour);
              input.add(hrtext);
              input.add(pay);
              input.add(paytext);
              //--**OUTPUT BOX**--\\          
              //Set up objects in output panel
              JButton calculate = new JButton("Calculate!");
              calculate.addActionListener(this);
              calculate.setActionCommand("Calculate");
              //Add calculate text field
              TextField calculatetext = new TextField(2);
              //Add objects for output
              output.add(calculate);
              output.add(calculatetext);
    }Thanks in advance!!
    P.S. I'm using eclispe btw.

    Your problem is related to your ActionListener.
    public class foreground extends JPanel implements ActionListener
    calculate.addActionListener(this);You have it set up so the Foreground panel is listening to the calculate button's clicks, but it's not doing anything with the clicks.
    I would strongly suggest dropping the "implements ActionListener" bit and implementing a separate ActionListener, like so:
      JButton calculate = new JButton("Calculate!");
      ActionListener buttonListener = new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          // do whatever you want with the
          // paytext.getText ...
          // hrtext.getText ...
      calculate.addActionListener(buttonListener);
      // and you don't need this:  calculate.setActionCommand("Calculate");rh

  • Help with first Adobe Script for AE?

    Hey,
    I'm trying to create a script that will allow me to set a certain number of layer markers at an even interval to mark out a song. Could someone help me troubleshoot this script? I've been working on it for ages now, and I'm about to snap. I've basically gone from HTML and CSS, to javascript and Adobe scripting in the past few hours, and I cannot figure this out for the life of me.
    I want to create a dialog with two fields, the number of markers to place, and the tempo of the song. Tempo is pretty simple, its just the number of beats per minute. The script is meant to start at a marker that I have already placed, and set a new marker at incrementing times. Its mainly to help me see what I'm trying to animate too, even if the beat is a little hard to pick up every once in a while.
    Also, is there a better way to do this? This script will help me in the long run because I will need to do this pretty often, but I'm wondering if there was something that I could not find online that would have saved me these hours of brain-jumbling?
    Thank you very much for any help you can offer.
        // Neo_Add_MultiMarkers.jsx
        //jasondrey13
        //2009-10-26
        //Adds multiple markers to the selected layer.
        // This script prompts for a certain number of layer markers to add to the selected audio layer,
        //and an optional "frames between" to set the number of frames that should be skipped before placing the next marker
        // It presents a UI with two text entry areas: a Markers box for the
        // number of markers to add and a Frames Between box for the number of frames to space between added markers.
        // When the user clicks the Add Markers button,
        // A button labeled "?" provides a brief explanation.
        function Neo_Add_MultiMarkers(thisObj)
            // set vars
            var scriptName = "Neoarx: Add Multiple Markers";
            var numberOfMarkers = "0";
            var tempo = "0";
            // This function is called when the Find All button is clicked.
            // It changes which layers are selected by deselecting layers that are not text layers
            // or do not contain the Find Text string. Only text layers containing the Find Text string
            // will remain selected.
            function onAddMarkers()
                // Start an undo group.  By using this with an endUndoGroup(), you
                // allow users to undo the whole script with one undo operation.
                app.beginUndoGroup("Add Multiple Markers");
                // Get the active composition.
                var activeItem = app.project.activeItem;
                if (activeItem != null && (activeItem instanceof CompItem)){
                    // Check each selected layer in the active composition.
                    var activeComp = activeItem;
                    var layers = activeComp.selectedLayers;
                    var markers = layers.property("marker");
                    //parse ints
                    numberOfMarkers = parseInt (numberOfMarkers);
                    tempo = parseInt (tempo);
                    // Show a message and return if there is no value specified in the Markers box.
                    if (numberOfMarkers < 1 || tempo < 1) {
                    alert("Each box can take only positive values over 1. The selection was not changed.", scriptName);
                    return;
                    if (markers.numKeys < 1)
                    alert('Please set a marker where you would like me to begin.');
                    return;
                    var beginTime = markers.keyTime( 1 );
                    var count = 1;
                    var currentTime = beginTime;
                    var addPer = tempo/60;
                    while(numberOfMarkers < count)
                    markers.setValueAtTime(currentTime, MarkerValue(count));
                    currentTime = currentTime + addPer;
                    if (count==numberOfMarkers) {
                        alert('finished!');
                        return;
                    else{
                        count++;
                app.endUndoGroup();
        // Called when the Markers Text string is edited
            function onMarkersStringChanged()
                numberOfMarkers = this.text;
            // Called when the Frames Text string is edited
            function onFramesStringChanged()
                tempo = this.text;
            // Called when the "?" button is clicked
            function onShowHelp()
                alert(scriptName + ":\n" +
                "This script displays a palette with controls for adding a given number of markers starting at a pre-placed marker, each separated by an amount of time determined from the inputted Beats Per Minute (Tempo).\n" +
                "It is designed to mark out the even beat of a song for easier editing.\n" +
                "\n" +
                "Type the number of Markers you would like to add to the currently selected layer. Type the tempo of your song (beats per minute).\n" +           
                "\n" +
                "Note: This version of the script requires After Effects CS3 or later. It can be used as a dockable panel by placing the script in a ScriptUI Panels subfolder of the Scripts folder, and then choosing this script from the Window menu.\n", scriptName);
            // main:
            if (parseFloat(app.version) < 8)
                alert("This script requires After Effects CS3 or later.", scriptName);
                return;
            else
                // Create and show a floating palette
                var my_palette = (thisObj instanceof Panel) ? thisObj : new Window("palette", scriptName, undefined, {resizeable:true});
                if (my_palette != null)
                    var res =
                    "group { \
                        orientation:'column', alignment:['fill','fill'], alignChildren:['left','top'], spacing:5, margins:[0,0,0,0], \
                        markersRow: Group { \
                            alignment:['fill','top'], \
                            markersStr: StaticText { text:'Markers:', alignment:['left','center'] }, \
                            markersEditText: EditText { text:'0', characters:10, alignment:['fill','center'] }, \
                        FramesRow: Group { \
                            alignment:['fill','top'], \
                            FramesStr: StaticText { text:'Tempo:', alignment:['left','center'] }, \
                            FramesEditText: EditText { text:'140', characters:10, alignment:['fill','center'] }, \
                        cmds: Group { \
                            alignment:['fill','top'], \
                            addMarkersButton: Button { text:'Add Markers', alignment:['fill','center'] }, \
                            helpButton: Button { text:'?', alignment:['right','center'], preferredSize:[25,20] }, \
                    my_palette.margins = [10,10,10,10];
                    my_palette.grp = my_palette.add(res);
                    // Workaround to ensure the editext text color is black, even at darker UI brightness levels
                    var winGfx = my_palette.graphics;
                    var darkColorBrush = winGfx.newPen(winGfx.BrushType.SOLID_COLOR, [0,0,0], 1);
                    my_palette.grp.markersRow.markersEditText.graphics.foregroundColor = darkColorBrush;
                    my_palette.grp.FramesRow.FramesEditText.graphics.foregroundColor = darkColorBrush;
                    my_palette.grp.markersRow.markersStr.preferredSize.width = my_palette.grp.FramesRow.FramesStr.preferredSize.width;
                    my_palette.grp.markersRow.markersEditText.onChange = my_palette.grp.markersRow.markersEditText.onChanging = onMarkersStringChanged;
                    my_palette.grp.FramesRow.FramesEditText.onChange = my_palette.grp.FramesRow.FramesEditText.onChanging = onFramesStringChanged;
                    my_palette.grp.cmds.addMarkersButton.onClick    = onAddMarkers;
                    my_palette.grp.cmds.helpButton.onClick    = onShowHelp;
                    my_palette.layout.layout(true);
                    my_palette.layout.resize();
                    my_palette.onResizing = my_palette.onResize = function () {this.layout.resize();}
                    if (my_palette instanceof Window) {
                        my_palette.center();
                        my_palette.show();
                    } else {
                        my_palette.layout.layout(true);
                else {
                    alert("Could not open the user interface.", scriptName);
        Neo_Add_MultiMarkers(this);

    You should ask such questions over at AEnhancers. I had a quick look at your code but could not find anything obvious, so it may relate to where and when you execute certain functions and how they are nested, I just don't have the time to do a deeper study.
    Mylenium

  • Help required in Java Script

    As far as I know the variables that are used inside java script program are declared using var keyword.
    Suppose I assign in the following manner,
    var str="Hello";
    Is there any way I can using the String functions that java.lang supports . I want to do validaition at the client side. Therefore I assume there is no mandatory requirement , that the client has anything java on his system.

    Javascript already supports many of the java.lang functions, eg, substring(start, stop), length, splice, split, etc.
    Just remember your using Javascript so there may be variations with methods and signatures.
    Have a look at either Netscapes or Microsofts Javascript reference.
    Anthony

  • Need Help Writing a Shell Script

    Basically I'm writing a script that opens TextEdit so I can open it from the Terminal. I also want it to run in the background so I can continue using the Terminal without having to quit TextEdit first. So far I've figured out two ways of doing this, and neither one does exactly what I want it to do. Here's the first one I tried:
    /Applications/TextEdit.app/Contents/MacOS/TextEdit $@ &
    The problem with this is that if TextEdit is already running, it opens a new instance of it to open the files, and it doesn't bring the app into focus when I run it. So I decided to try this:
    open -a "TextEdit" $@ &
    This way all files open in the same instance of TextEdit and it brings the app to the front, but it won't let me save anything I don't have write privileges for, even if I run it with sudo. I Googled it and apparently what happens is it runs "open" as root but runs the actual application that I'm opening as the current user.
    So basically what I need to know is if there's a way of doing this that will congregate all files into the same instance of TextEdit and bring the app to the front when I launch it, but still let me run it as root with sudo. If not, is there at least a way to check if TextEdit is running and throw an error if it is?

    #!/usr/bin/env bash
    if ps ax | grep '[T]extEdit'; then
    echo "TextEdit is already running!"
    else
    /Applications/TextEdit.app/Contents/MacOS/TextEdit &
    fi
    open -a TextEdit "$@"
    osascript -e 'tell application "TextEdit" to activate'
    Example:
    your.script "text file.txt"
    NOTE 1: When posting code to this forum, enclose your code in
    ...your code goes here...
    This will make sure that all your indentation and other meta-characters that might get interpreted by the forum code will be left alone.
    NOTE 2: The $@ will ONLY preserve quoted strings as a single argument if it is specified as "$@". That is to say it MUST be inside a pair fo double-quotes. Otherwise it is the same as $* The missing ".." are what messed up your ability to treat a file with space as a single argument. ALSO NOTE, I specified the file on the command line inside quotes (could be single or double), or you could use  if you desire.
    NOTE 2 and a half:
    If you DO NOT want to put quotes around the space filled filename when invoking your script, you could change your "$@" to "$*"
    open -a TextEdit "$*"
    The difference is that using "$@" will allow specifying several filenames on the command line and TextEdit will open all of them at once. The use of "$*" means you can only open 1 file per use of your script. Not a big deal, but I figured you should know the options available to you.
    NOTE 3: I've simplified your script.
    I do not know why you decided that if you are root you wanted to use sudo, since sudo gives normal users root privileges, and root already has root privileges.
    Actually based on earlier exchanges, I would have thought that you wanted to start TextEdit using sudo, unless it was already running:
    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit &
    so that you had root privileges allowing you to write files in places you were normally not allowed. Then again, maybe I was reading the earlier posting wrong (won't be the first time ).
    NOTE 4: The use of
    if [ "$textedit" > /dev/null ]; then
    is just plain wierd This translates to the command:
    test "$textedit" >/dev/null
    which redirects standard output into /dev/null, so the actually command looks like
    test "$textedit"
    which will essentially return TRUE if $textedit has a string in it, and FALSE if $textedit is empty.
    I decided to just use the completion status of the grep command as a way to decide if TextEdit was running on not.
    NOTE 5: I simplified the ps|grep|grep command with a trick I learned several years ago. The '[T]extEdit' regular expression exactly matchs TextEdit, except that it DOES NOT match a ps line that has '[T]extEdit'. So I can get rid of one grep command because it will never match the grep command in the ps output.
    NOTE 6: I moved the open and osascript commands outside the if structure, as I assumed you wanted osascript to bring TextEdit to the foreground regardless of whether it was already running or not, and the open command was identical for both halfs of the if structure. If this is a bad assumption, feel free do put it back inside the if structure.
    Message was edited by: BobHarris

  • I need help writing an apple script

    earlier I made an application with automater saying that when it opens it would add something to my todo list, for example, the subject being english and priority being very high. Then I made an apple script telling it to open the application I made. Then I made a mail rule telling it that if i text my computer and the text includes english and very important (english is subject and very important is the priority) it would open the apple script that tells the application i made to open and put english in my todo list. Can someone tell me how I can make a script in which it puts whatever I text my computer in my todo list, so if i text my computer anything random it would put it in my todo list

    Well after a bit of head scratching I have done it! And it was simpler than I expected although I'm sure the script can be improved, it does what I want it to do. Any suggestions on improvements would be welcome.
    Andy E
    The script...
    set artistName to text returned of (display dialog “Enter artists name:” default answer “”)
    set artistSortName to text returned of (display dialog “Enter artists sort name:” default answer “”)
    if artistName is “” then
    set tempVer to display dialog “No artist name specified!” buttons {“OK”}
    return
    end if
    if artistSortName is “” then
    set tempVer to display dialog “No artist sort name specified!” buttons {“OK”}
    return
    end if
    tell application “iTunes”
    activate
    set theLibrary to library playlist “Library”
    set searchList to search theLibrary for artistName
    repeat with thisTrack in searchList
    set thisArtist to artist of thisTrack
    if thisArtist is equal to artistName then
    set sort artist of thisTrack to artistSortName
    end if
    end repeat
    end tell
    15" MacBook Pro 2.16GHz, 2GB Ram   Mac OS X (10.4.10)   It's my first Mac and I love it!

  • Need Help Writing a Calculation Script Using a Checkbox

    Hello,
    I am new to Adobe X Standard and Javascript.  I have all other parts of my fillable change order form completed except the tax calculation.  I have the following fields:
    Text Field = SUBTOTAL
    Text Field = TAX
    Checkbox = Exempt
    I would like the calculation in the TAX field to be as follows:
    If the checkbox = false then SUBTOTAL * .05, else SUBTOTAL = 0. 
    It really doesn't seem that complex but learning javascript on the fly is apparently above my skill level.  I would greatly appreciate someone's help in getting this initial calculation working.  I greatly appreciate your time.  Thank you.

    Your description is a bit confusing to me. Do you want to calculate the value of the TAX field? In the last bit of pseudocode, you seem to be setting SUBTOTAL to 0. Do you want the tax to be the SUBTOTAL value times 0.05 if not exempt and 0 if exempt? If so, the custom calculate script of the TAX field can be:
    event.value = getField("Exempt").value === "Off" ? +getField("SUBTOTAL").value * 0.05 : 0;
    This is equivalent to:
    if (getField("Exempt").value === "Off") {
        event.value = +getField("SUBTOTAL").value * 0.05;
    } else {
        event.value = 0;

  • Urgeant help with a java script

    I really nead some help with an essay that i have for tommorow. Ok it goes like this: I have to build in java and with help of the awt library a proper interface that whill allow people to make reservation for tickets in a cinema. With the proper graphics the interface must allow the users to chose time , movie , date , and a spot in the cinema! the spot should be selected from a "picture" (like a diagramm or something) of the cinema which will be displayed on the screen...
    thanx in advance!!!

    What do you need "help" with? No one is going to do your homework for you here. If you have a specific question or problem, feel free to ask. You have to get started yourself though.. Thought college was going to be easy?

  • Help needed in Java Script

    HI all,
    can anyone tell me what is the meaning of following code ? Please !!
    Code
    <script language="JavaScript">
    function enable_button()
         document.form1.SelectBut.disabled =false;
    <td><font size=4 color="Blue">Please Select the .CSV file to e-mail</font></td><input type=FILE Accept="csv/*" size=30 name="acsvfile" title="Find a vaild .CSV file and Click SEND_EMAIL button" onclick="onChange=enable_button()"></tr>
    </table>
    Thanx in advance.
    Regards,
    Ashvini

    The form has a file input button (acsvfile) and a submit button (SelectBut). The SelectBut is initially disabled until the user clicks on the acsvfile button to select a file for upload.
    However I don't believe that it works the way that it i intended. The enable_button function gets called on the onClick event and the SelectBut will always be enabled even if the user cancels the file selection.
    You may want to remove the onClick and use :
    function enable_button()
        if (document.x.acsvfile.value == "") {
             document.x.SelectBut.disabled =true;
        } else {
            document.x.SelectBut.disabled =false;
    <td><font size=4 color="Blue">Please Select the .CSV file to e-mail</font></td><input type=FILE Accept="csv/*" size=30 name="acsvfile" title="Find a vaild .CSV file and Click SEND_EMAIL button" onChange="enable_button()"  onKeyDown="blur();"   ></tr> This will only enable the SelectBut if the user selects a file but will not allow the user to manually enter a file. You may want to be nice and add a clear button tp remove any files they have selected.

  • Need help writing and Apple Script

    I've never written an apple script before so I need the entire tutorial for dummies. Basically, I am annoyed with the fact that Microsoft Word 08 keeps opening a new document at 100% zoom when I want it to open at "page width." How do I write a script for that?

    You don't need an Applescript. Open the New Document template, resize as you like then save the template.
    To learn Applescript start here. You will also find support at the Applescript site for developers. Your local book store or Amazon.com have dozens of books on Applescript programming.
    Here's the main site for obtaining Applescripts.

  • Need help with Java Script to perform a calculation in Adobe Acrobat Pro 9 form

    I have a form (test) that I am creating in Adobe Acrobat Pro 9.
    I need help creating custom Java Script so I can get the desired answer.
    1) There are several questions in each group that require a numerical answer between 0-4
    2) There is a total field set up to sum the answers from all above questions
    3) The final "score" takes the answer from Step 2 above and divides by the total possible answer
    Any help on what Java Script I need to complete this would be greatly appreciated!
    I've attached a "spreadsheet" that shows it in more detail as well as what formulas I used in Excel to get the desired end result.
    Thanks in advance.

    Have you tried the "The field is the average of:"?

Maybe you are looking for