Need Help on this Code Immediately

Hi Friends,
Iam very new to java.
I have a Java Code that iam trying to Run. The Code Compiles fine but it fails on its 3rd Loop where it is trying to Run a report.
I have the Code part that is errorring out. Can someone please look into the code and tell me if i need to make any changes to the Code.
The Code when Executed gives an Error "The Client Did Something Wrong".
Please Help Me!!!
      * Execute a report.
      *@param     path     This is the search path to the report.
      *@param     format     The array that contains the format options (PDF,HTML,etc...)
     public void executeReport(String path,String[] format)
          ParameterValue pv[] = new ParameterValue[]{};
          Option ro[] = new Option[3];
          RunOptionBoolean saveOutput = new RunOptionBoolean();
          RunOptionStringArray rosa = new RunOptionStringArray();
          RunOptionBoolean burstable = new RunOptionBoolean();
          // Define that the report to save the output.
          saveOutput.setName(RunOptionEnum.saveOutput);
          saveOutput.setValue(true);
          // What format do we want the report in: PDF? HTML? XML?
          rosa.setName(RunOptionEnum.outputFormat);
          rosa.setValue(format);
          // Define that the report can be burst.
          burstable.setName(RunOptionEnum.burst);
          burstable.setValue(true);
          // Fill the array with the run options.
          ro[0] = rosa;
          ro[1] = saveOutput;
          ro[2] = burstable;
          try
               SearchPathSingleObject spSingle = new SearchPathSingleObject();
               spSingle.setValue(path);
               // Get the initial response.
               AsynchReply res = reportService.run(spSingle,pv,ro);
               // If it has not yet completed, keep waiting until it is done.
               // In this case, we wait forever.
               while (res.getStatus() != AsynchReplyStatusEnum.complete && res.getStatus() != AsynchReplyStatusEnum.conversationComplete)
                    res = reportService.wait(res.getPrimaryRequest(), new ParameterValue[]{}, new Option[]{});
               reportService.release(res.getPrimaryRequest());
               // Return the final response.
          catch (Exception e)
               System.out.println(e);
     }

Guess I was too late. Sorry
Inestead of posting you need help on code immediately how about intest posting the particular topic that you are working on. It's quite doubtful that you would be here if you didn't have a question.

Similar Messages

  • I need help with this code error "unreachable statement"

    the error_
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errors
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    public class Tools//tool class
    private int numberOfToolItems;
    private ToolItems[] toolArray = new ToolItems[10];
    public Tools()//array of tool
    numberOfToolItems = 0;
    for(int i = 0; i < toolArray.length; i++)//for loop to create the array tools
    toolArray[i] = new ToolItems();
    }//end for loop
    }//end of array of tools
    public int search(int id)//search mehtod
    int index = 0;
    while (index < numberOfToolItems)//while and if loop search
    if(toolArray[index].getID() == id)
    return index;
    else
    index ++;
    }//en while and if loop
    return -1;
    }//end search method
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0;
    int index;
    index = search(id); <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    }//end delete method
    public void display()//display method
    for(int i = 0; i < numberOfToolItems; i++)
    //toolArray.display(g,y,x);
    }//end display method
    public String getRecord(int i)//get record method
    // return toolArray[i].getName()+ "ID: "+toolArray[i].getID()
    }//end getrecod
    }//end class
    Edited by: ladsoftware on Oct 9, 2009 6:08 AM
    Edited by: ladsoftware on Oct 9, 2009 6:09 AM
    Edited by: ladsoftware on Oct 9, 2009 6:10 AM
    Edited by: ladsoftware on Oct 9, 2009 6:11 AM

    ladsoftware wrote:
    Subject: Re: I need help with this code error "unreachable statement"
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errorsThe compiler is telling you exactly what the problems are:
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0; // <<== HERE you return, so everyting in the if block after this is unreachable
    int index;
    index = search(id);  //< -----------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    // <<== HERE where is the return statement?
    }//end delete method
    public String getRecord(int i)//get record method
    // return toolArray.getName()+ "ID: "+toolArray[i].getID() <<== HERE you commented out the return statement
    }//end getrecod
    }//end class

  • Noob needs help with this code...

    Hi,
    I found this code in a nice tutorial and I wanna make slight
    adjustments to the code.
    Unfortunately my Action Script skills are very limited... ;)
    This is the code for a 'sliding menue', depending on which
    button u pressed it will 'slide' to the appropriate picture.
    Here's the code:
    var currentPosition:Number = large_pics.pic1._x;
    var startFlag:Boolean = false;
    menuSlide = function (input:MovieClip) {
    if (startFlag == false) {
    startFlag = true;
    var finalDestination:Number = input._x;
    var distanceMoved:Number = 0;
    var distanceToMove:Number =
    Math.abs(finalDestination-currentPosition);
    var finalSpeed:Number = .2;
    var currentSpeed:Number = 0;
    var dir:Number = 1;
    if (currentPosition<=finalDestination) {
    dir = -1;
    } else if (currentPosition>finalDestination) {
    dir = 1;
    this.onEnterFrame = function() {
    currentSpeed =
    Math.round((distanceToMove-distanceMoved+1)*finalSpeed);
    distanceMoved += currentSpeed;
    large_pics._x += dir*currentSpeed;
    if (Math.abs(distanceMoved-distanceToMove)<=1) {
    large_pics._x =
    mask_pics._x-currentPosition+dir*distanceToMove;
    currentPosition = input._x;
    startFlag = false;
    delete this.onEnterFrame;
    b1.onRelease = function() {
    menuSlide(large_pics.pic1);
    b2.onRelease = function() {
    menuSlide(large_pics.pic2);
    b3.onRelease = function() {
    menuSlide(large_pics.pic3);
    b4.onRelease = function() {
    menuSlide(large_pics.pic4);
    I need to adjust five things in this code...
    (1) I want this menue to slide vertically not horizontally.
    I changed the 'x' values in the code to 'y' which I thought
    would make it move vertically, but it doesn't work...
    (2) Is it possible that, whatever the distance is, the
    "sliding" time is always 2.2 sec ?
    (3) I need to implement code that after the final position is
    reached, the timeline jumps to a certain movieclip to a certain
    label - depending on what button was pressed of course...
    I tried to implement this code for button number two...
    b2.onRelease = function() {
    menuSlide(large_pics.pic2);
    if (currentPosition = finalDestination) {
    this.large_pics.pic2.gotoAndPlay("s1");
    --> sliding still works but it doesn't jump to the
    appropriate label...
    (4) I wanna add 'Next' & 'Previous' buttons to the slide
    show - what would be the code in this case scenario ?
    My first thought was something like that Flash checks which
    'pic' movieclip it is showing right now (pic1, pic2, pic3 etc.) and
    depending on what button u pressed u go to the y value of movieclip
    'picX + 1' (Next button) or 'picX - 1' (Previous button)...
    Is that possible ?
    (5) After implementing the Next & Previous buttons I need
    to make sure that when it reached the last pic movieclip it will
    not go further on the y value - because there is no more pic
    movieclip.
    Options are to either slide back to movieclip 'pic1' or
    simply do nothing any more on the next button...
    I know this is probably Kindergarten for you, but I have only
    slight ideas how to do this and no code knowledge to back it up...
    haha
    Thanx a lot for your help in advance !
    Always a pleasure to learn from u guys... ;)
    Mike

    Hi,
    I made some progress with the code thanx to the help of
    Simon, but there are still 2 things that need to be addressed...
    (1) I want the sliding time always to be 2.2 sec...
    here's my approach to it - just a theory but it might work:
    we need a speed that changes dynamically depending on the
    distance we have to travel...
    I don't know if that applies for Action Scrip but I recall
    from 6th grade, that...
    speed = distance / time
    --> we got the time (which is always 2.2 sec)
    --> we got the disctance
    (currentposition-finaldestination)
    --> this should automatically change the speed to the
    appropriate value
    Unfortunately I have no clue how the action script would look
    like (like I said my action script skills are very limited)...
    (2) Also, one other thing I need that is not implemented yet,
    is that when the final destination is reached it jumps to a certain
    label inside a certain movieclip - every time different for each
    button pressed - something like:
    if (currentPosition = finalDestination) {
    this.large_pics.pic2.gotoAndPlay("s1");
    that statement just doesn't work when I put it right under
    the function for each button...
    Thanx again for taking the time !!!
    Mike

  • I need help in this code

    wazap guys ? long time not 2 see U :)
    i need help , this application that will follow is supposed to count the words lengths
    i.e if typed "I am poprage" the program will output :
    the word length the occurence
    1 1
    2 1
    3
    4
    5
    6
    7 1
    compile it & u will understand it.
    the problem is that it makes a table for each damen word
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class Application2 extends JFrame{
    private JLabel label;
    private JTextField field;
    private JTextArea area;
    private JScrollPane scroll;
    private int count;
    public Application2(){
    super("Application 2 / Word Length");
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
    label = new JLabel("Enter The Text Here");
    c.add(label);
    field = new JTextField(30);
    field.addActionListener(
    new ActionListener(){
    public void actionPerformed(ActionEvent e){
    StringTokenizer s = new StringTokenizer(e.getActionCommand());
    count = s.countTokens();
    while(s.hasMoreTokens()){
    count--;
    pop(s.nextToken());
    c.add(field);
    area = new JTextArea(10,30);
    area.setEditable(false);
    c.add(area);
    scroll = new JScrollPane(area);
    c.add(scroll);
    setSize(500,500);
    show();
    public void pop (String s){
    String poprage = "";
    int count1 = 0;
    int count2 = 0;
    int count3 = 0;
    int count4 = 0;
    int count5 = 0;
    int count6 = 0;
    int count7 = 0;
    int count8 = 0;
    int count9 = 0;
    int count10 = 0;
    int count11 = 0;
    int count12 = 0;
    int count13 = 0;
    int count14 = 0;
    int count15 = 0;
    int count16 = 0;
    int count17 = 0;
    int count18 = 0;
    int count19 = 0;
    int count20 = 0;
    int count21 = 0;
    int count22 = 0;
    int count23 = 0;
    int count24 = 0;
    int count25 = 0;
    for(int i = 0; i < s.length(); i++){
    if(s.length() == 1) count1 += 1;
    else if(s.length() == 2) count2 += 1;
    else if(s.length() == 3) count3 += 1;
    else if(s.length() == 4) count4 += 1;
    else if(s.length() == 5) count5 += 1;
    else if(s.length() == 6) count6 += 1;
    else if(s.length() == 7) count7 += 1;
    else if(s.length() == 8) count8 += 1;
    else if(s.length() == 9) count9 += 1;
    else if(s.length() == 10) count10 += 1;
    else if(s.length() == 11) count11 += 1;
    else if(s.length() == 12) count12 += 1;
    else if(s.length() == 13) count13 += 1;
    else if(s.length() == 14) count14 += 1;
    else if(s.length() == 15) count15 += 1;
    else if(s.length() == 16) count16 += 1;
    else if(s.length() == 17) count17 += 1;
    else if(s.length() == 18) count18 += 1;
    else if(s.length() == 19) count19 += 1;
    else if(s.length() == 20) count20 += 1;
    else if(s.length() == 21) count21 += 1;
    else if(s.length() == 22) count22 += 1;
    else if(s.length() == 23) count23 += 1;
    else if(s.length() == 24) count24 += 1;
    else if(s.length() == 25) count25 += 1;
    poprage += "The Length\t"+"The Occurence\n"+
    "1\t"+count1+"\n"+
    "2\t"+count2+"\n"+
    "3\t"+count3+"\n"+
    "4\t"+count4+"\n"+
    "5\t"+count5+"\n"+
    "6\t"+count6+"\n"+
    "7\t"+count7+"\n"+
    "8\t"+count8+"\n"+
    "9\t"+count9+"\n"+
    "10\t"+count10+"\n"+
    "11\t"+count11+"\n"+
    "12\t"+count12+"\n"+
    "13\t"+count13+"\n"+
    "14\t"+count14+"\n"+
    "15\t"+count15+"\n"+
    "16\t"+count16+"\n"+
    "17\t"+count17+"\n"+
    "18\t"+count18+"\n"+
    "19\t"+count19+"\n"+
    "20\t"+count20+"\n"+
    "21\t"+count21+"\n"+
    "22\t"+count22+"\n"+
    "23\t"+count23+"\n"+
    "24\t"+count24+"\n"+
    "25\t"+count25+"\n";
    area.append(poprage);
    public static void main (String ar[]){
    Application2 a = new Application2();
    a.addWindowListener(
    new WindowAdapter(){
    public void windowClosing( WindowEvent e ){
    System.exit(0);
    can any one fix it ???????
    REGARDS.

    Okay, so I took a look at it, where you are having the problem is that your pop() method not only updated the count variable, but then displays the result each time you call it. and since you call it in the loop, guess what it will give you a "table" for each "damen word"...
    Any way, I was bored enough to "fix" the program and included comments as to what I did and the relative "why"...
    So here goes...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class Application2 extends JFrame{
    private JLabel label;
    private JTextField field;
    private JTextArea area;
    private JScrollPane scroll;
    private int count;
    // moved these up here so that all methods in this class
    // can see and modify them, and more importantly so that they would not go
    // out of scope and end up zero'd out before we display the values
    // in the "table", once that done, then we can zero them out.
    // although an array would be better and easier to use... -MaxxDmg...
    private int count1 = 0;private int count2 = 0;
    private int count3 = 0;private int count4 = 0;
    private int count5 = 0;private int count6 = 0;
    private int count7 = 0;private int count8 = 0;
    private int count9 = 0;private int count10 = 0;
    private int count11 = 0;private int count12 = 0;
    private int count13 = 0;private int count14 = 0;
    private int count15 = 0;private int count16 = 0;
    private int count17 = 0;private int count18 = 0;
    private int count19 = 0;private int count20 = 0;
    private int count21 = 0;private int count22 = 0;
    private int count23 = 0;private int count24 = 0;
    private int count25 = 0;
    // end move int count variable declarations  - MaxxDmg...
    public Application2(){
    super("Application 2 / Word Length");
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
    label = new JLabel("Enter The Text Here");
    c.add(label);
    field = new JTextField(30);
    field.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
    String poprage = ""; // move this here, once pop() loop is done, then this string
    // will be constructed and displayed  - MaxxDmg...
    StringTokenizer s = new StringTokenizer(e.getActionCommand());
    count = s.countTokens();
    while(s.hasMoreTokens()){ // this is the "pop() loop" since it calls pop() to count the words - MaxxDmg...
    count--;
    pop(s.nextToken()); // runs pop which only increments the count variable as needed - MaxxDmg...
    }// end "pop() loop" - MaxxDmg...
    // string poprage constructed one pop() loop is done to display the proper results - MaxxDmg...
    poprage += "The Length\t"+"The Occurence\n"+"1\t"+count1+"\n"+
    "2\t"+count2+"\n" + "3\t"+count3+"\n" + "4\t"+count4+"\n" +
    "5\t"+count5+"\n" + "6\t"+count6+"\n" + "7\t"+count7+"\n" +
    "8\t"+count8+"\n" + "9\t"+count9+"\n" + "10\t"+count10+"\n" +
    "11\t"+count11+"\n" + "12\t"+count12+"\n" + "13\t"+count13+"\n" +
    "14\t"+count14+"\n" + "15\t"+count15+"\n" + "16\t"+count16+"\n" +
    "17\t"+count17+"\n" + "18\t"+count18+"\n" + "19\t"+count19+"\n" +
    "20\t"+count20+"\n" + "21\t"+count21+"\n" + "22\t"+count22+"\n"+
    "23\t"+count23+"\n" + "24\t"+count24+"\n" + "25\t"+count25+"\n";
    area.append(poprage);
    // end string construction and area update...  - MaxxDmg...
    // all int count variable set to 0 for next usage - MaxxDmg...
    count = 0;
    count1 = 0;count2 = 0;count3 = 0;count4 = 0;count5 = 0;
    count6 = 0;count7 = 0;count8 = 0;count9 = 0;count10 = 0;
    count11 = 0;count12 = 0;count13 = 0;count14 = 0;count15 = 0;
    count16 = 0;count17 = 0;count18 = 0;count19 = 0;count20 = 0;
    count21 = 0;count22 = 0;count23 = 0;count24 = 0;count25 = 0;
    // end count variable reset... - MaxxDmg...
    c.add(field);
    area = new JTextArea(10,30);
    area.setEditable(false);
    c.add(area);
    scroll = new JScrollPane(area);
    c.add(scroll);
    setSize(500,500);
    show();
    public void pop (String s){
    // now all this method does is increment the count variables - MaxxDmg...
    // which will eliminate the "making a table" for each "damen word" - MaxxDmg...
    if(s.length() == 1) count1 += 1;
    else if(s.length() == 2) count2 += 1;
    else if(s.length() == 3) count3 += 1;
    else if(s.length() == 4) count4 += 1;
    else if(s.length() == 5) count5 += 1;
    else if(s.length() == 6) count6 += 1;
    else if(s.length() == 7) count7 += 1;
    else if(s.length() == 8) count8 += 1;
    else if(s.length() == 9) count9 += 1;
    else if(s.length() == 10) count10 += 1;
    else if(s.length() == 11) count11 += 1;
    else if(s.length() == 12) count12 += 1;
    else if(s.length() == 13) count13 += 1;
    else if(s.length() == 14) count14 += 1;
    else if(s.length() == 15) count15 += 1;
    else if(s.length() == 16) count16 += 1;
    else if(s.length() == 17) count17 += 1;
    else if(s.length() == 18) count18 += 1;
    else if(s.length() == 19) count19 += 1;
    else if(s.length() == 20) count20 += 1;
    else if(s.length() == 21) count21 += 1;
    else if(s.length() == 22) count22 += 1;
    else if(s.length() == 23) count23 += 1;
    else if(s.length() == 24) count24 += 1;
    else if(s.length() == 25) count25 += 1;
    }// end modified pop() method - MaxxDmg...
    public static void main (String ar[]){
    Application2 a = new Application2();
    a.addWindowListener(
    new WindowAdapter(){
    public void windowClosing( WindowEvent e ){
    System.exit(0);
    }So read the comments, look at the code and compare it to the original. You will see why the original did not give you the results you wanted, while the fixed version will...
    - MaxxDmg...
    - ' He who never sleeps... '

  • Need help getting this code to work

    I am trying to get this code to work using "if else statment" but it will only do the first part and not do the second part in the else statement. Can anyone help me out? Here is the code:
    var R1 = this.getField("Registration Fees1");
    var R2 = this.getField("Registration Fees2");
    var R3 = this.getField("Registration Fees3");
    var R4 = this.getField("Registration Fees4");
    var R0 = 0
    if (R0 == 0)
      event.value = Math.floor(R1.value);
    else
      event.value = Math.floor(R2.value + R3.value + R4.value);
    I did notice that if I fiddled around this this part:
    if (R0 == 0)
    sometimes I can get the second part to work but not the first. I need it to do either or and this is getting frustrating.
    I might also not even need "var R0 = 0". I put that there for the condition part. If that is what is causing the problem, I can take it out. But then what would the condition be? For this form, the default is 0 and then the calculation follows by user clicking on different prices. The first part is if they want to pay for the full conference and the second part is if they want to pay for either Monday, Tuesday or Wednesday or 2 of the 3 days. Is it possible to get this to work with both parts together? I am still stuck on getting just one or the other working. Any help would be greatly appreciated. Thanks in advance.

    I have posted this on another message board and a user by the name of gkaiseril offered this solution but it hasn't worked either.
    // all four days
    var R1 = this.getField("Registration Fees1").value;
    // Monday
    var R2 = this.getField("Registration Fees2").value;
    // Tuesday
    var R3 = this.getField("Registration Fees3").value;
    // Wednesday
    var R4 = this.getField("Registration Fees4").value;
    var Fee = 0
    event.value = ''; // default value
    if (R1 != 'Off') {
      Fee = Number(R1) + Fee;
    } else {
      if(R2 != 'Off') {
         Fee = Number(Fee) + R2;
      if(R3 != 'Off') {
         Fee += Number(R3);
      if(R4 != 'Off') {
         Fee = Number(R4) + Fee;
    event.value = Fee;

  • I need help with this code

    Hello could any one tell me why this code is not writing to a file a i want to store what ever i enter in the applet a a file called applications.text
    Code:
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.applet.Applet.*;
    import javax.swing.border.*;
    public class ChinaTown5 extends JApplet
              implements ItemListener, ActionListener {
              private int foodIngrd1 = 0 ,foodIngrd2 = 0, foodIngrd3 = 0, foodIngrd4 = 0;
              private int foodIngrd5 = 0, foodIngrd6 = 0;                                    
              private JCheckBox hockey, football, swimming, golf, tennis, badminton;
              private String fName, lName, add, post_code, tel, url, datejoined,flag = "f1";
              private String value, converter, gender, sportType, show, sport, readData;
              private JRadioButton male, female;
              private JButton submit, clear, display;
              private DataInputStream receive;
              private DataOutputStream send;
              private String archive;
              Socket echoSocket = null;
    PrintWriter out = null;
    BufferedReader in = null;
              private JTextField joining_date;
              private JTextField textFName;
              private JTextField textLName;
              private JTextField telephone;
              private JTextField postcode;
              private JTextField address;
              private JTextField website;
              private JTextArea output,recieved;
              private double info = 0.0;
              private     ButtonGroup c;
              Socket Client ;
              public void init() {
                   JPanel main = new JPanel();     
                   JPanel info = new JPanel();
                   JPanel gender = new JPanel();
                   JPanel txt= new JPanel();
                   JPanel txtArea= new JPanel();
                   main.setLayout( new BorderLayout());
                   gender.setLayout(new GridLayout(1,2));
                   info.setLayout (new GridLayout(3,2 ));
                   txt.setLayout(new GridLayout(17,1));
                   txtArea.setLayout(new GridLayout(2,1));                                   
                   c = new ButtonGroup();
                   male = new JRadioButton("Male", false);
                   female = new JRadioButton("Female", false);
                   c.add(male);
                   c.add(female);
                   gender.add(male);
                   gender.add(female);
                   male.addItemListener(this);
                   female.addItemListener(this);
                   hockey = new JCheckBox ("Hockey");
                   info.add (hockey);
                   hockey.addItemListener (this);
                   football = new JCheckBox ("Football");
                   info.add (football);
                   football.addItemListener (this);
                   swimming = new JCheckBox ("Swimming");
                   info.add (swimming);
                   swimming.addItemListener (this);
                   tennis = new JCheckBox ("Tennis");
                   info.add (tennis);
                   tennis.addItemListener (this);
                   golf = new JCheckBox ("Golf");
                   info.add (golf);
                   golf.addItemListener (this);
                   badminton = new JCheckBox ("Badminton");
                   info.add (badminton);
                   badminton.addItemListener (this);
                   txt.add (new JLabel("First Name:"));
                   textFName = new JTextField(20);
                   txt.add("Center",textFName);
                   textFName.addActionListener (this);
                   txt.add (new JLabel("Last Name:"));
                   textLName = new JTextField(20);
                   txt.add("Center",textLName);
                   textLName.addActionListener (this);
                   txt.add (new JLabel("Telephone:"));
                   telephone = new JTextField(15);
                   txt.add("Center",telephone);
                   telephone.addActionListener (this);
                   txt.add (new JLabel("Date Joined:"));
                   joining_date = new JTextField(10);
                   txt.add("Center",joining_date);
                   joining_date.addActionListener (this);
                   txt.add (new JLabel("Address:"));
                   address = new JTextField(40);
                   txt.add("Center",address);
                   address.addActionListener (this);
                   txt.add (new JLabel("Postcode:"));
                   postcode = new JTextField(15);
                   txt.add("Center",postcode);
                   postcode.addActionListener (this);
                   txt.add (new JLabel("URL Address:"));
                   website = new JTextField(25);
                   txt.add("Center",website);
                   website.addActionListener (this);
                   output = new JTextArea( 15, 45);
                   output.setEditable( false );
                   output.setFont( new Font( "Arial", Font.BOLD, 12));
                   recieved = new JTextArea( 10, 40);
                   recieved .setEditable( false );
                   recieved .setFont( new Font( "Arial", Font.BOLD, 12));
                   txtArea.add(output);
                   txtArea.add(recieved);
                   submit = new JButton ("Submit Details");
                   submit.setEnabled(false);
                   info.add (submit);
                   submit.addActionListener(this);
                   clear = new JButton ("Clear Form");
                   clear.addActionListener(this);
                   info.add (clear);
                   display = new JButton ("Display");
                   display.addActionListener(this);
                   info.add (display);
                   EtchedBorder border = new EtchedBorder();
                   gender.setBorder(new TitledBorder(border,"Sex" ));
                   main.setBorder(new TitledBorder(border,"Computer Programmers Sports Club" ));
                   EtchedBorder border_sport = new EtchedBorder();
                   info.setBorder(new TitledBorder(border_sport," Select Preferred Sport(s)" ));
                   EtchedBorder border_info = new EtchedBorder();
                   txt.setBorder(new TitledBorder(border_info ," Personal Information" ));
                   EtchedBorder border_txtArea= new EtchedBorder();
                   txtArea.setBorder(new TitledBorder(border_info ," Registration Details" ));
                   main.add("North",txt);
                   main.add("West",gender);
                   main.add("East",info);
                   main.add("South",txtArea);
                   setContentPane(main);
              public void itemStateChanged (ItemEvent event) {
                   if (event.getItemSelectable() == male) {
                        gender = "Male";
                   else if (event.getItemSelectable() == female) {
                        gender = "Female";
                   if (event.getSource() == hockey) {
                             if (event.getStateChange() == ItemEvent.SELECTED) {
                                  sport = sport + hockey.getLabel() + " ";
                   else if (event.getSource() == golf) {
                             if (event.getStateChange() == ItemEvent.SELECTED) {
                                  sport = sport + golf.getLabel() + " ";
                   else if (event.getSource() == badminton) {
                             if (event.getStateChange() == ItemEvent.SELECTED) {
                                  sport = sport + badminton.getLabel() + " ";
                   else if (event.getSource() == swimming) {
                             if (event.getStateChange() == ItemEvent.SELECTED) {
                                  sport = sport + swimming.getLabel() + " ";
                   else if (event.getSource() == tennis) {
                             if (event.getStateChange() == ItemEvent.SELECTED) {
                                  sport = sport + tennis.getLabel() + " ";
                   else if (event.getSource() == football) {
                             if (event.getStateChange() == ItemEvent.SELECTED) {
                                  sport = sport + football.getLabel() + " ";
                   chkError();
                   repaint();
              public void chkError() {
                   if (gender != " " && sport != " " && fName != " " && lName != " "
                        && add != " " && post_code != " " && datejoined != " " ) {
                        submit.setEnabled(true);
              public void errMsg() {
                        JOptionPane.showMessageDialog( null, "Please Enter your Name and address and date joined and your sex");
                        show = (      "\n\t\t **************************************************" +
                                       "\n\t\t\t Error" +
                                       "\n\t\t **************************************************" +
                                       "\n\n\t Please Enter your Name and address and date joined and your sex");
                        output.setText( show );               
              public void displayDetails() {          
                   show = ( "\n\t\t **************************************************" +
                             "\n\t\t\t Registration Details" +
                             "\n\t\t **************************************************" +
                             "\n\t First Name:" + "\t" + fName +
                             "\n\t Last name: " + "\t" + lName +
                             "\n\t Sex:" + "\t" + gender +
                             "\n\t Tel No:" + "\t" + tel +
                             "\n\t Url Address:" + "\t" + url +
                             "\n\t Address:" + "\t" + add +
                             "\n\t Postcode:" + "\t" + post_code +
                             "\n\t Sport:" + "\t" + sport +
                             "\n\n\t\t\t Thank You For Registering" );
                   output.setText( show );
              public void LogFile() {
                   archive = ("\n\t First Name:" + "\t" + fName +
                             "\n\t Last name: " + "\t" + lName +
                             "\n\t Sex:" + "\t" + gender +
                             "\n\t Tel No:" + "\t" + tel +
                             "\n\t Url Address:" + "\t" + url +
                             "\n\t Address:" + "\t" + add +
                             "\n\t Postcode:" + "\t" + post_code +
                             "\n\t Sport:" + "\t" + sport);
                   try {
              BufferedWriter out = new BufferedWriter(new FileWriter("applications.txt"));
              out.write(archive);
              out.close();
              catch ( IOException e) {System.out.println("Exception: File Not Found");}
              public void actionPerformed (ActionEvent e){
                   if ( e.getSource() == submit) {
                        datejoined = joining_date.getText();
                        post_code = postcode.getText();
                        fName = textFName.getText();
                        lName = textLName.getText();
                        add = address.getText();
                        tel = telephone.getText();
                        url = website.getText();
                        if ( gender != " " && sport != " " && fName != " " && lName != " "
                        && add != " " && post_code != " " && datejoined != " " ) {     
                        LogFile();
                        displayDetails();
                        else { errMsg(); }
                   if (e.getSource() == display) {
                        try {
                             BufferedReader reader = new BufferedReader(new FileReader(new File("applications.txt")));
                             String readData;
                             while( (readData = reader.readLine()) != null ){     
                                  out.println(readData);
                                  recieved.setText(readData);
                        catch (IOException err) {System.err.println("Error: " + err);}          
                   if ( e.getSource() == clear ) {
                        badminton.setSelected(false);
                        swimming.setSelected(false);
                        football.setSelected(false);
                        tennis.setSelected(false);
                        hockey.setSelected(false);
                        golf.setSelected(false);
                        female.setSelected(false);
                        male.setSelected(false);
         textFName.setText(" ");
                        textLName.setText(" ");
                        address.setText(" ");
                        postcode.setText(" ");
                        telephone.setText(" ");
                        website.setText(" ");
                        joining_date.setText(" ");
                        output.setText(" ");
                        gender = " ";
                        sport = " ";
              repaint ();
    }

    Why isn't it writing to a file? Most likely because it's an applet and you haven't signed it. Applets are not allowed to access data on the client system like that.

  • Need help in this code snippet for split container

    Hi,
    I am using the following code to display two tables in report output.
    using cl_salv_table.
    =============================================================================================
    START-OF-SELECTION.
    DATA: lo_report TYPE REF TO lcl_test_class.
    * create report object
    CREATE OBJECT lo_report.
    * call methods
    lo_report->get_data( ).
    lo_report->process_data( ).
    lo_report->generate_output( ).
    METHOD generate_output.
    data: g_custom_container TYPE REF TO cl_gui_custom_container, "custom container
    g_splitter_container TYPE REF TO cl_gui_splitter_container, "splitter container
    g_top_container TYPE REF TO cl_gui_container, "top container
    g_bottom_container TYPE REF TO cl_gui_container, "bottom one
    g_display TYPE REF TO cl_salv_display_settings, " set display pattern
    g_slav_table TYPE REF TO cl_salv_table,
    g_table TYPE REF TO cl_salv_table.
    "create custom container placed in CUSTOM AREA defined on screen
    CREATE OBJECT g_custom_container
    EXPORTING
    container_name = 'CUSTOM_AREA'
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    "now split the container into two independent containers
    CREATE OBJECT g_splitter_container
    EXPORTING
    parent = g_custom_container
    rows = 2
    columns = 1
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    "get top container
    CALL METHOD g_splitter_container->get_container
    EXPORTING
    row = 1
    column = 1
    RECEIVING
    container = g_top_container.
    TRY.
    CALL METHOD cl_salv_table=>factory
    EXPORTING
    r_container = g_top_container
    IMPORTING
    r_salv_table = lr_table
    CHANGING
    t_table = gt_itab_header. "gt_itab_header is populated with required output columns in process_data( ) method
    CATCH cx_salv_msg.
    ENDTRY.
    g_display = g_table->get_display_settings( ).
    g_display->set_striped_pattern( cl_salv_display_settings=>true ).
    g_display->set_striped_pattern( cl_salv_display_settings=>true ).
    *... Display table
    g_table->display( ).
    ENDMETHOD.
    =============================================================================================
    <Added code tags>
    when I Execute the code, it still stay on selection screen does not display output table. If I comment out the lines
    EXPORTING
    r_container = g_top_container
    from the Method "cl_salv_table=>factory" the output is displayed with table in required format.
    Could someone help me out identifying what am I doing wrong.
    Thanks,
    Abhiram.
    Edited by: Suhas Saha on Jan 31, 2012 9:14 PM

    when I Execute the code, it still stay on selection screen does not display output table.
    You need to call the screen in which you have defined the custom container 'CUSTOM_AREA'. And you need to call the method generate_output( ) in the PBO of the screen.
    If I comment out the lines
    EXPORTING
    r_container = g_top_container
    from the Method "cl_salv_table=>factory" the output is displayed with table in required format.
    If you're removing the R_CONTAINER parameter, SALV framework displays the data in full-screen grid. Actually it uses REUSE_ALV_GRID_DISPLAY to display the data. Hence you are getting the data.
    To be honest i'll be surprised if you are getting the splitter container, can you confirm if you are getting it?
    BR,
    Suhas

  • Need Help with this code

    I am very new to java (just started today), and I am trying to do a mortgage calculator in java. I have a class file which I am using but when I try to compile it, I get the error message "Exception in thread "main" java.lang.NoClassDefFoundError: Mortgage Loan". I realize that this means I am missing a public static void somewhere (sounds like I know what I am talking about huh?) The problem is I don't know where to put it or even what to put in it. I got the code from another site and it seems to work fine there. Here is the code for the class file....any help anyone can offer will be greatly appreciated. thx
    import KJEgraph.*;
    import KJEgui.*;
    import java.applet.Applet;
    import java.awt.*;
    import java.io.PrintStream;
    public class MortgageLoan extends CalculatorApplet
    public MortgageLoan()
    RC = new MortgageLoanCalculation();
    cmbPREPAY_TYPE = new KJEChoice();
    lbLOAN_AMOUNT = new Label("");
    lbINTEREST_PAID = new Label("");
    lbTOTAL_OF_PAYMENTS = new Label("");
    lbMONTHLY_PI = new Label("");
    lbMONTHLY_PITI = new Label("");
    lbPREPAY_INTEREST_SAVINGS = new Label("");
    public double getPayment()
    calculate();
    return RC.MONTHLY_PI;
    public void initCalculatorApplet()
    tfINTEREST_RATE = new Nbr("INTEREST_RATE", "Interest rate", 1.0D, 25D, 3, 4, this);
    tfTERM = new Nbr("TERM", "Term", 0.0D, 30D, 0, 5, this);
    tfLOAN_AMOUNT = new Nbr("LOAN_AMOUNT", "Mortgage amount", 100D, 100000000D, 0, 3, this);
    tfPREPAY_STARTS_WITH = new Nbr("PREPAY_STARTS_WITH", "Start with payment", 0.0D, 360D, 0, 5, this);
    tfPREPAY_AMOUNT = new Nbr("PREPAY_AMOUNT", "Amount", 0.0D, 1000000D, 0, 3, this);
    if(getParameter("PAYMENT_PI") == null)
    tfPAYMENT_PI = new Nbr(0.0D, getParameter("MSG_PAYMENT_PI", "Payment"), 0.0D, 10000D, 0, 3);
    else
    tfPAYMENT_PI = new Nbr("PAYMENT_PI", "Payment", 0.0D, 10000D, 0, 3, this);
    tfYEARLY_PROPERTY_TAXES = new Nbr("YEARLY_PROPERTY_TAXES", "Annual property taxes", 0.0D, 100000D, 0, 3, this);
    tfYEARLY_HOME_INSURANCE = new Nbr("YEARLY_HOME_INSURANCE", "Annual home insurance", 0.0D, 100000D, 0, 3, this);
    super.nStack = 1;
    super.bUseNorth = false;
    super.bUseSouth = true;
    super.bUseWest = true;
    super.bUseEast = false;
    RC.PREPAY_NONE = getParameter("MSG_PREPAY_NONE", RC.PREPAY_NONE);
    RC.PREPAY_MONTHLY = getParameter("MSG_PREPAY_MONTHLY", RC.PREPAY_MONTHLY);
    RC.PREPAY_YEARLY = getParameter("MSG_PREPAY_YEARLY", RC.PREPAY_YEARLY);
    RC.PREPAY_ONETIME = getParameter("MSG_PREPAY_ONETIME", RC.PREPAY_ONETIME);
    RC.MSG_YEAR_NUMBER = getParameter("MSG_YEAR_NUMBER", RC.MSG_YEAR_NUMBER);
    RC.MSG_PRINCIPAL = getParameter("MSG_PRINCIPAL", RC.MSG_PRINCIPAL);
    RC.MSG_INTEREST = getParameter("MSG_INTEREST", RC.MSG_INTEREST);
    RC.MSG_PAYMENT_NUMBER = getParameter("MSG_PAYMENT_NUMBER", RC.MSG_PAYMENT_NUMBER);
    RC.MSG_PRINCIPAL_BALANCE = getParameter("MSG_PRINCIPAL_BALANCE", RC.MSG_PRINCIPAL_BALANCE);
    RC.MSG_PREPAYMENTS = getParameter("MSG_PREPAYMENTS", RC.MSG_PREPAYMENTS);
    RC.MSG_NORMAL_PAYMENTS = getParameter("MSG_NORMAL_PAYMENTS", RC.MSG_NORMAL_PAYMENTS);
    RC.MSG_PREPAY_MESSAGE = getParameter("MSG_PREPAY_MESSAGE", RC.MSG_PREPAY_MESSAGE);
    RC.MSG_RETURN_AMOUNT = getParameter("MSG_RETURN_AMOUNT", RC.MSG_RETURN_AMOUNT);
    RC.MSG_RETURN_PAYMENT = getParameter("MSG_RETURN_PAYMENT", RC.MSG_RETURN_PAYMENT);
    RC.MSG_GRAPH_COL1 = getParameter("MSG_GRAPH_COL1", RC.MSG_GRAPH_COL1);
    RC.MSG_GRAPH_COL2 = getParameter("MSG_GRAPH_COL2", RC.MSG_GRAPH_COL2);
    cmbPREPAY_TYPE.addItem(RC.PREPAY_NONE);
    cmbPREPAY_TYPE.addItem(RC.PREPAY_MONTHLY);
    cmbPREPAY_TYPE.addItem(RC.PREPAY_YEARLY);
    cmbPREPAY_TYPE.addItem(RC.PREPAY_ONETIME);
    cmbPREPAY_TYPE.select(getParameter("PREPAY_TYPE", RC.PREPAY_NONE));
    CheckboxGroup checkboxgroup = new CheckboxGroup();
    cbPRINCIPAL = new Checkbox(getParameter("MSG_CHKBOX_PRINCIPAL_BAL", "Principal balances"), checkboxgroup, true);
    cbAMTS_PAID = new Checkbox(getParameter("MSG_CHKBOX_TOTAL_PAYMENTS", "Total payments"), checkboxgroup, false);
    CheckboxGroup checkboxgroup1 = new CheckboxGroup();
    cbYEAR = new Checkbox(getParameter("MSG_CHKBOX_BY_YEAR", "Report amortization schedule by year"), checkboxgroup1, true);
    cbMONTH = new Checkbox(getParameter("MSG_CHKBOX_BY_MONTH", "Report amortization schedule by Month"), checkboxgroup1, false);
    cbYEAR.setBackground(getBackground());
    cbMONTH.setBackground(getBackground());
    setCalculation(RC);
    cmbTERM = getMortgageTermChoice(getParameter("TERM", 30));
    public void initPanels()
    DataPanel datapanel = new DataPanel();
    DataPanel datapanel1 = new DataPanel();
    DataPanel datapanel2 = new DataPanel();
    int i = 1;
    datapanel.setBackground(getColor(1));
    boolean flag = getParameter("SHOW_PITI", false);
    boolean flag1 = getParameter("SHOW_PREPAY", true);
    datapanel.addRow(new Label(" " + getParameter("MSG_LOAN_INFORMATION", "Loan Information") + super._COLON), getBoldFont(), i++);
    datapanel.addRow(tfLOAN_AMOUNT, getPlainFont(), i++);
    bAllTerms = getParameter("SHOW_ALLTERMS", false);
    if(bAllTerms)
    datapanel.addRow(tfTERM, getPlainFont(), i++);
    else
    datapanel.addRow(getParameter("MSG_TERM", "Term") + super._COLON, cmbTERM, getPlainFont(), i++);
    datapanel.addRow(tfINTEREST_RATE, getPlainFont(), i++);
    if(flag)
    datapanel.addRow(tfYEARLY_PROPERTY_TAXES, getPlainFont(), i++);
    datapanel.addRow(tfYEARLY_HOME_INSURANCE, getPlainFont(), i++);
    if(flag)
    datapanel.addRow(getParameter("MSG_MONTHLY_PAYMENT", "Monthly payment (PI)") + " " + super._COLON, lbMONTHLY_PI, getPlainFont(), i++);
    datapanel.addRow(getParameter("MSG_PITI", "Monthly payment (PITI)") + " " + super._COLON, lbMONTHLY_PITI, getPlainFont(), i++);
    } else
    datapanel.addRow(getParameter("MSG_MONTHLY_PAYMENT", "Monthly payment") + " " + super._COLON, lbMONTHLY_PI, getPlainFont(), i++);
    if(!flag || !flag1)
    datapanel.addRow(getParameter("MSG_TOTAL_PAYMENTS", "Total payments") + " " + super._COLON, lbTOTAL_OF_PAYMENTS, getPlainFont(), i++);
    datapanel.addRow(getParameter("MSG_TOTAL_INTEREST", "Total interest") + " " + super._COLON, lbINTEREST_PAID, getPlainFont(), i++);
    datapanel.addRow("", new Label(""), getTinyFont(), i++);
    if(flag1)
    datapanel.addRow(new Label(" " + getParameter("MSG_PREPAYMENTS", "Prepayments") + " " + super._COLON), getBoldFont(), i++);
    datapanel.addRow(getParameter("MSG_PREPAYMENT_TYPE", "Type") + " " + super._COLON, cmbPREPAY_TYPE, getPlainFont(), i++);
    datapanel.addRow(tfPREPAY_AMOUNT, getPlainFont(), i++);
    datapanel.addRow(tfPREPAY_STARTS_WITH, getPlainFont(), i++);
    datapanel.addRow(getParameter("MSG_PREPAYMENT_SAVINGS", "Savings") + " " + super._COLON, lbPREPAY_INTEREST_SAVINGS, getPlainFont(), i++);
    Panel panel = new Panel();
    panel.setBackground(getColor(1));
    panel.setLayout(new BorderLayout());
    panel.add("Center", datapanel);
    panel.add("East", new Label(""));
    cbPRINCIPAL.setBackground(getColor(2));
    cbAMTS_PAID.setBackground(getColor(2));
    datapanel2.setBackground(getColor(2));
    datapanel1.addRow("", cbYEAR, "", cbMONTH, getPlainFont(), 1);
    datapanel2.addRow("", cbPRINCIPAL, "", cbAMTS_PAID, getPlainFont(), 1);
    gGraph = new Graph(new GraphLine(), imageBackground());
    gGraph.FONT_TITLE = getGraphTitleFont();
    gGraph.FONT_BOLD = getBoldFont();
    gGraph.FONT_PLAIN = getPlainFont();
    gGraph.setBackground(getColor(2));
    gGraph.setForeground(getForeground());
    Panel panel1 = new Panel();
    panel1.setLayout(new BorderLayout());
    panel1.add("North", datapanel2);
    panel1.add("Center", gGraph);
    panel1.setBackground(getColor(2));
    addPanel(panel);
    addDataPanel(datapanel1);
    addPanel(panel1);
    public void refresh()
    gGraph._bUseTextImages = false;
    if(cbAMTS_PAID.getState())
    gGraph.setBackground(getColor(2));
    gGraph.removeAll();
    gGraph._legend.setVisible(true);
    gGraph._legend.setOrientation(14);
    gGraph._titleXAxis.setText("");
    gGraph._titleGraph.setText("");
    gGraph._axisX.setVisible(true);
    gGraph._axisY.setVisible(true);
    gGraph.setGraphType(new GraphStacked());
    gGraph.setGraphCatagories(RC.getAmountPaidCatagories());
    try
    gGraph.add(new GraphDataSeries(RC.DS_PRINCIPAL, RC.MSG_PRINCIPAL, getGraphColor(1)));
    gGraph.add(new GraphDataSeries(RC.DS_INTEREST, RC.MSG_INTEREST, getGraphColor(2)));
    gGraph._axisY._bAutoMinimum = false;
    gGraph._axisY._axisMinimum = 0.0F;
    gGraph._axisY._bAutoMaximum = false;
    gGraph._axisY._axisMaximum = (float)(RC.TOTAL_OF_PAYMENTS / (double)RC.iFactor2);
    catch(Exception _ex)
    System.out.println("Huh?");
    gGraph._titleYAxis.setText("");
    gGraph._titleGraph.setText(RC.getAmountLabel2());
    gGraph.dataChanged(true);
    } else
    gGraph.setBackground(getColor(2));
    gGraph.removeAll();
    gGraph._legend.setVisible(true);
    gGraph._legend.setOrientation(4);
    gGraph._titleXAxis.setText(RC.MSG_PAYMENT_NUMBER);
    gGraph._titleGraph.setText("");
    gGraph._titleYAxis.setText(RC.MSG_PRINCIPAL_BALANCE);
    gGraph._axisX.setVisible(true);
    gGraph._axisY.setVisible(true);
    gGraph.setGraphType(new GraphLine());
    gGraph.setGraphCatagories(RC.getCatagories());
    try
    if(cmbPREPAY_TYPE.getSelectedItem().equals(RC.PREPAY_NONE))
    gGraph.add(new GraphDataSeries(RC.DS_PRINCIPAL_BAL, RC.MSG_NORMAL_PAYMENTS, getGraphColor(1)));
    } else
    gGraph.add(new GraphDataSeries(RC.DS_PREPAY_PRINCIPAL_BAL, RC.MSG_PREPAYMENTS, getGraphColor(2)));
    gGraph.add(new GraphDataSeries(RC.DS_PRINCIPAL_BAL, RC.MSG_NORMAL_PAYMENTS, getGraphColor(1)));
    gGraph._axisY._bAutoMinimum = false;
    gGraph._axisY._bAutoMaximum = true;
    gGraph._axisY._axisMinimum = 0.0F;
    catch(Exception _ex)
    System.out.println("Huh?");
    gGraph._titleYAxis.setText(RC.getAmountLabel());
    gGraph._titleGraph.setText("");
    gGraph.dataChanged(true);
    gGraph._titleXAxis.setText(RC.MSG_YEAR_NUMBER);
    lbMONTHLY_PITI.setText(Fmt.dollars(RC.MONTHLY_PITI, 2));
    lbMONTHLY_PI.setText(Fmt.dollars(RC.MONTHLY_PI, 2));
    lbLOAN_AMOUNT.setText(Fmt.dollars(RC.LOAN_AMOUNT));
    lbTOTAL_OF_PAYMENTS.setText(Fmt.dollars(RC.PREPAY_TOTAL_OF_PAYMENTS, 2));
    lbINTEREST_PAID.setText(Fmt.dollars(RC.PREPAY_INTEREST_PAID, 2));
    lbPREPAY_INTEREST_SAVINGS.setText(Fmt.dollars(RC.PREPAY_INTEREST_SAVINGS, 2));
    setTitle("Fixed Mortgage Loan Calculator");
    public void setValues()
    throws NumberFormatException
    RC.PREPAY_TYPE = cmbPREPAY_TYPE.getSelectedItem();
    RC.PREPAY_AMOUNT = tfPREPAY_AMOUNT.toDouble();
    RC.PREPAY_STARTS_WITH = tfPREPAY_STARTS_WITH.toDouble();
    RC.INTEREST_RATE = tfINTEREST_RATE.toDouble();
    RC.YEARLY_PROPERTY_TAXES = tfYEARLY_PROPERTY_TAXES.toDouble();
    RC.YEARLY_HOME_INSURANCE = tfYEARLY_HOME_INSURANCE.toDouble();
    if(bAllTerms)
    RC.TERM = (int)tfTERM.toDouble();
    else
    RC.TERM = getMortgageTerm(cmbTERM);
    RC.LOAN_AMOUNT = tfLOAN_AMOUNT.toDouble();
    if(cbYEAR.getState())
    RC.BY_YEAR = 1;
    else
    RC.BY_YEAR = 0;
    RC.MONTHLY_PI = tfPAYMENT_PI.toDouble();
    if(RC.MONTHLY_PI > 0.0D)
    RC.PAYMENT_CALC = 0;
    else
    RC.PAYMENT_CALC = 1;
    MortgageLoanCalculation RC;
    Nbr tfINTEREST_RATE;
    Choice cmbTERM;
    Nbr tfTERM;
    boolean bAllTerms;
    Nbr tfLOAN_AMOUNT;
    Nbr tfPREPAY_AMOUNT;
    Nbr tfPREPAY_STARTS_WITH;
    Nbr tfPAYMENT_PI;
    Nbr tfYEARLY_PROPERTY_TAXES;
    Nbr tfYEARLY_HOME_INSURANCE;
    KJEChoice cmbPREPAY_TYPE;
    Label lbLOAN_AMOUNT;
    Label lbINTEREST_PAID;
    Label lbTOTAL_OF_PAYMENTS;
    Label lbMONTHLY_PI;
    Label lbMONTHLY_PITI;
    Label lbPREPAY_INTEREST_SAVINGS;
    Checkbox cbPRINCIPAL;
    Checkbox cbAMTS_PAID;
    Graph gGraph;
    Checkbox cbYEAR;
    Checkbox cbMONTH;
    }

    There are imports that aren't available to us, so no. nobody probaly can. Of course maybe someon could be bothered going through all of your code, and may spot some mistake. But I doubt they will since you didn't bother to use [c[b]ode] tags.

  • I need help with this code involving making stuff in safari appear the same in internet explorer

    In the Preview mode, Safari shows it the way I want it too
    look, but when I go to view it on Internet Explorer, the window
    look blank. When I check the 'veiw source code' for it it shows all
    the codes I have for it. I'm guessing because I'm using positioning
    in CSS and HTML its not aligning right in explorer. But I heard
    from one of my friends that there is a code that somehow makes it
    so that the webpage looks the same for safari and internet
    explorer. He said he didn't know the code, and I've can't find it
    on the web so far, so maybe somebody here knows what I'm talking
    about? He said all I had to do is enter the code in the code panel
    and it should work.

    Looks like you did not close the JavaScript comments on the
    portfolio page:
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr;
    for(i=0;a&&i<a.length&&(x=a
    )&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new
    Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
    i<a.length; i++)
    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image;
    d.MM_p[j++].src=a
    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document;
    if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for
    (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++)
    x=MM_findObj(n,d.layers
    .document);
    if(!x && d.getElementById) x=d.getElementById(n);
    return x;
    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new
    Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x;
    if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    </script>
    Try adding the closing comment just above the closing
    </script> tag, like this:
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr;
    for(i=0;a&&i<a.length&&(x=a
    )&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new
    Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
    i<a.length; i++)
    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image;
    d.MM_p[j++].src=a
    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document;
    if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for
    (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++)
    x=MM_findObj(n,d.layers
    .document);
    if(!x && d.getElementById) x=d.getElementById(n);
    return x;
    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new
    Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x;
    if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    Ken Ford
    Adobe Community Expert
    Fordwebs, LLC
    http://www.fordwebs.com
    "SCathey" <[email protected]> wrote in
    message news:[email protected]...
    >
    http://myweb.usf.edu/~scathey/
    Theres the link. The home, resume, and bio page
    > seems to work fine, but when I check the portfollio
    page, thats when it turns
    > blank in internet explorer. I used a javascript slide
    show code for those
    > pages, but I used a similar code like that and I had no
    previous problems. I
    > just want to know if there is a code that allows the
    codes to work the same in
    > all browsers.
    >

  • Need help with this code in iWeb

    Trying to get the following widget code to run in my sons fundraising website. Isn't working. I have tried coping and pasting the following into 'HTML snippet' on iWeb. No joy.
    Any ideas?
    Loader Script:
    <script>(function() {
              var d = document, fr = d.createElement('script'); fr.type = 'text/javascript'; fr.async = true;
              fr.src = ((d.location.protocol.indexOf('https') == 0)? 'https://s-' : 'http://') + 'static.fundrazr.com/widgets/loader.js';
              var s = d.getElementsByTagName('script')[0]; s.parentNode.insertBefore(fr, s);
    })();</script>
    Widget Code:
    <div class="fr-widget" data-type="badge" data-variant="wide" data-width="400" data-url="http://fnd.us/c/9apzf"></div>

    Copy pasting the code did not work. Had to re-type it.
    The code does work, but there's an overlay on the page to make a donation.
    The overlay only appears in the widget markup file, not on the main page.
    So we had to find a solution.
    Here's how to do it :
    http://home.wyodor.net/demoos/fundraiser/fundraiser.html
    No guarantees, no donations.

  • Need help regrding this code

    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    [javac] D:\Program Files\HP OpenView\nonOV\tomcat\work\Standalone\localhost\ovportal\jsp\security\obs_login_html_jsp.java:7: package org.ticker does not exist
    [javac] import org.ticker.*;
    [javac] ^
    [javac] D:\Program Files\HP OpenView\nonOV\tomcat\work\Standalone\localhost\ovportal\jsp\security\obs_login_html_jsp.java:66: cannot resolve symbol
    [javac] symbol : class readMsg
    [javac] location: class org.apache.jsp.obs_login_html_jsp
    [javac] readMsg msg=new readMsg();
    [javac] ^
    [javac] D:\Program Files\HP OpenView\nonOV\tomcat\work\Standalone\localhost\ovportal\jsp\security\obs_login_html_jsp.java:66: cannot resolve symbol
    [javac] symbol : class readMsg
    [javac] location: class org.apache.jsp.obs_login_html_jsp
    [javac] readMsg msg=new readMsg();
    [javac] ^
    [javac] 3 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
         at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
         at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:534)
    Apache Tomcat/4.1.24-LE-jdk14
    package org.apache.jsp;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    import org.apache.jasper.runtime.*;
    import org.ticker.*;
    import com.hp.ov.ui.client.common.util.TimeZoneUtils;
    import com.hp.ov.obs.rep.IRepositoryObject;
    import com.hp.ifc.rep.AppTimeZoneInfo;
    public class obs_login_html_jsp extends HttpJspBase {
    final static String portalTitle = "HP OpenView Web Console";
    final static String resourceBundle = "login";
    final static String login = "Login";
    final static String prompt = "Please enter your user name and password";
    final static String userName = "User name:";
    final static String password = "Password:";
    final static String timeZone = "Timezone:";
    final static String userDefaultTZ = "User Default";
    private String getLocalizedString(HttpServletRequest request, String name, String text)
    com.hp.ov.portal.util.OVResourceBundle bundle = com.hp.ov.portal.util.OVResourceBundle.getBundle(request, name, true);
    return bundle.getString(text);
    private static java.util.Vector jspxincludes;
    public java.util.List getIncludes() {
    return jspxincludes;
    public void _jspService(HttpServletRequest request, HttpServletResponse response)
    throws java.io.IOException, ServletException {
    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter jspxout = null;
    try {
    _jspxFactory = JspFactory.getDefaultFactory();
    response.setContentType("text/html; charset=UTF-8");
    pageContext = _jspxFactory.getPageContext(this, request, response,
                   null, true, 8192, true);
    application = pageContext.getServletContext();
    config = pageContext.getServletConfig();
    session = pageContext.getSession();
    out = pageContext.getOut();
    jspxout = out;
    out.write("\n\n\n");
    out.write("\n\n");
    com.hp.ov.portal.security.LoginErrorMsg error_msg = null;
    synchronized (session) {
    error_msg = (com.hp.ov.portal.security.LoginErrorMsg) pageContext.getAttribute("error_msg", PageContext.SESSION_SCOPE);
    if (error_msg == null){
    try {
    error_msg = (com.hp.ov.portal.security.LoginErrorMsg) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.hp.ov.portal.security.LoginErrorMsg");
    } catch (ClassNotFoundException exc) {
    throw new InstantiationException(exc.getMessage());
    } catch (Exception exc) {
    throw new ServletException("Cannot create bean of class " + "com.hp.ov.portal.security.LoginErrorMsg", exc);
    pageContext.setAttribute("error_msg", error_msg, PageContext.SESSION_SCOPE);
    out.write("\n\n");
    out.write("<html>\n");
    out.write("<head>\n ");
    out.write("<title>");
    out.print(getLocalizedString(request,resourceBundle,portalTitle));
    out.write(" - ");
    out.print(getLocalizedString(request,resourceBundle,login));
    out.write("</title>\n ");
    out.write("<link rel='stylesheet' type='text/css' href='/OvSipDocs/Skins/Chrome/Chrome.css' />\n ");
    out.write("<script language=\"JavaScript\" type=\"text/javascript\">\n");
    out.write("<!--\n function nsubmit() {\n document.pwform.J_PASSWORD.focus();\n return false;\n }\n\n function pwsubmit() {\n document.pwform.J_USERNAME.value = document.nform.J_USERNAME.value;\n return true;\n }\n//-->\n ");
    out.write("</script>\n");
    out.write("</head>\n\n");
    out.write("<body bgcolor=\"white\" text=\"black\" onload='document.nform.J_USERNAME.focus()'>\n ");
    out.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n ");
    out.write("<tr bgcolor=\"darkblue\">\n ");
    out.write("<td>\n\t ");
    out.write("<font color=\"white\">\n\t ");
    out.write("<b> ");
    out.print(getLocalizedString(request,resourceBundle,portalTitle));
    out.write("</b>\n\t ");
    out.write("</font>\n\t ");
    out.write("</td>\n ");
    out.write("</tr>\n ");
    out.write("</table>\n ");
    out.write("<br/>\n\n ");
    out.write("<table border='0' cellspacing='0' cellpadding='0' class='paneltable' width='45%'>\n ");
    out.write("<tr>\n ");
    out.write("<td class='paneltopleftround'>");
    out.write("<img src='/OvSipDocs/C/images/framework/clear.gif' width='24' height='10'/>");
    out.write("</td>\n ");
    out.write("<td class='paneltopround'>");
    out.write("<img src='/OvSipDocs/C/images/framework/clear.gif' height='10'/>");
    out.write("</td>\n ");
    out.write("<td class='paneltoprightround'>");
    out.write("<img src='/OvSipDocs/C/images/framework/clear.gif' width='24' height='10'/>");
    out.write("</td>\n ");
    out.write("</tr>\n\n ");
    out.write("<tr>\n ");
    out.write("<td class='panelleft'> ");
    out.write("</td>\n ");
    out.write("<td class='panel'>\n ");
    out.write("<table>\n ");
    out.write("<tr >\n ");
    out.write("<td nowrap>\n ");
    out.write("<font color='black'>\n\n ");
    String message = error_msg.getErrorMsg();
    if (message != null) {
    out.println("<h2>" message "</h2>");
    out.write("\n\n ");
    out.write("<h2>");
    out.print(getLocalizedString(request,resourceBundle,prompt));
    out.write("</h2>\n ");
    out.write("</font>\n ");
    out.write("</td>\n ");
    out.write("</tr>\n ");
    out.write("<tr >\n ");
    out.write("<td>\n\n ");
    out.write("<form name=\"nform\" action=\"");
    out.print(request.getContextPath());
    out.write("/\" onsubmit=\"return nsubmit()\" method=\"post\">\n ");
    out.write("<table>\n ");
    out.write("<tr>\n ");
    out.write("<td>");
    out.print(getLocalizedString(request,resourceBundle,userName));
    out.write("</td>\n ");
    out.write("<td>");
    out.write("<input type=\"text\" name=\"J_USERNAME\" size=\"30\"/>");
    out.write("</td>");
    out.write("</tr>\n ");
    out.write("<script language=\"JavaScript\" type=\"text/javascript\">\n");
    out.write("<!--\n document.write('");
    out.write("<\\/form>");
    out.write("<form name=\"pwform\" action=\"");
    out.print(request.getContextPath());
    out.write("/\" onSubmit=\"return pwsubmit()\" method=\"post\">')\n//-->\n ");
    out.write("</script>\n ");
    out.write("<input type=\"hidden\" name=\"J_USERNAME\" value=\"\" />\n ");
    out.write("<tr>\n ");
    out.write("<td>");
    out.print(getLocalizedString(request,resourceBundle,password));
    out.write("</td>\n ");
    out.write("<td>");
    out.write("<input type=\"password\" name=\"J_PASSWORD\" size=\"30\"/>");
    out.write("</td>\n ");
    out.write("</tr>\n ");
    AppTimeZoneInfo tzis[] = TimeZoneUtils.getTimeZones();
    if (tzis != null) {
    out.write("\n ");
    out.write("<tr>\n ");
    out.write("<td>");
    out.print(getLocalizedString(request,resourceBundle,timeZone));
    out.write("</td>\n ");
    out.write("<td>\n ");
    out.write("<select name=\"Timezone\">\n ");
    out.write("<option selected=\"true\" value=\"\">");
    out.print(userDefaultTZ);
    out.write("</option>\n ");
    for (int i = 0; i < tzis.length; i++) {
    AppTimeZoneInfo tzi = (AppTimeZoneInfo) tzis;
    if (tzi.getAdd()) {
    //if (tzi.enabled()) { //588 does no support enabled for timezones
    String timeZoneShortName = tzi.getShortName();
    String timeZoneInfo = TimeZoneUtils.buildTextTimeZone(tzi, false);
    out.write("\n ");
    out.write("<option value=\"");
    out.print(timeZoneShortName);
    out.write("\">");
    out.print(timeZoneInfo);
    out.write("</option>\n ");
    out.write("\n ");
    out.write("</select>\n ");
    out.write("</td>\n ");
    out.write("</tr>\n ");
    out.write("\n ");
    out.write("<tr>\n ");
    out.write("<td>");
    out.write("<input type=\"submit\" value=\"");
    out.print(getLocalizedString(request,resourceBundle,login));
    out.write("\"/>");
    out.write("</td>\n ");
    out.write("</tr>\n ");
    out.write("</table>\n ");
    out.write("</form>\n ");
    out.write("</td>\n ");
    out.write("</tr>\n ");
    out.write("</table>\n\n ");
    out.write("</td>\n ");
    out.write("<td class='panelright'> ");
    out.write("</td>\n ");
    out.write("</tr>\n\n ");
    out.write("<tr>\n ");
    out.write("<td class='panelbottomleft'>");
    out.write("<img src='/OvSipDocs/C/images/framework/clear.gif' width='24' height='17'/>");
    out.write("</td>\n ");
    out.write("<td class='panelbottom'> ");
    out.write("</td>\n ");
    out.write("<td class='panelbottomright'>");
    out.write("<img src='/OvSipDocs/C/images/framework/clear.gif' width='24' height='17'/>");
    out.write("</td>\n ");
    out.write("</tr>\n ");
    out.write("</table>\n\n");
    out.write("</body>\n");
    out.write("</html>\n");
    } catch (Throwable t) {
    out = jspxout;
    if (out != null && out.getBufferSize() != 0)
    out.clearBuffer();
    if (pageContext != null) pageContext.handlePageException(t);
    } finally {
    if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    and
    obs_login_html.jsp//
    <%@ page import="org.ticker.*"%>
    <%@ page language="java"
    contentType="text/html; charset=UTF-8"
    session="true"
    import="com.hp.ov.ui.client.common.util.TimeZoneUtils,
    com.hp.ov.obs.rep.IRepositoryObject,
    com.hp.ifc.rep.AppTimeZoneInfo"
    %>
    <%
    readMsg msg=new readMsg();
    String strMessage=msg.sendMsg();
    %>
    <%!
    final static String portalTitle = "K-C Self-Service HelpDesk";
    final static String portalTitle1 = " ***If it is an URGENT call, please call the Service Desk ***";
    final static String portalTitle2 = " ***If you are ITS or use the full client, do not use this portal ***";
    final static String resourceBundle = "login";
    final static String login = "Login";
    final static String prompt = "Please enter your user name and password";
    final static String userName = "User name:";
    final static String password = "Password:";
    final static String timeZone = "Timezone:";
    final static String userDefaultTZ = "User Default";
    private String getLocalizedString(HttpServletRequest request, String name, String text)
    com.hp.ov.portal.util.OVResourceBundle bundle = com.hp.ov.portal.util.OVResourceBundle.getBundle(request, name, true);
    return bundle.getString(text);
    %>
    <jsp:useBean id="error_msg" scope="session"
    class="com.hp.ov.portal.security.LoginErrorMsg" />
    <html>
    <head>
    <title><%=getLocalizedString(request,resourceBundle,portalTitle)%> - <%=getLocalizedString(request,resourceBundle,portalTitle)%> -<%=getLocalizedString(request,resourceBundle,portalTitle)%>- <%=getLocalizedString(request,resourceBundle,login)%></title>
    <link rel='stylesheet' type='text/css' href='/OvSipDocs/Skins/Chrome/Chrome.css' />
    <script language="JavaScript" type="text/javascript">
    <!--
    function nsubmit() {
    document.pwform.J_PASSWORD.focus();
    return false;
    function pwsubmit() {
    document.pwform.J_USERNAME.value = document.nform.J_USERNAME.value;
              return true;
    //-->
    </script>
    </head>
    <body bgcolor="white" text="black" onload='document.nform.J_USERNAME.focus()'>
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr bgcolor="darkblue">
    <td>
         <font color="white">
         <b> <%=getLocalizedString(request,resourceBundle,portalTitle)%></b>
         </font>
         </td>
    </tr>
    </table>
    <br>
    <table cellpadding="0" cellspacing="0" border="0" width="55%">
    <tr bgcolor="white">
    <td>
         <font color="red" size="4">
         <b> <%=getLocalizedString(request,resourceBundle,portalTitle1)%></b>
         </font>
         </td>
    </tr>
    </table>
    <br>
    <table cellpadding="0" cellspacing="0" border="0" width="55%">
    <tr bgcolor="white">
    <td>
         <font color="red" size="4">
         <b> <%=getLocalizedString(request,resourceBundle,portalTitle2)%></b>
         </font>
         </td>
    </tr>
    </table>
    <br>
    <br>
    <br>
    <table border='0' cellspacing='0' cellpadding='0' class='paneltable' width='45%'>
    <tr>
    <td class='paneltopleftround'><img src='/OvSipDocs/C/images/framework/clear.gif' width='24' height='10'/></td>
    <td class='paneltopround'><img src='/OvSipDocs/C/images/framework/clear.gif' height='10'/></td>
    <td class='paneltoprightround'><img src='/OvSipDocs/C/images/framework/clear.gif' width='24' height='10'/></td>
    </tr>
    <tr>
    <td class='panelleft'> </td>
    <td class='panel'>
    <table>
    <tr >
    <td nowrap>
    <font color='black'>
    <%
    String message = error_msg.getErrorMsg();
    if (message != null) {
    out.println("<h2>" message "</h2>");
    %>
    <h2><%=getLocalizedString(request,resourceBundle,prompt)%></h2>
    </font>
    </td>
    </tr>
    <tr >
    <td>
    <form name="nform" action="<%=request.getContextPath()%>/" onsubmit="return nsubmit()" method="post">
    <table>
    <tr>
    <td><%=getLocalizedString(request,resourceBundle,userName)%></td>
    <td><input type="text" name="J_USERNAME" size="30"/></td></tr>
    <script language="JavaScript" type="text/javascript">
    <!--
    document.write('<\/form><form name="pwform" action="<%=request.getContextPath()%>/" onSubmit="return pwsubmit()" method="post">')
    //-->
    </script>
    <input type="hidden" name="J_USERNAME" value="" />
    <tr>
    <td><%=getLocalizedString(request,resourceBundle,password)%></td>
    <td><input type="password" name="J_PASSWORD" size="30"/></td>
    </tr>
    <%
    AppTimeZoneInfo tzis[] = TimeZoneUtils.getTimeZones();
    if (tzis != null) {
    %>
    <tr>
    <td><%=getLocalizedString(request,resourceBundle,timeZone)%></td>
    <td>
    <select name="Timezone">
    <option selected="true" value=""><%=userDefaultTZ%></option>
    <%
    for (int i = 0; i < tzis.length; i++) {
    AppTimeZoneInfo tzi = (AppTimeZoneInfo) tzis[i];
    if (tzi.getAdd()) {
    //if (tzi.enabled()) { //588 does no support enabled for timezones
    String timeZoneShortName = tzi.getShortName();
    String timeZoneInfo = TimeZoneUtils.buildTextTimeZone(tzi, false);
    %>
    <option value="<%=timeZoneShortName%>"><%=timeZoneInfo%></option>
    <%
    %>
    </select>
    </td>
    </tr>
    <%
    %>
    <tr>
    <td><input type="submit" value="<%=getLocalizedString(request,resourceBundle,login)%>"/></td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    </table>
    </td>
    <td class='panelright'> </td>
    </tr>
    <tr>
    <td class='panelbottomleft'><img src='/OvSipDocs/C/images/framework/clear.gif' width='24' height='17'/></td>
    <td class='panelbottom'> </td>
    <td class='panelbottomright'><img src='/OvSipDocs/C/images/framework/clear.gif' width='24' height='17'/></td>
    </tr>
    </table>
    <table>
    <tr bgcolor="darkblue">
         <font color=white face="Verdana">
    <script language="JavaScript1.2">
    //Response.Write("hello")
    </script>
    <script language="JavaScript1.2">
    //Specify the marquee's width (in pixels)
    screenSize = screen.availWidth;
    var marqueewidth = screenSize + "px"
    //Specify the marquee's height
    var marqueeheight="25px"
    //Specify the marquee's marquee speed (larger is faster 1-10)
    //var marqueespeed=2
    var marqueespeed=4
    //configure background color:
    var marqueebgcolor="rgb(0,128,192)"
    //Pause marquee onMousever (0=no. 1=yes)?
    var pauseit=1
    myMesg='<NOBR>****Welcome to K-C Self-Service HelpDesk Site****All K-C ITS users are requested to use HP Service Desk 4.5 Desktop Client Application to create / manage tickets****</NOBR>';
    var marqueecontent=myMesg
    marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
    var copyspeed=marqueespeed
    var pausespeed=(pauseit==0)? copyspeed: 0
    var iedom=document.all||document.getElementById
    if (iedom)
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
    var actualwidth=''
    var cross_marquee, ns_marquee
    function populate(){
    if (iedom){
    cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
    cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
    cross_marquee.innerHTML=marqueecontent
    actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
    else if (document.layers){
    ns_marquee=document.ns_marquee.document.ns_marquee2
    ns_marquee.left=parseInt(marqueewidth)+8
    ns_marquee.document.write(marqueecontent)
    ns_marquee.document.close()
    actualwidth=ns_marquee.document.width
    lefttime=setInterval("scrollmarquee()",20)
    window.onload=populate
    function scrollmarquee(){
    if (iedom){
    if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
    cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
    else
    cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
    else if (document.layers){
    if (ns_marquee.left>(actualwidth*(-1)+8))
    ns_marquee.left-=copyspeed
    else
    ns_marquee.left=parseInt(marqueewidth)+8
    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
    write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
    write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
    write('</div></div>')
    else if (document.layers){
    write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
    write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
    write('</ilayer>')
    document.write('</td></table>')
    </script>
    </font>
    </tr>
    </table>
    </body>
    </html>

    Isnt the error so clear that OpenView\nonOV\tomcat\work\Standalone\localhost\ovportal\jsp\security\obs_login_html_jsp.java:7: package org.ticker does not exist

  • Need help with this Pascal Triangle code....

    Hey everyonr i am totally new to Java... so need your help with this code...
    the function makeRows gives me problems... main is correct ... can someone fix my makeRows... i don't see what's wrong
    public class Pascal {
      /** Return ragged array containing the first nRows rows of Pascal's
       *  triangle.
      public static int[][] makeRows(int nRows) {
            int[][] mpr  = new int[nRows+1][];
            int l=0; int r=0;
            for (int row = 0; row < nRows; row++) {
              mpr[row] = new int[row+1];  //index starts at 0
              if (row==0) {
                mpr[0][0]= 1;
                    if (row==1) {
                mpr[1][0]= 1;
                mpr[1][1]= 1;
              if (row>=2) {
                 for (int j = 0; j <= row; j++) {
                    if (j==0)               {l=0;} else {l=mpr[row-1][j-1];}
                    if (j==mpr[row].length-1) {r=0;} else{r=mpr[row-1][j];}
                    mpr[row][j] = l + r;
            return mpr;
      public static void main(String[] args) {
             if (args.length != 1) {
               System.out.println("usage: java " + Pascal.class.getName() + " N_ROWS");
               System.exit(1);
             int nRows = Integer.parseInt(args[0]);
             if (nRows > 0) {
               int[][] pascal = makeRows(nRows);
               for (int[] row : pascal) {
              for (int v : row) System.out.print(v + " ");
              System.out.println("");
         }this makeRows function should return ragged array containing the first nRows rows of Pascal's triangle
    thanks
    Edited by: magic101 on May 9, 2008 4:03 PM

    magic,
    i think corlettk meant that some people might not know what pascal's triangle is.
    also, you didnt say what was wrong with your code, just that it was wrong.
    asking smart questions is about giving as much information you can to get the
    best answer. i would throw a System.out.print between every line of your
    algorithm. i would also supply us with the values you are getting for each row.
    also, this question is asked all the time here. do a forum search.
    1
    11
    121
    1331
    14641

  • Return Current month Data:Help needed in modifying this code of a Procedure

    Hello Folks i have this scenario where i need to modify this code so that it has to return data from the Current month First Day to the previous Day if its a daily report and previous month data if its a monthly report.
    I have no clue how to modify this code below. Currently the code is returning data for Monthly reports for the previous month. Does anyone have any idea how to modify so that the code meets the requirements of both daily and monthly reprts.
    BEGIN
    if v_lowdate is null or v_highdate is null then
    select to_number(to_char(sysdate, 'DD')) into v_cur_day from dual;
    if v_cur_day < 25 then
    -- this is for the previous month run
    Select Add_Months(trunc(sysdate, 'MONTH'), -1)
    INTO V_LOWDATE
    FROM DUAL;
    SELECT Last_Day(ADD_Months(Sysdate, -1)) INTO V_Highdate From Dual;
    else
    -- this is for the current month run
    Select trunc(sysdate, 'MONTH') INTO V_LOWDATE FROM DUAL;
    SELECT Last_Day(Sysdate) INTO V_Highdate From Dual;
    end if;
    end if;
    Thanks
    Edited by: user11961230 on Sep 30, 2009 8:34 PM

    Hi Frank, This is code till the "modifying Code" which we were working. I will post the code after the "modifying Code" in the next reply. Thanks
    CREATE OR REPLACE PROCEDURE "POPULATE_RECOVERY_ACTIVITYHN"(p_lowdate date,
    p_highdate date) IS
    v_lowdate date := p_lowdate;
    v_highdate date := p_highdate;
    v_error_code NUMBER(20);
    v_error_text VARCHAR2(300);
    v_recovery_id Recovery.Recovery_ID%type;
    v_loop_control Number(20);
    v_settlement_id recovery.settlement_id%type;
    V_Event_ID Event.Event_ID%Type;
    V_Event_Case_ID Event_Case.Event_Case_ID%Type;
    V_Recovery_Month Varchar2(100);
    V_Major_Company Major_Client.Major_Client_Name%Type;
    V_Company Client.Client_Name%Type;
    V_Client_Policy_Identifier Varchar2(100);
    V_Lan_ID Varchar2(10) := 'TROVERIS';
    V_Recovery_Account Client.Account_Number%Type;
    V_AccountA Number(2) := 0;
    V_AccountB Number(2) := 0;
    V_Unit Event_Client_Field.Client_Field_Data%Type;
    V_Market Event_Client_Field.Client_Field_Data%Type;
    V_case_open_date Event_case.Open_Date%type;
    V_Employer_Group_Code Employer_Group.Employer_Group_Code%Type;
    V_Unknown1 Number(2) := 0;
    V_Fee_Schedule_Code Event_Case.Fee_Schedule_Code%Type;
    V_Total_Fee_Percent Number(20, 2) := 0.00;
    V_Subrogation_Fee_Percent Number(20, 2) := 0.00;
    V_Unknown2 Number(2) := NULL;
    V_Unknown3 Number(2) := NULL;
    V_TOTAL_MEDICAL Number(20, 2) := 0.00;
    V_Recovery_Amount Number(20, 2) := 0.00;
    V_Total_Tax Number(20, 2) := 0.00;
    V_Administrative_Tax Number(20, 2) := 0.00;
    V_Total_NonCash_Fee Number(20, 2) := 0.00;
    V_Total_NonCash_Positive Number(20, 2) := 0.00;
    V_Total_NonCash_Negative Number(20, 2) := 0.00;
    V_Total_Recovery Number(20, 2) := 0.00;
    V_Total_NonCash_Fee_Positive Number(20, 2) := 0.00;
    V_Total_NonCash_Fee_Negative Number(20, 2) := 0.00;
    V_Total_Admin_Fee Number(20, 2) := 0.00;
    V_Total_Fee Number(20, 2) := 0.00;
    V_Total_NonCash_Tax_Positive Number(20, 2) := 0.00;
    V_Total_NonCash_Tax_Negative Number(20, 2) := 0.00;
    report_type                  Varchar2(2);
    v_gl_num client.gl_num%type; -- *002*
    v_net_billable client.net_billable%type; -- *003*
    vevent_id event.event_id%type; -- *006*
    v_prev_event event.event_id%type; -- *006*
    v_prev_case event_case.event_case_id%type; -- *006*
    v_tot_recovery recovery.amount%type; -- *006*
    v_rec_amount recovery.amount%type; -- *006*
    v_prev_rec_amt recovery.amount%type; -- *006*
    v_prev_rec_month recovery_activity.recovery_month%type; -- *006*
    v_tot_fee recovery_activity.total_fee%type; --*006*
    v_mth_rev unbundled_recoveries.monthly_revenue%type; -- *006*
    v_diff number(18, 2); -- *006*
    v_nc_count number := 0; -- *006*
    v_c_count number := 0; -- *006*
    v_nc_tot recovery.amount%type; -- *006*
    v_used_rev recovery_activity.total_fee%type; -- *006*
    v_use_mth_rev unbundled_recoveries.monthly_revenue%type := 0; -- *006*
    v_use_nc_mth_rev unbundled_recoveries.monthly_revenue%type := 0; -- *006*
    v_prev_netbill client.net_billable%type; -- *006*
    v_event_type event.event_type_code%type;
    v_date_typed event.date_typed%type;
    v_acc_client_id client.acc_client_id%Type;
    v_Recovery_Revenue_GL_Num client.recovery_revenue_gl_num%Type;
    v_Funds_Due_GL_num client.funds_due_gl_num%Type;
    v_lob Varchar2(20);
    v_nc_recovery_id recovery.recovery_id%Type;
    /*Changed the Client_Policy_Identifier to concatenate the Retlation to insured code instead of the description
    which was exceeding the column size in the table. SWL 09/03/02. Checked with the Design Doc.*/
    CURSOR RECOVERY_INFO IS
    SELECT Event.Event_ID,
    Event_Case.Event_Case_ID,
    TO_CHAR(Recovery.Recovery_Date, 'FMMONTHYYYY') As Recovery_Month,
    Major_Client.Major_Client_Name AS Major_Company,
    -- Client.Client_Name AS Company,
    -- nvl(client.legacy_client_id,'DC')||'-'||substr(Client.Client_Name,1,55) AS Company, -- SWL 04/01/04 52653
    substr(nvl(client.legacy_client_id,
    decode(client.client_id, 1, 'DC', client.client_code)) || '-' ||
    Client.Client_Name,
    1,
    60) AS Company,
    Event.Client_Policy_Identifier ||
    Event_Case.Relation_To_Insured_code as Client_Policy_Identifier,
    Client.Account_Number as Recovery_Account,
    Employer_Group.Employer_Group_Code,
    Event_Case.Fee_Schedule_Code,
    Recovery_ID,
    Event_case.Open_Date,
    '(' || recovery.recovery_transaction_internal || ')' ||
    l.recovery_transaction_descripti, --fml 110276
    recovery.settlement_id,
    trim(client.gl_num), -- *002*
    nvl(trim(client.net_billable), 'N'), -- *003*
    recovery.amount, -- *006*,
    event.event_type_code,
    event.date_typed,
    recovery_id,
    Client.ACC_CLIENT_ID,
    Recovery_Revenue_GL_Num,
    Funds_Due_GL_num
    FROM Recovery,
    Settlement,
    Event_Case,
    Event,
    Employer_Group,
    Client,
    Major_Client,
    recovery_transaction_lookup l
    Where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND Settlement.Settlement_id = Recovery.Settlement_id
    AND Settlement.Event_Case_ID = Event_Case.Event_Case_id
    AND Event_Case.Event_ID = Event.Event_ID
    AND Event.Employer_Group_ID = Employer_Group.Employer_Group_ID(+)
    AND Event.Client_ID = Client.Client_ID
    AND Client.Major_Client_id = Major_Client.Major_Client_ID(+)
    and recovery.settlement_id not in
    (select settlement_id
    from recovery
    where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND recovery_transaction_internal in
    ('05', '50', '52', '51'))
    --001
    and    client.invoice_flag = 'N'            *005* commenting
    -- SWL 05/03/05 #71231
    and event.event_id in
    (select event_id
    from event_end_user eeu
    where eeu.active_flag = 'Y'
    and eeu.owner_flag = 'Y'
    and eeu.end_user_id in
    (select end_user_id
    from end_user
    where end_user.research_internal_user = 'Y'))
    and recovery.recovery_transaction_internal =
    l.recovery_transaction_internal --fml 110276
    order by event.event_id, recovery.amount; -- *006*
    -- SWL 05/03/05 #71231
    -- end of 001
    -- SWL 11/10/03 # 52743
    -- *006*
    CURSOR get_recovery(vevent_id event.event_id%type) IS
    SELECT sum(r.amount)
    FROM Recovery r
    Where to_date(r.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    and r.event_id = vevent_id
    and r.settlement_id not in
    (select settlement_id
    from recovery
    where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND recovery_transaction_internal in
    ('05', '50', '52', '51'))
    and r.event_id in
    (select event_id
    from event_end_user eeu
    where eeu.active_flag = 'Y'
    and eeu.owner_flag = 'Y'
    and eeu.end_user_id in
    (select end_user_id
    from end_user
    where end_user.research_internal_user = 'Y'));
    CURSOR RECOVERY_INFO_NC IS
    SELECT distinct Event.Event_ID,
    Event_Case.Event_Case_ID,
    TO_CHAR(Recovery.Recovery_Date, 'FMMONTHYYYY') As Recovery_Month,
    Major_Client.Major_Client_Name AS Major_Company,
    -- Client.Client_Name AS Company,
    -- nvl(client.legacy_client_id,'DC')||'-'||substr(Client.Client_Name,1,55) AS Company, /* SWL 04/01/04 52653 */
    substr(nvl(client.legacy_client_id,
    decode(client.client_id,
    1,
    'DC',
    client.client_code)) || '-' ||
    Client.Client_Name,
    1,
    60) AS Company,
    Event.Client_Policy_Identifier ||
    Event_Case.Relation_To_Insured_code as Client_Policy_Identifier,
    Client.Account_Number as Recovery_Account,
    Employer_Group.Employer_Group_Code,
    Event_Case.Fee_Schedule_Code,
    '(' || recovery.recovery_transaction_internal || ')' ||
    l.recovery_transaction_descripti, --fml 110276
    recovery.settlement_id,
    trim(client.gl_num), -- *002*
    nvl(trim(client.net_billable), 'N'), -- *003*
    recovery.amount,-- *006*
    recovery.recovery_id,
    event.event_type_code,
    event.date_typed,
    Client.ACC_CLIENT_ID,
    Recovery_Revenue_GL_Num,
    Funds_Due_GL_num
    FROM Recovery,
    Settlement,
    Event_Case,
    Event,
    Employer_Group,
    Client,
    Major_Client,
    recovery_transaction_lookup l
    Where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND Settlement.Settlement_id = Recovery.Settlement_id
    AND Settlement.Event_Case_ID = Event_Case.Event_Case_id
    AND Event_Case.Event_ID = Event.Event_ID
    AND Event.Employer_Group_ID = Employer_Group.Employer_Group_ID(+)
    AND Event.Client_ID = Client.Client_ID
    AND Client.Major_Client_id = Major_Client.Major_Client_ID(+)
    and recovery.settlement_id in
    (select settlement_id
    from recovery
    where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    --001
    AND recovery.recovery_transaction_internal in
    ('05', '50', '52', '51')
    and    client.invoice_flag = 'N'   *005* commenting
    /* SWL 05/03/05 #71231 */
    and event.event_id in
    (select event_id
    from event_end_user eeu
    where eeu.active_flag = 'Y'
    and eeu.owner_flag = 'Y'
    and eeu.end_user_id in
    (select end_user_id
    from end_user
    where end_user.research_internal_user = 'Y'))
    and recovery.recovery_transaction_internal =
    l.recovery_transaction_internal --fml 110276
    order by event.event_id, recovery.amount; -- *006*
    /* SWL 05/03/05 #71231 */
    --end of 001
    -- *006*
    CURSOR get_recovery_nc(vevent_id event.event_id%type) IS
    SELECT sum(r.amount)
    FROM Recovery r
    Where to_date(r.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND r.event_id = vevent_id
    and r.settlement_id in
    (select settlement_id
    from recovery
    where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR'))
    AND recovery_transaction_internal in ('05', '50', '52', '51')
    and r.event_id in
    (select event_id
    from event_end_user eeu
    where eeu.active_flag = 'Y'
    and eeu.owner_flag = 'Y'
    and eeu.end_user_id in
    (select end_user_id
    from end_user
    where end_user.research_internal_user = 'Y'));
    CURSOR Recovery_Totals_Nc IS
    Select Recovery_Detail.Recovery_Id, /* SWL 07/01/04 59016 */
    max(NVL(Recovery_Detail.Fees_Percent, 0) +
    NVL(Recovery_Detail.Admin_Percent, 0)) as Total_Fee_Percent,
    max(NVL(Recovery_Detail.Fees_Percent, 0)) as Subrogation_Fee_Percent,
    max(NVL(Recovery.Amount, 0)) as Recovery_Amount, /* SWL 04/01/04 52653 */
    Sum(NVL(Recovery_detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_Fee,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_Tax,
    Sum(NVL(Recovery_Detail.Admin_Taxes, 0)) as Administrative_tax,
    Sum(NVL(Recovery_Detail.Admin, 0)) as Total_Admin_Fee,
    sum(recovery.retained_by_client) as Non_cash_fee, --fml 110276
    sum(recovery.allocation_check_amount) as cash --fml 110276
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.settlement_id = v_settlement_id
    And recovery.recovery_id = v_recovery_id
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    and to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR') /*SWL 12/03/04 */
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    Group by Recovery_Detail.recovery_id;
    v_cash_recovery recovery_activity.cash_recovery%type;
    CURSOR Recovery_Totals_Positive_Nc IS
    -- Select Sum(Recovery.Amount) as Total_NonCash_Positive, /* SWL 04/01/04 52653 */
    Select max(Recovery.Amount) as Total_NonCash_Positive,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Positive
    From Settlement, Recovery, Recovery_detail
    Where Recovery.settlement_id = v_settlement_id
    And Settlement.Settlement_id = Recovery.Settlement_id
    and recovery.recovery_id = v_recovery_id /* SWL 07/01/04 59016 */
    And Recovery.Amount >= 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in
    ('05', '50', '52', '51')
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    Group by Recovery_Detail.recovery_id;
    CURSOR Recovery_Totals_Negative_Nc IS
    -- Select Sum(Recovery.Amount) as Total_NonCash_Negative, /* SWL 04/01/04 52653 */
    Select max(Recovery.Amount) as Total_NonCash_Negative,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Negative
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.settlement_id = v_settlement_id
    And Settlement.Settlement_id = Recovery.Settlement_id
    and recovery.recovery_id = v_recovery_id /* SWL 07/01/04 59016 */
    And Recovery.Amount < 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in
    ('05', '50', '52', '51')
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    /* SWL 11/10/03 # 52743 */
    CURSOR Event_Client_Unit IS
    Select e.Client_Field_Data as Unit
    From Event_Client_Field e, recovery r
    Where r.Event_ID = e.Event_ID
    AND r.Recovery_ID = V_Recovery_ID
    AND e.Client_Field_Name = 'UNIT';
    CURSOR Bill_totals IS
    Select mv_billdetail_case_sum.sum_paid as TOTAL_MEDICAL
    From mv_billdetail_case_sum
    where mv_billdetail_case_sum.event_id = V_Event_ID;
    CURSOR NonCash_Fee IS
    Select NVL(Sum(Recovery.Amount), 0) as Total_NonCash_Fee
    From Settlement, Recovery
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.
    Recovery_Transaction_Internal in ('05', '50', '52', '51');
    /* SWL 04/01/04 52653 */
    CURSOR Recovery_Totals IS
    Select round(avg(NVL(Recovery_Detail.Fees_Percent, 0) +
    NVL(Recovery_Detail.Admin_Percent, 0)),
    2) as Total_Fee_Percent,
    round(avg(NVL(Recovery_Detail.Fees_Percent, 0)), 2) as Subrogation_Fee_Percent,
    max(NVL(Recovery.Amount, 0)) as Recovery_Amount,
    Sum(NVL(Recovery_detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_Fee,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_Tax,
    Sum(NVL(Recovery_Detail.Admin_Taxes, 0)) as Administrative_tax,
    Sum(NVL(Recovery_Detail.Admin, 0)) as Total_Admin_Fee
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    Group by Recovery_Detail.recovery_id;
    CURSOR Recovery_Totals_Positive IS
    /* Select Sum(Recovery.Amount) as Total_NonCash_Positive,
    Sum(NVL(Recovery_Detail.Fees_Taxes,0)+ NVL(Recovery_Detail.Admin_Taxes,0)) as Total_NonCash_Tax_Positive
    */ /* SWL 04/01/04 52653 */
    Select max(Recovery.Amount) as Total_NonCash_Positive,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Positive
    From Settlement, Recovery, Recovery_detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Amount >= 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in ('04', '17', '15') /*SWL 10/05/04 #63919*/--*009* added 15
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    CURSOR Recovery_NonFEE_Positive IS
    Select Sum(NVL(Recovery_Detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_NonCash_Fee_Positive
    From Settlement, Recovery, Recovery_detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Amount >= 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in
    ('05', '50', '52', '51')
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    CURSOR Recovery_Totals_Negative IS
    /* Select Sum(Recovery.Amount) as Total_NonCash_Negative,*/ /* SWL 04/01/04 52653 */
    Select max(Recovery.Amount) as Total_NonCash_Negative,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Negative
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Amount < 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in ('04', '17', '15') /*SWL 10/05/04 #63919*/--*009* added 15
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    CURSOR Recovery_NonFEE_Negative IS
    Select Sum(NVL(Recovery_Detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_NonCash_Fee_Negative
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Amount < 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in
    ('05', '50', '52', '51')
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    --This is a generic cursor which will be used to control the number of rows inserted into the recovery_activity table
    --There has to be 1 row inserted into the recovery_activity table for each detail record in the recovery_detail table.
    --However, if no recovery_detail record exists there will be only 1 insert into the recovery_activity table.
    CURSOR Control_Detail_Loop
    IS
    Select 1
    FROM Recovery,
    Recovery_Detail
    Where Recovery.Recovery_ID = Recovery_Detail.Recovery_ID(+)
    And Recovery.Recovery_ID = V_Recovery_ID;
    /* SWL 04/01/04 Commented since the only time there were more entries in rd for a recovery is when there is a split fees */
    /* accounting does not want this to be displayed in detail. They need this aggregated as a single fee entry so the recovery */
    /* activity table will now have a single entry corresponding to each recovery in the recovery table. (#52653) */
    CURSOR Control_Detail_Loop IS
    Select 1 FROM Recovery where Recovery.Recovery_ID = V_Recovery_ID;
    /* DJ 10/25/04 # 64633 start*/
    CURSOR Event_Client_Market IS
    Select e.Client_Field_Data as Market
    From Event_Client_Field e, recovery r
    Where r.Event_ID = e.Event_ID
    AND r.Recovery_ID = V_Recovery_ID
    AND e.Client_Field_Name = 'MARKET';
    /* DJ 10/25/04 # 64633 end*/
    v_cur_day integer := 0;
    -----dj
    v_vendor_fee_wh number;
    v_total_vendor_fee_wh number;
    v_rec_itc recovery_activity.recovery_transaction_internal%type;
    --v_settlement_id settlement.settlement_id%type;
    --*004* start
    function unbundled_fee(pevent_id event.event_id%type,
    plowdate date,
    phighdate date) return number is
    -- function variables
    v_fee number(18, 2) := 0;
    v_month_revenue unbundled_recoveries.monthly_revenue%type := 0;
    v_cum_revenue unbundled_recoveries.cum_revenue%type := 0;
    v_contract_fee_per unbundled_recoveries.contractual_fee_per%type := 0;
    v_prev_cum_revenue unbundled_recoveries.cum_revenue%type := 0;
    v_cum_ub_rec unbundled_recoveries.cum_ub_recoveries%type := 0;
    v_cum_inv_paid unbundled_recoveries.cum_inv_paid%type := 0;
    v_month_rec unbundled_recoveries.monthly_recoveries%type := 0;
    v_cum_rec unbundled_recoveries.cum_recoveries%type := 0;
    v_event_id event.event_id%type;
    begin
    --v_month_rec and v_cum_inv_paid
    begin
    select event_id,
    (select sum(r.amount)
    from recovery r
    where r.event_id = e.event_id
    and trunc(r.recovery_date) between plowdate and phighdate) as monthly_recoveries,
    -- *006* added cum_rec
    (select nvl(sum(r.amount), 0)
    from recovery r
    where r.event_id = e.event_id
    and trunc(r.recovery_date) <= trunc(phighdate)) as cum_recoveries,
    (select sum(decode(nvl(ex.client_invoice_closed, 'N'),
    'N',
    ex.paid_amount,
    ex.client_invoice_received))
    from expense ex
    where ex.event_id = e.event_id
    and upper(ex.status) = 'PAID'
    and trunc(ex.check_date) <= phighdate
    and trim(ex.orig_client_invoice_date) is not null
    and nvl(ex.client_invoice_dispute, 'Y') = 'N') as cum_invoiced_paid
    into v_event_id, v_month_rec, v_cum_rec, v_cum_inv_paid
    from event e
    where e.event_id = pevent_id;
    exception
    when no_data_found then
    v_event_id := 0;
    v_month_rec := 0;
    v_cum_rec := 0;
    v_cum_inv_paid := 0;
    when others then
    v_event_id := 0;
    v_month_rec := 0;
    v_cum_rec := 0;
    v_cum_inv_paid := 0;
    end;
    -- *007* start
    -- if event previously written to table, get values from table
    begin
    select nvl(ub.cum_revenue, 0)
    into v_prev_cum_revenue
    from unbundled_recoveries ub
    where ub.event_id = pevent_id
    and ub.month_id =
    (select max(a.month_id)
    from unbundled_recoveries a
    where a.event_id = pevent_id
    and a.month_id < to_char(v_lowdate, 'YYYYMM'));
    exception
    when no_data_found then
    v_prev_cum_revenue := 0;
    when others then
    v_prev_cum_revenue := 0;
    end;
    -- *007* end
    --v_contract_fee_per
    begin
    select nvl(max(rd.fees_percent), 0)
    into v_contract_fee_per
    from recovery_detail rd
    where rd.recovery_id in
    (select r.recovery_id
    from recovery r,
    (select a.event_id, max(amount) as amount
    from recovery a
    where a.event_id = pevent_id
    and trunc(a.recovery_date) between plowdate and
    phighdate
    group by a.event_id) max_r
    where r.event_id = max_r.event_id
    and trunc(r.recovery_date) between plowdate and phighdate
    and r.amount = max_r.amount);
    exception
    when no_data_found then
    v_contract_fee_per := 0;
    when others then
    v_contract_fee_per := 0;
    end;
    v_cum_ub_rec := nvl(v_cum_rec, 0) - nvl(v_cum_inv_paid, 0);
    if ((nvl(v_cum_ub_rec, 0) > 0) and (nvl(v_month_rec, 0) <> 0)) then
    -- latest cumulative unbundled recoveries > 0
    v_cum_revenue := round(((v_contract_fee_per / 100) * v_cum_ub_rec),
    2);
    v_month_revenue := v_cum_revenue - v_prev_cum_revenue;
    end if;
    v_fee := v_month_revenue;
    return v_fee;
    exception
    when others then
    raise_application_error(-20106,
    substr('populate_recovery_activity.undebundled_fee: ' ||
    Sqlcode || Sqlerrm,
    1,
    500));
    return v_fee;
    end;

  • I need help with this script please ASAP

    So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
    The script (Sorry if it's a bit long):
    #------------Startup-------------
    display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
    set Lolz to (button returned of the result)
    if Lolz is "Cyaaaa" then
    killapp()
    else if Lolz is "Take the Quiz" then
              do shell script "say -v samantha Ok starting in 3…2…1…GO!"
    #------------Question 1-----------
              display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
              set A1 to (button returned of the result)
              if A1 is "Apprentices" then
                        do shell script "say -v samantha Correct Answer"
              else
                        do shell script "say -v samantha Wrong Answer"
      #----------Question 2--------
                        display dialog "Most children were taught
    to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
                        set A2 to (button returned of the result)
                        if A2 is "Bible" then
                                  do shell script "say -v samantha Correct Answer"
                        else
                                  do shell script "say -v samantha Wrong Answer"
      #------------Question 3---------
                                  display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
                                  set A3 to (button returned of the result)
                                  if A3 is "Great Awakening" then
                                            do shell script "say -v samantha Correct Answer"
                                  else
                                            do shell script "say -v samantha Wrong Answer"
      #-----------Question 4--------
                                            display dialog "_______ was
    a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
                                            set A4 to (button returned of the result)
                                            if A4 is "Ben Franklin" then
                                                      do shell script "say -v samantha Correct Answer"
                                            else
                                                      do shell script "say -v samantha Wrong Answer"
      #----------Question 5-------
                                                      display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
                                                      set A5 to (button returned of the result)
                                                      if A5 is "Land" then
                                                                do shell script "say -v samantha Correct Answer"
                                                      else
                                                                do shell script "say -v samantha Wrong Answer"
      #---------Question 6--------
                                                                display dialog "The first step toward guaranteeing these rights came in 1215. That
    year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
                                                                set A6 to (button returned of the result)
                                                                if A6 is "Magna Carta" then
                                                                          do shell script "say -v samantha Correct Answer"
                                                                else
                                                                          do shell script "say -v samantha Wrong Answer"
      #----------Question 7--------
                                                                          display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
                                                                          set A7 to (button returned of the result)
                                                                          if A7 is "Parliament" then
                                                                                    do shell script "say -v samantha Correct Answer"
                                                                          else
                                                                                    do shell script "say -v samantha Wrong Answer"
      #--------Question 8-----
                                                                                    display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
                                                                                    set A8 to (button returned of the result)
                                                                                    if A8 is "King James II" then
                                                                                              do shell script "say -v samantha Correct Answer"
                                                                                    else
                                                                                              do shell script "say -v samantha Wrong Answer"
      #--------Question 9------
                                                                                              display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
                                                                                              set A9 to (button returned of the result)
                                                                                              if A9 is "William/Mary/Glorius Revolution" then
                                                                                                        do shell script "say -v samantha Correct Answer"
                                                                                              else
                                                                                                        do shell script "say -v samantha Wrong Answer"
      #---------Question 10-----
                                                                                                        display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
                                                                                                        set A10 to (button returned of the result)
                                                                                                        if A10 is "Rights" then
                                                                                                                  do shell script "say -v samantha Correct Answer"
                                                                                                        else
                                                                                                                  do shell script "say -v samantha Wrong Answer"
      #---------Question 11------
                                                                                                                  display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
                                                                                                                  set A11 to (button returned of the result)
                                                                                                                  if A11 is "Ohio" then
                                                                                                                            do shell script "say -v samantha Correct Answer"
                                                                                                                  else
                                                                                                                            do shell script "say -v samantha Wrong Answer"
      #------Question 12---------
                                                                                                                            display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
                                                                                                                            set A12 to (button returned of the result)
                                                                                                                            if A12 is "George Washington" then
                                                                                                                                      do shell script "say -v samantha Correct Answer"
                                                                                                                            else
                                                                                                                                      do shell script "say -v samantha Wrong Answer"
      #---------Question 13-------
                                                                                                                                      display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
                                                                                                                                      set A13 to (button returned of the result)
                                                                                                                                      if A13 is "Ben Franklin" then
                                                                                                                                                do shell script "say -v samantha Correct Answer"
                                                                                                                                      else
                                                                                                                                                do shell script "say -v samantha Wrong Answer"
      #--------Question 14------
                                                                                                                                                display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
                                                                                                                                                set A14 to (button returned of the result)
                                                                                                                                                if A14 is "" then
                                                                                                                                                          do shell script "say -v samantha Correct Answer"
                                                                                                                                                else
                                                                                                                                                          do shell script "say -v samantha Wrong Answer"
      #-------Question 15-------
                                                                                                                                                          display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
                                                                                                                                                          set A15 to (button returned of the result)
                                                                                                                                                          if A15 is "Command an attack against French" then
                                                                                                                                                                    do shell script "say -v samantha Correct Answer"
                                                                                                                                                          else
                                                                                                                                                                    do shell script "say -v samantha Wrong Answer"
      #------TheLolQuestion-----
                                                                                                                                                                    display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
                                                                                                                                                                    set LOOL to (button returned of the result)
                                                                                                                                                                    if LOOL is "Mr.White" then
                                                                                                                                                                              do shell script "say -v samantha Congratulations…you…have…common…sense"
                                                                                                                                                                    else
                                                                                                                                                                              do shell script "say -v alex Do…you…have…eyes?"
                                                                                                                                                                              #------END------
                                                                                                                                                                              display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
                                                                                                                                                                              set endmenu to (button returned of the result)
                                                                                                                                                                              if endmenu is "I did!" then
                                                                                                                                                                                        do shell script "say -v samantha Your awesome"
                                                                                                                                                                              else
                                                                                                                                                                                        do shell script "say -v alex Go outside and run a lap"
                                                                                                                                                                              end if
                                                                                                                                                                    end if
                                                                                                                                                          end if
                                                                                                                                                end if
                                                                                                                                      end if
                                                                                                                            end if
                                                                                                                  end if
                                                                                                        end if
                                                                                              end if
                                                                                    end if
                                                                          end if
                                                                end if
                                                      end if
                                            end if
                                  end if
                        end if
              end if
    end if

    Use code such as:
    display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
    set A1 to (button returned of the result)
    if A1 is "Apprentices" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    #----------Question 2--------
    display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
    set A2 to (button returned of the result)
    if A2 is "Bible" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    (90444)

  • Need help with this xml gallery !!!

    i have build a gallery but its very simple...... it takes images from xml file.
    i have attached all files in zip.
    i just want two things if anyone can help.
    first when i press next button it goes to next image but with no effect. it just displays next image ... i want to incorporate a sliding effect when the image is changed to another.
    and second i want to use autoplay feature.
    as soon as swf starts the images came one by one with difference of few seconds.
    thx in advance... i really need help in this....!

    You're welcome.
    I don't have an example to offer for the autorun.  You should be able to think it thru.  One key, as I mentioned is to preload all of the images first, that will allow for smooth playing of the show--no waiting for images to load between changes.  You can load them into empty movieclips and hide them (_viisible = false) until they are needed.  You could load them when called for, but you would have to put conditions on the displaying of things until the image loads, which will change when they are all loaded, so I recommend just loading them all first.
    For the timing you can use setInterval.  If something is going to be allowed to interupt the autorun, then you will need to make use of the clearInterval function as well, so that you stop the clock.
    Since you will be wanting to know when things are loaded, you will need to use the MovieClipLoader.loadClip method for loading the images instead of using loadMovie.  This is because the MovieClipLoader class supports having an event listener.  If you look in the help documents in the MovieClipLoader.addListener section, there is an example there that provides a fairly good complete overview of using the code.  The only difference is you'd be looking for the onLoadComplete event rather than the onLoadInit event.

Maybe you are looking for

  • G72-c55dx keyboard stop working within 15 min of use

    G72-c55dx keyboard stop working within 15 min of use or at rest check setting power bios updated late;s driver ver.?

  • Remove duplicate filters option?

    Is there a way to remove duplicate filters from a bunch of different clips at once (perhaps using the remove attributes feature somehow)? For example, if you inadvertently put TWO flicker filters on all the clips in your sequence, and you want to rem

  • Selecting specific instance of XML element for binding

    I am trying to create a form that will display ratesheets used to show mortgage rates.  We have an XML schema defined that has multiple rates for multiple products.  The rates change continuously. I want to create a static PDF by combining a form and

  • My online number works not! help me immediately pl...

    just bought my online number 30 min ago. it works not. very disappoint.  i am now in germany. and the number is 021124819306 

  • UPC rebate help/apple  care protection plan

    I'm confused as to which UPC they want. It's the one with the serial/part numbers right? There are like 3 or 4 labels on my box. And on my Ipod, do they want me to cut out the little tiny UPC label to the Ipod box? (i could only find a shipping label