JavaScript Code Not Operating the way I want it...

Hello All!
Got a bit of JavaScript that doesn't seem to work properly.
The line is as follows:
var begin = this.getField("Class").value;
if (begin = 1) event.value = Math.floor((this.getField("CON").value + 9) + (this.getField("Level").value * 6));
else if (begin = 2) event.value = Math.floor((this.getField("CON").value + 7) + (this.getField("Level").value * 5));
else if (begin = 3) event.value = Math.floor((thisget.getField("CON").value + 6) + (this.getField("Level").value * 4));
It is tied to a dropdown box called "Class" and when you choose a choice, the field is supposed to do one of those three equations based on your choice. I've assigned all the proper export values, but the field seems to only display the value of the first equation. It doesn't change or alter when I change my choice. The other fields the equations tie to (Level and CON) change the value accordingly, but it doesn't seem to register the value or variable of the dropdown box. I thought it might be a 'calculate order' problem, but that doesn't seem to be it as it is in it's appropriate spot in the way the rest of the calculations occur. If I assign a simple box to display the "values" of the dropdown box, it works like it should.
Am I missing something?

You're doing the classic mistake of using the assignment operator ( = )
where you should use the comparison operator ( == ).
So in all of your if-statements, like:
if (begin = 1)
You need to use:
if (begin == 1)

Similar Messages

  • Ever since I downloaded the new iOS 7 my screen will not turn up and down and it rotates on its own side to side.it will not face the way I want it to go. How do I fix it?

    Ever since I downloaded the new iOS 7 my screen will not turn up and down and it rotates on its own side to side.it will not face the way I want it to go. How do I fix it?

    I've been working on this all day!!! I've tried everything I know of and can't get it to load either. Sounds like lots of people are having problems. Here is what I have so far...I have uninstalled EVERYTHING on my pc from apple and reinstalled itunes to no avail. I have tried all sorts of things I've read as fixes online. NOTHING has worked. Here is something interesting that i have noticed though. my main pc (which is the one i have always managed my itunes account with for years) is a 32 bit system running windows 7. Yesterday I installed itunes for the first time on my new netbook which is a 64 bit (windows 7) system and it works just fine. i have three other laptops (all window 7) in my household that are all 64 bit operating systems and ALL have updated to 10.5 and THEY ALL work fine. this is FOUR 64 bit systems ALL updated w/10.5 that work and ONE that is a 32 bit that will not. Can't get any help from apple. their suppot *****! I want to get someone on the **** phone or a live chat but cant. *** APPLE????? please let mw know if you find SOMETHING i can try next. I'm out of ideas and patience!

  • I need to cancel my membership I got today it did not work the way I wanted to and my computer is not working with it. Thank please cancel to today!!

    I need to cancel my membership I got today, it did not work the way I wanted to. So please cancel it today! Thanks

    This is a user forum; we have no access to your subscriptions, but we can help you to get it canceled.  So what did you subscribe to:
    Creative Cloud?
    an Acrobat.com online service?

  • Hi, i would like my membership cancelled. I got it yesterday but its not working the way i wanted it to work. How do i go about that i getting my refund as its before 30 days.

    Hi, i would like my membership cancelled. I got it yesterday but its not working the way i wanted it to work. How do i go about that i getting my refund as its before 30 days.

    Hi kondwastefstef,
    I'm sorry that your subscription didn't meet your needs. Please contact Adobe Customer Support via phone or chat; they should be able to cancel your account and process your refund. Here's the contact information: Contact Customer Care
    Best,
    Sara

  • Videos not organized the way I want (I think)

    I FINALLY downloaded videos to my iPod, however they are not being organized the way I want. Let me explain.
    I have 32 videos purchased from iTunes, various artists, and only 1 video per artist. With audio files for artists with 1 to 3 songs I group them all into one artist called "VARIOUS" and the album is "iTunes". I delete all other information pertaining to the artist.
    I applied this same reasoning to the videos, I also numbered them 1-32 in order that I bought them. However when I go to the videos on my iPod (when it's NOT connected to my computer) all the videos are in Alphabetical order of the artist, which I THOUGHT I deleted. So when I play them they play in alphabetical order on my iPod when it's NOT connected to my computer. When I play them through my iPod connected to my computer they play in the order I organized.
    Is there something I missed? Is there a shuffle option for videos that I can't seem to find?
    Any help is GREATLY appreciated.
    60GB iPod w/Video   Windows XP  

    I checked the shuffle option and it does not work on videos, only Songs and Albums. Thinking it might be an iTunes 7.3 thing I removed that version and reinstalled the 7.2 version - same results.
    I've tried numerous things and still have the same result:
    With the iPod plugged into the computer, the videos are in the numerical order I placed them, and I can play them in that order in iTunes.
    With the iPod on its own, the videos are in Alphabetical order and play that way all the time everytime.
    UPDATE:
    For some reason I NOW have an iTunes Videos playlist in Videos>Video Playlists and they are in the order I placed them.
    Thanks for your input.

  • CS6 Does not Crop the way I want to Crop

    It seems in previous versions of PS that when I wanted to crop a large photo just stored from the camera that all I had to do is select the Crop tool, select the size of the finished photo from the top line and then go inside the photo and drag the a rectangle around the portion of the photo I wanted to retain and it would end up, in this case as a 6x4 landscape photo. That is not the case in cs6. I get a photo that is 2x3 / 4x6 ratio in area but not in inchs. To get the actual 4x6 inch photo I need to go to Image and Size then input the inches which gave me the size with a very large pixel count. I was able to print but really not happy with the result. I tried the Classic version but it still did not do what I asked and still ended up going to Image > Size to enter the actual size of what I wanted in inches. Is there a way to just Crop a large photo to the actual inches I want with the Crop tool?
    Thanks so much, Richard

    When you type the size 4X6 it defaults to pixels just type 4in and 6in and photoshop will use inches instead of pixels. Once you get it the way you like, create a preset so you don't have to type the in after the size anymore.

  • Overflow:visible; not working the way i want.

    Hi,
    ok so i have a problem with using overflow. I have an large image that I want to overflow outside the normal 940px wrapper on either side. So far it is all displayed fine however, im left with a scroll bar at the bottom of the screen which allows me to scroll over to the right untill all the image is displayed. I want it to only be visible if a large res display is being used. So how can i keep al this but remove the x axis scrol function?
    here  is my code
    <div id="cinema-wrapper">
    <div id="cinema-displays"></div>
    </div>
    #cinema-wrapper {
              width:940px;
              height:764px;
    #cinema-displays {
              background-image: url(../mackbyte_files/img/cinema-bg.png);
              height: 764px;
              width: 3109px;
              background-repeat: no-repeat;
              position: absolute;
              left:50%;
              margin-left:-1554.5px;
              overflow:visible !important;
    thanks

    Is this what you are looking for?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style>
    body {
        width: 940px;
        margin: auto;
    html {
        background: url(http://www.pwaworldtour.com/fileadmin/user/main_editors/images/hi_res/ARUBA_2011/A11_fs_WOMEN/A11_fs_ARU91_1755.jpg) no-repeat center center;
    .content {
        background: white;
        padding: 20px;
    </style>
    </head>
    <body>
    <div class="content">
        <h1>Header</h1>
        <p>Whose worth's unknown, although his height be taken. Let me not to the marriage of true minds admit impediments; love is not love love's not time's fool, though rosy lips and cheeks. Oh, no, it is an ever fixed mark which alters when it alteration finds, it is the star to every wand'ring bark. Let me not to the marriage of true minds admit impediments; love is not love within his bending sickle's compass come.</p>
        <p>Love's not time's fool, though rosy lips and cheeks if this be error and upon me proved, oh, no, it is an ever fixed mark. Or bends with the remover to remove. Admit impediments; love is not love whose worth's unknown, although his height be taken.</p>
        <p>Within his bending sickle's compass come; which alters when it alteration finds, but bears it out even to the edge of doom. That looks on tempests and is never shaken; love's not time's fool, though rosy lips and cheeks I never writ, nor no man ever loved. If this be error and upon me proved, within his bending sickle's compass come; it is the star to every wand'ring bark.</p>
    </div>
    </body>
    </html>

  • Write some JAVA for me please, not working the way I wanted it too...

    Here's what I am getting when I go to run it:
    C:\Documents and Settings\Brad.HOME\Desktop\FINAL>java project1
    Usage: project1 [Array File Path]
    C:\Documents and Settings\Brad.HOME\Desktop\FINAL>
    What I need is for it to ask me to enter the location of the numbers file and then calculate the Max, Min, Mean, etc off of that file I enter in. Right now it just says:
    Usage: project1 [Array File Path]
    -------------------------------java below-------------------------------------------------
    import java.io.*;
    public class project1 {
    * Array File Path
    private String location;
    * set Location
    * @param location String
    public void setLocation(String location) {
    this.location = location;
    * Program initialization
    public project1() {
    int ar[] = new int[50];
    ReadFile(location, ar);
    sort(ar);
    System.out.println("Minimum= " + ar[0]);
    System.out.println("Maximum=" + ar[ar.length - 1]);
    System.out.println("Mean= " + mean(ar));
    System.out.println("Mode= " + modal(ar));
    System.out.println("Median= " + median(ar));
    System.out.println("Std Dev= " + stdDev(ar));
    * Main program
    * @param args String[]
    public static void main(String args[]) {
    if (args.length == 1) {
    new project1().setLocation(args[0]);
    else {
    System.out.println("Usage: project1 [Array File Path]");
    * Calculate the mean
    * @param ar int[]
    * @return double
    public double mean(int ar[]) {
    int sum = 0;
    for (int i = 0; i < ar.length; i++) {
    sum += ar;
    return (sum / ar.length);
    * Calculate the mode/modal
    * @param a int[]
    * @return int
    public int modal(int a[]) {
    int n;
    int freq = 0;
    int Mfreq = 0;
    int Mn = a[0];
    for (int i = 0; i < a.length; i++) {
    n = a[i];
    for (int j = 0; j < a.length; j++) {
         if (a[j] == n) {
         freq++;
    if (freq > Mfreq) {
         Mn = n;
    return Mn;
    * Calculate the median
    * @param a int[]
    * @return int
    public int median(int a[]) {
    if (a.length % 2 == 0) {
    int x = a[a.length / 2];
    int y = a[ (a.length + 2) / 2];
    return (x + y) / 2;
    else {
    return a[ (a.length + 1) / 2];
    * Calculate Standard Deviation
    * @param a int[]
    * @return double
    public double stdDev(int a[]) {
    int s2 = 0;
    int s = 0;
    for (int i = 0; i < a.length; i++) {
    s2 += (a[i] * a[i]);
    s += a[i];
    return Math.sqrt( (s2 - (s * 2) / a.length) / (a.length - 1));
    * Sort integer array
    * @param a int[]
    public void sort(int a[]) {
    int tmp;
    for (int i = 0; i < a.length; i++) {
    for (int j = 0; j < a.length; j++) {
         if (a[j] > a[j + 1]) {
         tmp = a[j];
         a[j] = a[j + 1];
         a[j + 1] = tmp;
    * Read integer array from specified file
    * @param filename String
    * @param ar int[]
    * @return int
    public int ReadFile(String filename, int ar[]) {
    File infile = new File(filename);
    int value, n = 0;
    try {
    BufferedReader reader = new BufferedReader(new FileReader(infile));
    String line = null;
    while ( (line = reader.readLine()) != null) {
         value = Integer.parseInt(line);
         ar[n++] = value;
    return n;
    catch (IOException e) {
    System.err.println("Problem reading input file!");
    System.exit(1);
    return n;

    Please use code tags when posting code. There is a
    button labeled code right above the text box
    where you type in your post.
    Your first problem occurs herepublic static
    void main(String args[]) {
    if (args.length == 1) {
    new project1().setLocation(args[0]);
    else {
    System.out.println("Usage: project1 [Array File
    y File Path]");
    }This code executes when you first launch the
    application. It checks to see if there were any
    arguments in the comman line. If the number of
    arguments is not equal to 1, then you get the Usage
    output. You must launch the program with one
    argument.I tried java project1 C:\\Temp.txt, but it still ends up with a NullException handler. I edited the code and added a catch for it so it returns File doesn't exist, but I swear it does and I'm pointing to it correctly...

  • Burning to Cd sends originals-modifieds not titled the way I want. newby

    How can i name the files and have them be labled after burning so they can be printed with the file name on back by my local lab. I just purchased the mac and when I burn the files to cd it burns the originals and modifieds. I want to give a client a CD with only modified photos on it # the way I need them. Help me please. I am a photographer, I love the mac but this is confusing.

    skphoto
    The best way to do this is to select the pics you want and use the File -> Export command. In the resulting dialogue you can specify the size of the pics (full size or otherwise) and the naming convention you want to use. (Filename or iPhoto title etc.)
    Regards
    TD

  • JCreator not working the way i want it.

    sorry for the catchy subject header...and my pre thanks for solution providers..
    PROBLEM I AM FACING:
    I am using JCreator pro and its intellisense is not working...I had previously installed JavaFX and then removed it...is it the side effect I am having ?
    MY NEXT PROBLEM:
    also i have copied java API docs to same folder as JDK ..now when i highlight the code and press F1 i don't get API doc for the highlighted keyword...instead a bookview is shown at the right corner.....what could be the problem...please explain the solution in a beginners tone..I am new to java...thank you very much once again..... :D

    Is this what you are looking for?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style>
    body {
        width: 940px;
        margin: auto;
    html {
        background: url(http://www.pwaworldtour.com/fileadmin/user/main_editors/images/hi_res/ARUBA_2011/A11_fs_WOMEN/A11_fs_ARU91_1755.jpg) no-repeat center center;
    .content {
        background: white;
        padding: 20px;
    </style>
    </head>
    <body>
    <div class="content">
        <h1>Header</h1>
        <p>Whose worth's unknown, although his height be taken. Let me not to the marriage of true minds admit impediments; love is not love love's not time's fool, though rosy lips and cheeks. Oh, no, it is an ever fixed mark which alters when it alteration finds, it is the star to every wand'ring bark. Let me not to the marriage of true minds admit impediments; love is not love within his bending sickle's compass come.</p>
        <p>Love's not time's fool, though rosy lips and cheeks if this be error and upon me proved, oh, no, it is an ever fixed mark. Or bends with the remover to remove. Admit impediments; love is not love whose worth's unknown, although his height be taken.</p>
        <p>Within his bending sickle's compass come; which alters when it alteration finds, but bears it out even to the edge of doom. That looks on tempests and is never shaken; love's not time's fool, though rosy lips and cheeks I never writ, nor no man ever loved. If this be error and upon me proved, within his bending sickle's compass come; it is the star to every wand'ring bark.</p>
    </div>
    </body>
    </html>

  • How can I get a refund for a product I don't want as its not performing the way I want it?

    How can I get a refund for a Mac APp store product I purchased which I dont want?

    Apple views sales as final. Have you contacted the developer about the issue that you have with the app?
    When the emailed receipt arrives you can start a conversation with iTunes/Mac App Store Support about a refund via the Report link.

  • Hello I buy apps and it's not working the way I want. So I need my full refund now

    Many times I purchase app for my iPhone it's all goin some of them it's not working  I need my full refund.

    See:
    Refunds from the App Store or iTunes - Apple Club

  • Key bindings not working (the way I want them to)

    Hey forum,
    Annoying problem.
    In the following program the key binding doesn't work. But if you add the line that is now commented out it does work. Why? and how do I make it work without that line?
    import java.awt.event.InputEvent;
    import java.awt.event.KeyEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.KeyStroke;
    public final class FrameMain extends JFrame implements WindowListener
      private JPanel main = new JPanel();
      public static void main(String[] args)
        new FrameMain();
      public FrameMain()
        super.setTitle("Test for actions");
        super.setLocation(300, 300);
        super.setSize(200, 200);
        super.addWindowListener(this);
        JButton button = new JButton("Boe");
        button.setAction(new ActionNew(this));
    //    this.main.add(button);
        this.main.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK, true), "ActionNew");
        this.main.getActionMap().put("ActionNew", new ActionNew(this));
        super.setContentPane(this.main);
        super.setVisible(true);
      public void windowClosing(final WindowEvent event)
        System.exit(0);
      public void windowIconified(final WindowEvent event)
      { /* nothing */ }
      public void windowOpened(final WindowEvent event)
      { /* nothing */ }
      public void windowClosed(final WindowEvent event)
      { /* nothing */ }
      public void windowDeiconified(final WindowEvent event)
      { /* nothing */ }
      public void windowActivated(final WindowEvent event)
      { /* nothing */ }
      public void windowDeactivated(final WindowEvent event)
      { /* nothing */ }
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.JOptionPane;
    class ActionNew extends AbstractAction
      private FrameMain parent = null;
      public ActionNew(FrameMain main)
        this.parent = main;
      public void actionPerformed(ActionEvent arg0)
        JOptionPane.showMessageDialog(parent, "Boe");
    }

    I found the bug. In my main program I serialized the KeyStrokes to file using xstream (http://xstream.codehaus.org/). This seemed to work fine, the files were written and read without error, the deserialized objects all existed and had the right settings (printing the same output with toString()). But apparently there is still a problem. I replaced the xstream code with ObjectOutputStream and ObjectInputStream and the bug disappeared.
    Too bad I can't use this library now, I really liked the XML.

  • Video not exporting the way I want

    Hello All,
    This must be something simple that I'm not doing.  In FCPX I go to the share menu and then I go into settings and I pick a video codec to save my video to.  I then export to a USB flash drive.  When I see the file stored on the USB flash drive it has stored it as a .mov file (no matter what codec I have picked and I have tried several just to test it).  So I thought that maybe a USB flash drive will only store a video file as a .mov so I tried saving my video files to my LaCie external hard drive.  Again I exported as a ProRes file and when I looked into my LaCie hard drive files it again saved the ProRes as a .mov file.
    What I'm I doing wrong?
    I know that ProRes files are huge but I was testing this all on a 1 minute clip.
    Thanks for your help.
    Mike

    Thanks Tom and Fox,
    OK, this is making more sense to me now.  I would like to save some video onto a USB flash drive.  I'm doing this so at a later date I cut edit it on FCPX.  What's the best codec to use without using a massive amount of GBs, but still retain quality?
    Thanks,
    Mike

  • HT1430 mail is not behaving the way it should after updating to ios 6.1.2

    after updating to ios6.1.2 on Saturday March 9, 2013 the mail is not operating the way it should. What can i do to try and fix it?

    Nobody here would know since you didn't explain in detail why it's not operating the way it should.

Maybe you are looking for

  • FI Business Content Infocubes

    Hi, I want to know which Infocubes in Business content are used for FI, CO, MM and SD typically in companies. I cannot get this realtime info from documentation..Please help. Thanks, Lalita Message was edited by: Lalita S

  • Problems with Keynotes

    Why can't I upload pdf documents to Keynotes on my PC

  • How to run Javadoc on more than one project

    In my web application, I have two projects: Model and ViewController. I want to run JavaDoc on both Model project and ViewController Project combined. But JDeveloper only allows me to run them separately. Is it possible to generate Javadoc for all th

  • Videos not showing Thumbnails

    Hi all, I am using Z10, today I was moving some of my media files from device memm to SD card & after that I deceided to move them back to device memm. And i accidently deleted some files from the SD card.  Now when i open the VIDEO option in my phon

  • Flash Player Keeps Needing to be uninstalled and reinstalled

    Hello, Starting in late December, I would go to watch a show on various websites and would be told that I needed to download Adobe Flash Player, despite having been able to watch shows on the same website shortly before.  I would look at my installed