Radio panel and selection dependent panel draw

Hi
I've got two problems with my applet which have me stumped. http://zeldia.cap.ed.ac.uk/Lumbribase/array_exp.php?cluster=LRP00075_8
1) I'd like the radio buttons on the top panel closer together. I've tried setting the panel grid layout to (1,5) (in the hope of 3 blanks on the right) and I've tried setting the prefered size but it seems to ignor the horizontal parameter unless I set it bigger that the available space.
2) The checkbox panel on the right is only relevant when the 'exposure' radio button is selected. How can I make it only add this panel when 'exposure' selected and thus checkBoxSetting[4]= true;
Thanks in advance for any info you can give.
Ann
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Color;
import java.awt.*;
import java.awt.event.*;
import java.lang.Math;
import java.net.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import java.text.*;
/*import java.sql.*;
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.SQLException;
public class ArrayExpApplet extends Applet
                       implements ItemListener, ActionListener  {
     private JCheckBox ATButton;
     private JCheckBox CdButton;
     private JCheckBox CuButton;
     private JCheckBox PAHButton;
     private JCheckBox ExposureButton;
     private JCheckBox ControlButton;
   static String ExposureString = "Exp";
   static String ControlString = "Con";
     private boolean[] checkBoxSetting = {true,true,true,true,false,true};
     private double[][] expLevels = new double[4][5];
     private double[]   controlLevels = new double[3];
     private Color[] EColor = new Color[5];
     private int originX=100;
     private int height=200;
     private int originY=height+(originX/2);
     private double controlScale=-1;
     private double expScale=-1;
     private double controlMax=0;
     private double expMax=0;
     private JPanel side =  CheckBoxPanelSide();
     private Panel canvasPanel = new Panel();
     public void init() {
      System.out.println("initiating...");
      setBackground(new Color(224, 238, 238));;
          //get the php expression string and read into 2D numeric array
          String expression_str = this.getParameter("expression_string");
          System.out.println("expression_string "+expression_str);
          String[] rows = expression_str.split (";");
          for (int k = 0; k < rows.length; k++) {
               System.out.println("row "+k+" = "+rows[k]);
               String[] cols = rows[k].split (",");
               for (int l = 0; l < cols.length; l++) {
                    System.out.println("col "+l+" = "+cols[l]);
                    expLevels[k][l]= Double.parseDouble(cols[l]);
          //get the php control string and read into a numeric array
          String control_str = this.getParameter("control_string");
          System.out.println("control_string "+control_str);
          rows = control_str.split (",");
          for (int k = 0; k < rows.length; k++) {
               System.out.println("row "+k+" = "+rows[k]);
               controlLevels[k]= Double.parseDouble(rows[k]);
          //find max expression to scale y axis
          for (int i=0; i<4; i++) {
               for (int j=0; j<5; j++){
                    if (expLevels[i][j]>expMax) {expMax=expLevels[i][j];}
          expScale=height/(double)expMax;
          //find max control to scale y axis
          for (int i=0; i<3; i++) {
               if (controlLevels>controlMax) {controlMax=controlLevels[i];}
          controlScale=height/(double)controlMax;
          //set up an array of 5 colours
          EColor[0]= new Color(200,0,255); //magenta
          EColor[1]= new Color(0,0,255);      //green
          EColor[2]= new Color(0,255,0);      //blue
          EColor[3]= new Color(254,190,0); //yellow
          EColor[4]= new Color(224, 238, 238); //background
public void start() {
System.out.println("starting...");
//          Panel canvasPanel = new Panel();
          Panel entirePanel = new Panel();
          Canvas graph = new Canvas();
          JPanel top = CheckBoxPanelTop();
          JPanel side = CheckBoxPanelSide();
          setLayout(new BorderLayout());
          //layout total area as boxes top to bottom
          entirePanel.setLayout(new BoxLayout(entirePanel, BoxLayout.PAGE_AXIS));
          //put top checkboxes in top box
          entirePanel.add(top);
          //layout area as boxes left to right
          canvasPanel.setLayout(new BoxLayout(canvasPanel, BoxLayout.LINE_AXIS));
          //put canvasPanel in bottom box
          entirePanel.add(canvasPanel);
               //Put a graph in the first box.
               canvasPanel.add(graph);
               //Put checkboxes in the right box.
               canvasPanel.add(side);
          add("North", entirePanel);
          add("East", canvasPanel);
     public JPanel CheckBoxPanelSide() {
          //Create the check boxes.
          ATButton = new JCheckBox("Atrazine");
          ATButton.setForeground(EColor[0]);
          ATButton.setBackground(new Color(224, 238, 238));
          ATButton.setSelected(true);
          checkBoxSetting[0]=true;
          CdButton = new JCheckBox("Cadmium");
          CdButton.setForeground(EColor[1]);
          CdButton.setBackground(new Color(224, 238, 238));
          CdButton.setSelected(true);
          checkBoxSetting[1]=true;
          CuButton = new JCheckBox("Copper");
          CuButton.setForeground(EColor[2]);
          CuButton.setBackground(new Color(224, 238, 238));
          CuButton.setSelected(true);
          checkBoxSetting[2]=true;
          PAHButton = new JCheckBox("PAH");
          PAHButton.setForeground(EColor[3]);
          PAHButton.setBackground(new Color(224, 238, 238));
          PAHButton.setSelected(true);
          checkBoxSetting[3]=true;
          //Register a listener for the check boxes.
          ATButton.addItemListener(this);
          CdButton.addItemListener(this);
          CuButton.addItemListener(this);
          PAHButton.addItemListener(this);
          JPanel s = new JPanel();
          s.setLayout(new GridLayout(6,1));
          s.setBackground(new Color(224, 238, 238));
          s.setBorder(BorderFactory.createLineBorder (Color.blue, 2));
          s.add(ATButton);
          s.add(CdButton);
          s.add(CuButton);
          s.add(PAHButton);
          return (s);
     public JPanel CheckBoxPanelTop() {
          //Create the radio buttons.
          JRadioButton ExposureButton = new JRadioButton("Exposure");
          ExposureButton.setBackground(new Color(224, 238, 238));
          ExposureButton.setSelected(true);
ExposureButton.setActionCommand(ExposureString);
          checkBoxSetting[4]=true;
          JRadioButton ControlButton = new JRadioButton("Control");
          ControlButton.setBackground(new Color(224, 238, 238));
ControlButton.setActionCommand(ControlString);
          ControlButton.setSelected(false);
          //Group the radio buttons.
          ButtonGroup group = new ButtonGroup();
          group.add(ControlButton);
          group.add(ExposureButton);
//Register a listener for the radio buttons.
          ControlButton.addActionListener(this);
          ExposureButton.addActionListener(this);
          JPanel t = new JPanel();
          t.setLayout(new GridLayout(1,5));
          t.setBackground(new Color(224, 238, 238));
          t.setBorder(BorderFactory.createLineBorder (Color.blue, 2));
          t.setPreferredSize(new Dimension(50, 35));
          t.add(ControlButton);
          t.add(ExposureButton);
          return (t);
// Listens to the radio buttons.
     public void actionPerformed(ActionEvent e) {
          System.out.println(""+e.getActionCommand());
          if (e.getActionCommand() == "Exp") {checkBoxSetting[4]= true;}
          if (e.getActionCommand() == "Con") {checkBoxSetting[4]= false;}
          repaint();
// add a checkbox listener
     public void itemStateChanged(ItemEvent event) {
          char c = '-';
          Object source = event.getItemSelectable();
          if (source == ATButton) {
               if (checkBoxSetting[0]== false) {checkBoxSetting[0]= true;}
               else {checkBoxSetting[0]= false;}
               c = 'a';
               System.out.println("CheckBox "+c);
          else if (source == CdButton) {
               if (checkBoxSetting[1]== false) {checkBoxSetting[1]= true;}
               else {checkBoxSetting[1]= false;}
               c = 'd';
               System.out.println("CheckBox "+c);
          else if (source == CuButton) {
               if (checkBoxSetting[2]== false) {checkBoxSetting[2]= true;}
               else {checkBoxSetting[2]= false;}
               c = 'u';
               System.out.println("CheckBox "+c);
          else if (source == PAHButton) {
               if (checkBoxSetting[3]== false) {checkBoxSetting[3]= true;}
               else {checkBoxSetting[3]= false;}
               c = 'p';
               System.out.println("CheckBox "+c);
          repaint();
     public void paint(Graphics g) {
          System.out.println("Paint");
          if (checkBoxSetting[4]== true) {   //paint exposures
               System.out.println("painting exposure");
               //Draw the data
               int step=100; //distance between exposures on x axis
               int x=originX; int y;
               for (int i=0; i<4; i++) {
                    System.out.println("CheckBox "+i+" is "+checkBoxSetting[i]);
                    if (checkBoxSetting[i]) {
                         g.setColor(EColor[i]);
                         for (int j=0; j<4; j++){
                              y=j+1;
                              g.drawLine(x,originY-(int)(expLevels[i][j]*expScale), x+step, originY-(int)(expLevels[i][y]*expScale));
                              x=x+step;
                         x=originX;
               //draw axis
               g.setColor(Color.black);
               g.drawLine(originX, (originX/2), originX, originY);
               g.drawLine(originX, originY, originX+(step*4), originY);
               //tickmark axis
               g.drawLine(originX, originY, originX, originY+5);
               g.drawLine(originX+step, originY, originX+step, originY+5);
               g.drawLine(originX+(step*2), originY, originX+(step*2), originY+5);
               g.drawLine(originX+(step*3), originY, originX+(step*3), originY+5);
               g.drawLine(originX+(step*4), originY, originX+(step*4), originY+5);
               g.drawLine(originX, originY, originX-5, originY);
               g.drawLine(originX, originY- (int) (expMax*expScale*0.25), originX-5, originY- (int) (expMax*expScale*0.25));//400*.5=200*.25=50
               g.drawLine(originX, originY- (int) (expMax*expScale*0.5), originX-5, originY- (int) (expMax*expScale*0.5));
               g.drawLine(originX, originY- (int) (expMax*expScale*0.75), originX-5, originY- (int) (expMax*expScale*0.75));
               g.drawLine(originX, originY- (int) (expMax*expScale), originX-5, originY- (int) (expMax*expScale));
               //lable x axis
               g.drawString("LC0", originX-9, originY+20);
               g.drawString("LC12.5", originX-18+step, originY+20);
               g.drawString("LC25", originX-12+(step*2), originY+20);
               g.drawString("LC37.5", originX-18+(step*3), originY+20);
               g.drawString("LC50", originX-12+(step*4), originY+20);
               g.drawString("Exposure", originX-24+(step*2), originY+40);
               //lable y axis
               String fmt = "0.00#";
               DecimalFormat df = new DecimalFormat(fmt);
               int xs=originX; int ys=originY; int zs=(int)((expMax/height)*0.25);
//               g.drawString("x"+xs+" y"+ys+" zs"+zs+" expMax"+expMax+" expScale"+expScale, 0, originY+60);
               g.drawString("0", originX-20, originY+4);
               g.drawString(""+df.format((double)(expMax*0.25)), originX-45, originY+4- (int) (expMax*expScale*0.25));//400*.5=200*.25=50
               g.drawString(""+df.format((double)(expMax*0.50)), originX-45, originY+4- (int) (expMax*expScale*0.5));
               g.drawString(""+df.format((double)(expMax*0.75)), originX-45, originY+4- (int) (expMax*expScale*0.75));
               g.drawString(""+df.format(expMax), originX-45, originY+4- (int) (expMax*expScale));
               g.drawString("E", originX-100, originY-(int)(height*0.5)-50);
               g.drawString("x", originX-100, originY-(int)(height*0.5)-40);
               g.drawString("p", originX-100, originY-(int)(height*0.5)-30);
               g.drawString("r", originX-100, originY-(int)(height*0.5)-20);
               g.drawString("e", originX-100, originY-(int)(height*0.5)-10);
               g.drawString("s", originX-100, originY-(int)(height*0.5));
               g.drawString("s", originX-100, originY-(int)(height*0.5)+10);
               g.drawString("i", originX-98, originY-(int)(height*0.5)+20);
               g.drawString("o", originX-100, originY-(int)(height*0.5)+30);
               g.drawString("n", originX-100, originY-(int)(height*0.5)+40);
          else {                // paint control
               System.out.println("painting control");
               //Draw the data
               int step=200; //distance between controls on x axis
               int x=originX; int y;
               for (int i=0; i<2; i++) {
                    g.setColor(EColor[0]);
                    int j=i+1;
                    g.drawLine(x,originY-(int)(controlLevels[i]*controlScale), x+step, originY-(int)(controlLevels[j]*controlScale));
                    x=x+step;
               //draw axis
               g.setColor(Color.black);
               g.drawLine(originX, (originX/2), originX, originY);
               g.drawLine(originX, originY, originX+(step*2), originY);
               //tickmark axis
               g.drawLine(originX, originY, originX, originY+5);
               g.drawLine(originX+step, originY, originX+step, originY+5);
               g.drawLine(originX+(step*2), originY, originX+(step*2), originY+5);
               g.drawLine(originX, originY, originX-5, originY);
               g.drawLine(originX, originY- (int) (expMax*expScale*0.25), originX-5, originY- (int) (expMax*expScale*0.25));//400*.5=200*.25=50
               g.drawLine(originX, originY- (int) (expMax*expScale*0.5), originX-5, originY- (int) (expMax*expScale*0.5));
               g.drawLine(originX, originY- (int) (expMax*expScale*0.75), originX-5, originY- (int) (expMax*expScale*0.75));
               g.drawLine(originX, originY- (int) (expMax*expScale), originX-5, originY- (int) (expMax*expScale));
               //lable x axis
               g.drawString("Late Cocoon", originX-27, originY+20);
               g.drawString("Juvenile", originX-20+step, originY+20);
               g.drawString("Adult", originX-20+(step*2), originY+20);
               g.drawString("Growth stage", originX-36+step, originY+40);
               //lable y axis
               String fmt = "0.00#";
               DecimalFormat df = new DecimalFormat(fmt);
               int xs=originX; int ys=originY; int zs=(int)((controlMax/height)*0.25);
//               g.drawString("x"+xs+" y"+ys+" zs"+zs+" controlMax"+controlMax+" scale"+scale, 0, originY+60);
               g.drawString("0", originX-15, originY+4);
               g.drawString(""+df.format((double)(controlMax*0.25)), originX-35, originY+4- (int) (controlMax*controlScale*0.25));//400*.5=200*.25=50
               g.drawString(""+df.format((double)(controlMax*0.50)), originX-35, originY+4- (int) (controlMax*controlScale*0.5));
               g.drawString(""+df.format((double)(controlMax*0.75)), originX-35, originY+4- (int) (controlMax*controlScale*0.75));
               g.drawString(""+df.format(controlMax), originX-35, originY+4- (int) (controlMax*controlScale));
               g.drawString("E", originX-100, originY-(int)(height*0.5)-50);
               g.drawString("x", originX-100, originY-(int)(height*0.5)-40);
               g.drawString("p", originX-100, originY-(int)(height*0.5)-30);
               g.drawString("r", originX-100, originY-(int)(height*0.5)-20);
               g.drawString("e", originX-100, originY-(int)(height*0.5)-10);
               g.drawString("s", originX-100, originY-(int)(height*0.5));
               g.drawString("s", originX-100, originY-(int)(height*0.5)+10);
               g.drawString("i", originX-98, originY-(int)(height*0.5)+20);
               g.drawString("o", originX-100, originY-(int)(height*0.5)+30);
               g.drawString("n", originX-100, originY-(int)(height*0.5)+40);
     //If we don't specify this, the canvas might not show up at all
     //(depending on the layout manager).
     public Dimension getMinimumSize() {return new Dimension(550,300);}
     //If we don't specify this, the canvas might not show up at all
     //(depending on the layout manager).
     public Dimension getPreferredSize() {return getMinimumSize();}
     public void stop() {
          System.out.println("stopping...");
     public void destroy() {
          System.out.println("preparing to unload...");

Thanks.
I've tried moving the lines ...
//Put checkboxes in the right box.
canvasPanel.add(side);from the start method to the radio button listerner...
    // Listens to the radio buttons.
     public void actionPerformed(ActionEvent e) {
          System.out.println(""+e.getActionCommand());
          if (e.getActionCommand() == "Exp") {
               checkBoxSetting[4]= true;
               //Put checkboxes in the right box.
               canvasPanel.add(side);
          if (e.getActionCommand() == "Con") {checkBoxSetting[4]= false;}
          repaint();
    }and into the paint method...
     public void paint(Graphics g) {
          System.out.println("Paint");
          if (checkBoxSetting[4]== true) {   //paint exposures
               System.out.println("painting exposure");
               //Put checkboxes in the right box.
               canvasPanel.add(side);
               //Draw the dataand in both cases the code complies and the applet runs without error messages but the panel is never displayed???

Similar Messages

  • Radio button and select option in one line

    Hi,
    I have an requirement in which i need to display the radio button and select option in one line in an report program.
    How can i do it? 
    Regards,
    Arun.

    Hi,
    Try this code.
    TABLES: bkpf.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: p_r1 RADIOBUTTON GROUP a.
    SELECTION-SCREEN COMMENT 4(20) text-001 FOR FIELD p_r1.
    SELECTION-SCREEN COMMENT 30(12) text-002 FOR FIELD p_date.
    SELECTION-SCREEN POSITION 39.
    SELECT-OPTIONS: p_date FOR bkpf-budat OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: p_r2 RADIOBUTTON GROUP a.
    text-001 = " Radio button"
    text-002 = "Posting date"

  • Regarding radio button and selection screen

    hi
    i have a requirement to grey out one particular select option , if any one of 4 radio button is selected. (total 5 radio buttons ) . 
    how do i proceed .
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE  text-001.
    SELECT-OPTIONS: p_year  for  s021-spmon obligatory,
                    p_kunag  FOR vbrk-kunag  ,
                    p_matnr  FOR vbrp-matnr  ,
                    p_augru  FOR vbrp-augru_auft  ,
                    p_vbeln  FOR vbrk-vbeln  .
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE  text-002.
    PARAMETERS: nrw RADIOBUTTON GROUP g1 default 'X'user-command check,
                mwd RADIOBUTTON GROUP g1user-command check,
                rws RADIOBUTTON GROUP g1user-command check,
                edu RADIOBUTTON GROUP g1user command check
                standard RADIOBUTTON GROUP g1 .
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    i know we need to use at-selection screen output.
    but how do i set ONLY that particular select option , to no input.

    Hi ,
    Use like This
    User Dynamic Selection
    at selection-screen output.
      select single * from t000md.
      loop at screen.
        case screen-group1.
          when 'REL'.
            if not  p_old is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'BEL'.
            if not p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'ARB'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
          when 'MTA'.
            if  p_new is initial.
              screen-input = '0'.
              screen-required = '0'.
              screen-invisible = '1'.
            endif.
            modify screen.
        endcase.
      endloop.
    Reward Points if it is useful
    Thanks
    Seshu

  • Radio button and selection screen

    hi
    my requirement is that if the user enters some particular combination of value in the select options and clicks a particular radio button there should be an error message displayed.
    1)  I am getting the error message in the form a dialog box , but it has only option of  exit , and the user is thrown of the screen. my requirement is that after the error message the user must still be at the same screen so that he can enter new values.
    2)  the code that i have written also has one more anamoly that the displaying of error depends upon the sequence of  actions .
      if  i enter the value in the select option first and then click the radio button then the error message is displayed which is correct.
    but it doesnt work i click the radio button first and then enter the value, the program is executed and NO ERROR message is flashed.
    here is what i have written
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE  text-001.
    SELECT-OPTIONS: p_year  for  s021-spmon obligatory ,
                    p_kunag  FOR vbrk-kunag  ,
                    p_matnr  FOR vbrp-matnr  ,
                    p_augru  FOR vbrp-augru_auft modif id a1 ,
                    p_vbeln  FOR vbrk-vbeln  .
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE  text-002.
    PARAMETERS:  nrw RADIOBUTTON GROUP g1 user-command check,
                 mwd RADIOBUTTON GROUP g1 ,
                 rws RADIOBUTTON GROUP g1 ,
              edu RADIOBUTTON GROUP g1 ,
             standard RADIOBUTTON GROUP g1 default 'X' .
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    at selection-screen output.
       loop at screen.
       if nrw = 'X' and p_augru-low EQ 'MWD'.
           MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.
       endloop.
    START-OF-SELECTION.
    CASE 'X'.
    WHEN nrw.
    PERFORM set_dates_nrw.
          PERFORM load_data_nrw.
          PERFORM get_cust_info_nrw.
          PERFORM set_alv_field_cat_nrw.
          PERFORM display_alv_nrw.
    endcase.

    Hi
    Change this piece of code
    at selection-screen output.
    loop at screen.
    if nrw = 'X' and p_augru-low EQ 'MWD'.
    MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.
    endloop.
    by
    <b>at selection-screen.
    if nrw = 'X' and p_augru-low EQ 'MWD'.
    MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.</b>
    Reward points if useful.
    Regards,
    Atish

  • Please help! How can I validate Radio Buttons and List Menu with PHP.

    Hello everyone, I have been learning PHP step by step and
    making little projects.
    The point is I find it easy to learn by doing "practical
    projects."
    I have been reading the David Powers's Book on PHP Solutions
    and it's really great, however there is nothing mentioned regarding
    Validating Radio buttons. I know the book cannot cover every aspect
    of PHP and maybe someone in here can help.
    I have been learning how to process HTML forms with PHP.
    The problem is every book or tutorial I have read or
    encountered fall short on validation.
    I'm wondering how I can learn to validate Radio Buttons and
    Select List Menu.
    I have managed to create validation for all other fields but
    have no clue as to how I can get validation for Radio Buttons and
    List Menu.
    I would also like an error message echoed when the user does
    not click a button or make a selection and try to submit the form.
    I would appreciate any help.
    Patrick

    It's not that default value is "None." In fact it's not. It
    will only be
    "none" when the form is submitted.
    Also if your submit button is names 'send' then
    $_POST['send'] will only be
    set if the form was submitted.
    Make sure you didn't hit the refresh button on your browser
    which usually
    reposts the information. Also make sure you did not reach the
    form from
    another form with the same button names.
    Otherwise paste the snippet.
    Also you can check what fields are set in the post array by
    adding this to
    the top of (or anywhere on) your page:
    print_r($_POST);
    Cosmo
    "Webethics" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    Newsgroup User
    > Off the top of my head this should be no different than
    your radio buttons
    > except that 'productSelection' will always fail the
    !isset check when the
    > form is submitted since the default value is "None", and
    therefore always
    > set. :-)
    >
    > So how about this..?
    > <?php
    > if (isset($_POST['send']) and
    ($_POST['productSelection'] == "None"))
    > {echo "Please select a product.";}
    > ?>
    >
    >
    >
    >
    > "Webethics" <[email protected]> wrote
    in message
    > news:[email protected]...
    > > Another question - how do i applied the code you
    just showed me to
    > > select
    > > menu
    > > or select list?
    > >
    > > This is the list:
    > >
    > > <div class="problemProduct">
    > > <label for="productSelection"><span
    class="product_label">Product
    > > Name.</span></label>
    > > <select name="productSelection" id="products"
    class="selection">
    > > <option value="None">-------------Select a
    product----------</option>
    > > <option value="Everex DVD Burner">Everex DVD
    Burner</option>
    > > <option value="Vidia DVD Burner">Vidia DVD
    Burner</option>
    > > <option value="Excerion Super Drive">Excerion
    Super Drive</option>
    > > <option value="Maxille Optical Multi
    Burner">Maxille Optical Multi
    > > Burner</option>
    > > <option value="Pavilion HD Drives">Pavilion
    HD Drives</option>
    > > </select>
    > > </div>
    > >
    > > I thought I could just change the name is the code
    from operatingSystem
    > > to
    > > productSelection.
    > >
    > > Something like this:
    > >
    > > From this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['operatingSystem']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > To this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['productSelection']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > But this does not work, any ideas?
    > >
    > > Patrick
    > >
    >
    >
    >
    >
    > Hey, I tried this about but as you mentioned, since the
    default product
    > value
    > is "None" an error message appears when the page loads.
    >
    > Is there a way to code this things so that even though
    the default value
    > is
    > "None" there ia no error message untle you hit the
    submit?
    >
    > When I applied the code, it messes up the previous code,
    now the operating
    > system is requiring an entry on page load.
    >
    > When I remove the code from the list menu everything
    goes back to normal.
    >
    > I know this is a little much but I have no other
    alternatives.
    >
    > Patrick
    >

  • I was trying to get my personal computer contacts and calendar in outlook on my iphone and ipad.  I was told to use icloud.  I went to control panel and then icloud and selected my contacts and calendar.  Now ALL MY DATA IS DELETED FROM OUTLOOK.  Help!!

    I was trying to get my personal computer contacts and calendar in outlook on my iphone and ipad.  I was told to use icloud.  I went to control panel and then icloud and selected my contacts and calendar.  Now ALL MY DATA IS DELETED FROM OUTLOOK.  Help!!

    I was just on the line with Apple Tech support.  First of all, I learned that when you link contacts to iCloud, it moves all your contacts to another/new address book...look for aother address books and you will see it.  But I found the new address book dies weird things and changes the "Display Names" format.  Evidently (per Apple support tech) there is no way to avoid this problem...so I just delinked the iCloud from my contacts.  The contacts stayed in the iCloud address book...so I exported them to a CSV (comma separated value) file and saved it on my desktop and then imported that list into my original contacts folder.  Now everything is back the way it was...being able to use my contact address book the way I did before.  I was surprised that they never considered or realized this problem...but then the tech guy admitted that they really don't have A LOT of experience using Windows PC's.

  • What is the diffrence  between "Key to Select" and "Selected Key" while creating Radio  Buttons?

    While creating radio buttons there is a confusion regarding two properties "Key to Select" and "Selected Key".Can anybody explain it with example?
    Thanks,
    Vimal

    Hi Vimal,
    Please find my explanation as below
    Key to Select: This is the unique key for each radio button to identify which one is selected
    Selected Key: This holds the "KEY" of selected radio button
    Example:
       Let us say we have 2 radio buttons : Male & Female
         Create a context attribute SELECTED_KEY of type STRING.
         Create an action ON_SELECT for radio button select event
         Now,
         the properties for "MALE" radio button as below
              KEY_TO_SELECT = 'M'
              SELECTED_KEY = "bind to the context attribute SELECTED_KEY
              OnSelect = 'ON_SELECT'.
         The properties for 'Female" radio button as below
              KEY_TO_SELECT = 'F'
              SELECTED_KEY = "bind to the context attribute SELECTED_KEY
              OnSelect = 'ON_SELECT'.
    If we select radio button 'Male', we get the key as 'M' and for 'Female' radio button 'F'.
    check inside the event handler method ONACTIONON_SELECT, you get the 'KEY' of selected radio button.
    So, the context attribute 'SELECTED_KEY'  gets filled with the key of selected radio button
    Hope this helps you in distinguishing the 'KEY TO SELECT' & 'SELECTED KEY' .
    Regards,
    Rama

  • Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Yes, one needs to use some custom JavaScript code to control the other fields' properties.
    Disabling (graying-out) Form Fields by Thom Parker

  • Radio button in selection screen and push button

    Hi experts,
    I want to give radio button in selection screen side by side.
    how we can do this on slection screen.
    secondly i want to resize push button on selection screen.
    please provide me the exact solution.
    thanks
    babbal

    Hi babbal,
    For Your Requriment yo can go to tcode se51 & then give ur program name & give screen number as 1000 because 1000 is default screen for all the programs and in se51 Press Layout button & then you can make changes to the Selection screen according to your requriment
    Hope it will be Helpfull.......!!
    Thanks & Regards,
    Bhushan

  • Sometimes , when I open ITunes Radio, an ad saying that I'm listening to iTunes Radio over and over and I don't get to listen to music. Usually other stations work but select stations just keep repeating the same ad. Why is this?

    Sometimes , when I open ITunes Radio, an ad saying that I'm listening to iTunes Radio over and over and I don't get to listen to music. Usually other stations work but select stations just keep repeating the same ad. Why is this?

    It started working again. I guess it just got messed up

  • Radio buttons and Checkboxes to change appearance when selected

    Hi guys!
    Help needed.
    I want my check boxes and radio buttons when selected to change color from black to "0,64,128", size from 12 to 14 and to become bold.
    Also the default appearance for checkboxes is cross, but I need it to be a check mark.
    I would be so much thankful if you could give me some advice.
    THANK YOU!
    Maria

    Hi Bibhu,
    Thanks for quick response!
    For check mark -- thanks! How could I not see that option!
    For radio button -- it's not working.
    I found this helpful tips on changing appearance of the radio buttons and check boxes. http://www.assuredynamics.com/wp-content/uploads/2010/11/Assure-Dynamics-Checkboxes-and-Ra dio-Buttons-Rev-1.pdf
    I used the first script, but I got an error message. I can't understand what I am doing wrong. It says: "Syntax error near token "{" on line 2, column 1.
    I am confused.
    Help appreciated.

  • The only way I can open a new tab is by right-clicking a bookmarked site and selecting "Open in a New Tab." I can't click on the New Tab + or CTR+T or open via File. WHY?!?

    The only way I can open a new tab in Firefox is by right-clicking a bookmarked site and selecting "Open in a New Tab." I can't click on the New Tab + or CTR+T or open via File. WHY don't the other means work?

    The Ask Toolbar is causing that in the Firefox 3.6.13+ versions. Uninstall that extension.
    There are a couple of places to check for the Ask toolbar:
    * Check the Windows Control panel for the Ask Toolbar - http://about.ask.com/apn/toolbar/docs/default/faq/en/ff/index.html#na4
    * Also check your list of extensions, you may be able to uninstall it from there - https://support.mozilla.com/kb/Uninstalling+add-ons

  • When I unplug my headphones my music pauses. But when I plug them back in the controls won't restart the music and I must go to the list of tracks and select a new one to start again

    I have an iPhone 5 with iOS 7.04
    If I am listening to music using my Apple earphones when I pull the earphones out the music pauses as expected. However, when I go back and plug the earphones in and try to play on with the music nothing happens and I have to go back to the list of tracks and select a new one from the start.
    This also is impacting my listening to music from my iPhone on my motorcuycle audio system. The iPhone is plugged into a USB port on the bike and prior to iOS7 always resumed playing music from wherever it was in a track and displayed the music track name on the bike info panel.
    Since upgrading now the music won't start and again I have to pull the iphone out of the glovebox and go back to the list of tracks and select a new track. But the moment the power interrupts or the nav audio cuts in and switches from iPod the music pauses and doen't restart as it always did.
    Apple, what have you done?? You have basically taken the very first App that made the iPod exist and stop it functioning properly. When are you going to fix this or is there already some obscure setting that needs to be changed but that is not prominently displayed in settings anywhere? How can I make my iPhone function as an iPod properly again for my music needs?

    Nothing wrong, no panic. Some general remarks:
    a. the battery will not be charged when over 95% full; a full battery is not charged
    b. it is good for the battery to have it go down to about 50% before recharging, say once a week at least.
    c. never let the battery go down completely, so that it shuts off on its own: that is very bad for a modern smart Li battery.
    d. sometimes the old "battery calibration" procedure is advised, you should not do that.
    trick: when you click the little battery icon in the top menu bar, you also see if there is a heavy energy user running.

  • I have LR 5.  When I'm in the book module and select the option to "Send Book to Blurb" i get an error message saying "The file does not have a program associated with it...."  How do I fix this?

    I have LR 5.  When I'm in the book module and select the option to "Send Book to Blurb" i get an error message saying "The file does not have a program associated with it for performing this action.  Please install a program, or if one is already installed, create an association in the Default Programs control panel."
    How do I fix this?

    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • How do I maintain data and selection in a SWF after AutoDetach() is called?

    To date, the behaviour of my Flex panel has been based on the old CS4 sample, which stroked boxes using a thickness value specified in a combobox. Now I need to change the behaviour, but I'm not sure how to go about it.
    At the moment the SWF file is loaded on an xxxxUIPanelSelectionObserver::AutoAttach() and unloaded on the AutoDetach(). I also have code in these functions that attaches to and from subjects in the model plug-in. xxxxUIPanelSelectionObserver is derived from ActiveSelectionObserver.
    When the user collapses/minimizes the UI panel (for example into the sidebar on the RHS), AutoDetach() gets called and consequently the SWF file is unloaded and detaches observers from subjects. Consequently any data I passed to the SWF and any selections made are lost. When the user expands the UI panel, AutoAttach is called, the SWF is reloaded and observers are reattached to subjects.
    This is no good for me. When I collapse the panel I need the SWF to remain loaded and for it to be updated when any changes occur to subjects in the model plug-in.
    One approach would be to do a one time only SWF load/observer attach in xxxxUIPanelSelectionObserver::AutoAttach() and remove code from AutoDetach. But this doesn't sound safe to me and likely to lead to a boss/resource leak somewhere down the line.
    Another would be to store all data and selection information in the C++ UI plug-in and pass that into the SWF when it gets reloaded. But this means duplication of information (especially the selection information).
    The other way would be to alter when AutoAttach() and AutoDetach() get called - ideally I don't want AutoDetach to occur until the application closes. But I have no idea how that could be done.
    Any ideas on how to resolve this would be appreciated.
    Thanks in advance,
    APMABC

    I've spotted two functions - AttachToSelectionSubject() and DetachFromSelectionSubject(). They take ISubject* as an argument.
    Given the desciptions, it sounds like it allows the developer to have more control over when AutoAttach and AutoDetach get called, but as there are no examples of them in use, I'm not sure how tio exploit them.

Maybe you are looking for