Redirecting from a frame to _top

When I want to do this:
Click here
I can use:
<SCRIPT LANGUAGE=JAVASCRIPT>window.navigate("somepage.html")</SCRIPT>
But when I use the above code in a frame the somepage.html opens in the frame.
What can I do to let it open, not only in the frame, but using the whole browserwindow.
In other words: what is the redirect-java-equivallent for this:
Click here
I't might turn out to be something very simple, but I'm completely lost.
Thank in advance for repleying
Paul van Leeuwen

you could do:<html>
<head>
<title>Redirecting Demo</title>
<script type="text/javascript">
function locate()
location="./somepage.htm"
</script>
</head>
<body>
<input type="button" onclick="locate()" value="Go to top">
</body>
</html>Hope this little example will help.
Regards

Similar Messages

  • Redirecting from an abstract portal component

    Hi,
    I'm trying to redirect from an abstract portal component to a quicklink. I do it like told in this thread:
    Redirecting to external website from abstract portal component?
    private void redirectUrl(String target, IPortalComponentRequest request) {
      try {
        HttpServletResponse resp = request.getServletResponse(true);
        resp.sendRedirect("../../../../portal/" + target);
      } catch (IOException e) {}
    It works, but the content of my target-URL is still in the Portal-Frame. So I've two time the Portal-Framework-Navigation. Something like this:
    | Welcome         |
    | Welcome         |
    | content         |
    |                 |
    |                 |
    |                 |
    My goal is to redirect the whole page, not only the frame.
    Thanks for any help...
    Regards, Markus

    Perhaps I can do it with
      public void doOnNodeReady(IPortalComponentRequest request){
        request.redirect("http://www.google.de");
    But like in this Tread, it didn't work AbstractPortalComponent and doOnNodeReady

  • Connectiong to OIM from Webcenter Frame Work application for SSO.

    Hi all ,
    I am trying to connect to OIM from Webcenter Frame Work application for SSO.
    Need help on finding documents regarding that.
    Complete installation of OIM 11g(11.1.1.6) is done.
    Regards,
    Shakir

    Hi Vinay,
    Thanks for your reply ,
    The document you suggested has only installation steps which is already completed.
    I just want to know how you connect your web center frame work application to OIM (for SSO) through API's or some other way,
    so that whenever user try to access any page of your application ..you are redirected to OIM
    Thanks & Regards,
    Shakir

  • Data from a frame to another (bis)

    Hi,
    I have a first Frame DataPanelCli, when I use the button "Rechercher" in the class ButtonPanelCli, I find the informations of my company in the class FindRecCli. After when I use the button "STRUCTURE", I use the JFrame StructRecCli BUT I CAN NOT show the data coming from my first Frame.
    Here is the programme, could you please help me.
    regards.
    Thierry
    import java.util.*;
    import java.sql.*;
    import java.io.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.awt.Container;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.*;
    import java.lang.String;
    public class AppClient extends JFrame {
         private DataPanelCli screenvarcli;
         private JTextArea msgout;
         private Connection dbconn;
         public AppClient() {
              //titre fen�tre
              super( " APPLICATION CLIENT");
              // set up GUI environment
              Container p = getContentPane();
              screenvarcli = new DataPanelCli();
              msgout = new JTextArea( 8, 40);
              p.setLayout( new FlowLayout() );
              p.add( new JScrollPane(screenvarcli) );
              p.add( new JScrollPane(msgout) );
              // DB Connection
              try {
                   String url = "jdbc:odbc:Access";
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   // Cr�ation d'une liaison
                   dbconn = DriverManager.getConnection(url, "dba", "sql" );
                   msgout.append("Connection successful !\n");
              catch (ClassNotFoundException cnfex) {
                   cnfex.printStackTrace();
                   msgout.append("Connection unsuccessful\n" +
                        cnfex.toString());
              catch (SQLException sqlex) {
                   sqlex.printStackTrace();
                   msgout.append("Connection unsuccessful\n" +
                        sqlex.toString());
              catch (Exception excp) {
                   excp.printStackTrace();
                   msgout.append(excp.toString());
              // Complete GUI
              ButtonPanelCli controls = new
              ButtonPanelCli(dbconn, screenvarcli, msgout);
              p.add(controls);
    //          RadioButtons rb = new RadioButtons(dbconn, screenvarcli, msgout);
    //          p.add(rb);
              setSize(500,475);
              show();
         public static void main( String args[]) {
              AppClient cli = new AppClient();
              cli.addWindowListener(
                   new WindowAdapter() {
                        public void windowClosing(WindowEvent e) {
                             System.exit(0);
    class DataPanelCli extends JPanel {
         JTextField ICCliFact, INSociete,
              ILAdresseA, ICPostal, ILLocalite, ICPays;
         JLabel LCCliFact, LNSociete,
              LLAdresseA, LCPostal, LLLocalite, LCPays;
         public DataPanelCli() {
              //Label Panel
              JPanel labelPanelCli = new JPanel();
              labelPanelCli.setLayout( new GridLayout(6, 1));
              LNSociete = new JLabel( "Nom ", 0);
              labelPanelCli.add(LNSociete);
              LCCliFact = new JLabel( "Num�ro Client", 0);
              labelPanelCli.add(LCCliFact);
              LLAdresseA = new JLabel( "Adresse ", 0);
              labelPanelCli.add(LLAdresseA);
              LCPostal = new JLabel( "Code Postal ", 0);
              labelPanelCli.add(LCPostal);
              LLLocalite = new JLabel( "Localite ", 0);
              labelPanelCli.add(LLLocalite);
              LCPays = new JLabel( "Pays ", 0);
              labelPanelCli.add(LCPays);
              //TextField Panel
              JPanel screenvarcliPanel = new JPanel();
              screenvarcliPanel.setLayout( new GridLayout(6, 1));
              INSociete = new JTextField("Enter Name - click RECHERCHER", 20);
              screenvarcliPanel.add(INSociete);
              ICCliFact = new JTextField( 20);
              screenvarcliPanel.add(ICCliFact);
              ILAdresseA = new JTextField( 20);
              screenvarcliPanel.add(ILAdresseA);
              ICPostal = new JTextField( 20);
              screenvarcliPanel.add(ICPostal);
              ILLocalite = new JTextField( 20);
              screenvarcliPanel.add(ILLocalite);
              ICPays = new JTextField( 20);
              screenvarcliPanel.add(ICPays);
              // Accessibility Section - relate labels and text fields
              // for use by assistive technologies
              LNSociete.setLabelFor( INSociete);
              LLAdresseA.setLabelFor( ILAdresseA);
              LCPostal.setLabelFor( ICPostal);
              LLLocalite.setLabelFor( ILLocalite);
              LCPays.setLabelFor( ICPays);
              setLayout( new GridLayout( 1, 2));
              add( labelPanelCli);
              add( screenvarcliPanel);
    class ButtonPanelCli extends JPanel {
         public ButtonPanelCli( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              setLayout( new GridLayout( 2 ,0 ));
              JButton findcli = new JButton( "Rechercher" );
              findcli.addActionListener( new FindRecCli( dbc, scv, msg ));
              add( findcli );
              JButton addcli = new JButton( "Ajouter" );
              addcli.addActionListener( new AddRecCli( dbc, scv, msg ));
              add( addcli );
              JButton clearcli = new JButton( "Clear" );
              clearcli.addActionListener( new ClearScreenCli( scv ));
              add( clearcli );
              JButton printcli = new JButton( "Impression" );
    //          printcli.addActionListener( new PrintRecCli( dbc, scv, msg ));
              add( printcli );
              JButton structcli = new JButton( "STRUCTURE" );
              structcli.addActionListener( new StructRecCli( dbc, scv, msg ));
              add( structcli );
              JButton commerccli = new JButton( "COMMERCIAL" );
    //          commerccli.addActionListener( new CommercRecCli( dbc, scv, msg ));
              add( commerccli );
              JButton financli = new JButton( "FINANCIER" );
    //          financli.addActionListener( new FinanRecCli( dbc, scv, msg ));
              add( financli );
    class ClearScreenCli implements ActionListener {
         private DataPanelCli screenvarcli;
         public ClearScreenCli( DataPanelCli scv ) {
              screenvarcli = scv;
         public void actionPerformed( ActionEvent e ) {
              screenvarcli.ICCliFact.setText( "" );
              screenvarcli.INSociete.setText( "" );
              screenvarcli.ILAdresseA.setText( "" );
              screenvarcli.ICPostal.setText( "" );
              screenvarcli.ILLocalite.setText( "" );
              screenvarcli.ICPays.setText( "" );
    // Recherche Ajout Maj record
    // FIND NUMERO CLIENT
    class FindRecCli implements ActionListener {
         private DataPanelCli screenvarcli;
         private JTextArea msgout;
         private Connection dbconn;
         public FindRecCli( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              dbconn = dbc;
              screenvarcli = scv;
              msgout = msg;
         public void actionPerformed( ActionEvent e ) {
              try {
                   String rechnom = new String();
                   rechnom = screenvarcli.INSociete.getText();
              if ( !rechnom.equals( "" )) {
                   Statement statement = dbconn.createStatement();
                   String query = "SELECT * " +
                        "FROM Cli_fact, Adresse " +
                        "WHERE Cli_fact.n_societe_c = '" + rechnom + "' " +
                        "AND c_adresse = c_cli_fact " +
                        "AND c_type_adr = '02'";
    //                    "WHERE n_societe_c = '" +
    //                    rechnom + "' ";
                   msgout.append( "\nSending query " +
                   dbconn.nativeSQL( query ) + "\n" );
                   ResultSet rs = statement.executeQuery( query );
                   display( rs );
                   statement.close();
              else
                   screenvarcli.INSociete.setText( "Entrer le NOM de Soci�t� ");
              catch ( SQLException sqlex ) {
                   msgout.append( sqlex.toString() + sqlex.getMessage() );
         // Display results of query
         public void display( ResultSet rs ) {
              try {
                   rs.next();
                   int recordNumber = rs.getInt( 1);
                   if ( recordNumber != 0 ) {
                        screenvarcli.ICCliFact.setText( String.valueOf(recordNumber) );
                        screenvarcli.INSociete.setText( rs.getString(2));
                        screenvarcli.ILAdresseA.setText( rs.getString(35));
                        screenvarcli.ILLocalite.setText( rs.getString(32));
                        screenvarcli.ICPostal.setText( rs.getString(31));
                        screenvarcli.ICPays.setText( rs.getString(33));
                        msgout.append( "\n Enregistrements trouv�s!!!!!!!\n" );
                   else
                        msgout.append( "\nPas d'enregistrements trouv�s\n" );
              catch ( SQLException sqlex ) {
                   msgout.append( "\n*** Nom de Soci�t� pas dans la data Base ***\n" );
    // ADD CLIENT
    class AddRecCli implements ActionListener {
         private DataPanelCli screenvarcli;
         private JTextArea msgout;
         private Connection dbconn;
         public AddRecCli( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              dbconn = dbc;
              screenvarcli = scv;
              msgout = msg;
         public void actionPerformed( ActionEvent e ) {
              try {
              Statement statement = dbconn.createStatement();
              String rechnom = new String();
              rechnom = screenvarcli.INSociete.getText();
              if ( !rechnom.equals( "" )) {
                   String query = "INSERT INTO cli_fact (" +
                   "n_societe_c) VALUES ('" +
                   screenvarcli.INSociete.getText() + "')";
                   msgout.append( "\nSending query " +
                   dbconn.nativeSQL( query ) + "\n" );
                   int result = statement.executeUpdate( query );
                   if ( result == 1 ) {
                   // read just inserted rec to obtain c_cli_fact field
                   // needed to place STRUCTURE COMMERCIAL FINANCIER
                   msgout.append( "\nInsertion r�ussie\n" );
                   try {
                   query = "SELECT * FROM cli_fact WHERE n_societe_c='" +
                        rechnom + "'";
                   ResultSet rs = statement.executeQuery( query );
                   rs.next();
                   screenvarcli.ICCliFact.setText(String.valueOf(rs.getInt(1)));
                   catch ( SQLException sqlex ) {
                   msgout.append( sqlex.toString() );
              else {
                   msgout.append( "\nInsertion NON r�ussie\n" );
                   screenvarcli.INSociete.setText( "" );
              else
              msgout.append( "\nEntrer au moins le non de soci�t� puis press NOUVEAU\n" );
              statement.close();
              catch ( SQLException sqlex ) {
              msgout.append( sqlex.toString() );
              screenvarcli.INSociete.setText("Nom de soci�t� existe d�j� -- reenter");
    // STRUCTURE
    //class StructRecCli extends JFrame implements ActionListener {
    class StructRecCli implements ActionListener {
         private DataPanelCli screenvarcli;
         private JTextArea msgout;
         private Connection dbconn;
         private boolean firsttime = true;
         public StructRecCli( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              super( " APPLICATION CLIENT STUCTURE " );
              dbconn = dbc;
              screenvarcli = scv;
              msgout = msg;
         public void actionPerformed( ActionEvent e) {
              if (firsttime) {
                   Container cnt = getContentPane();
                   cnt.setLayout( new FlowLayout() );
                   StruCliBox ob = new StruCliBox();
                   cnt.add( ob );
         screenvarcli.INSociete.getText();
                   ButtonPanelStr controls = new
                   ButtonPanelStr(dbconn, screenvarcli, msgout);
                   cnt.add(controls);
                   setSize(500, 475);
                   firsttime = false;
              show();
    class StruCliBox extends JPanel {
         JTextField ICCliFact, INSociete,
              ILAdresseA, ICPostal, ILLocalite, ICPays;
         JLabel LCCliFact, LNSociete,
              LLAdresseA, LCPostal, LLLocalite, LCPays;
         public StruCliBox() {
              //Label Panel
              JPanel s = new JPanel();
              s.setLayout( new GridLayout(6, 1));
              LNSociete = new JLabel( "Nom ", 0);
              s.add(LNSociete);
              LCCliFact = new JLabel( "Num�ro Client", 0);
              s.add(LCCliFact);
              LLAdresseA = new JLabel( "Adresse ", 0);
              s.add(LLAdresseA);
              LCPostal = new JLabel( "Code Postal ", 0);
              s.add(LCPostal);
              LLLocalite = new JLabel( "Localite ", 0);
              s.add(LLLocalite);
              LCPays = new JLabel( "Pays ", 0);
              s.add(LCPays);
              //TextField Panel
              JPanel screenvarcliPanel = new JPanel();
              screenvarcliPanel.setLayout( new GridLayout(6, 1));
              INSociete = new JTextField( 20);
              screenvarcliPanel.add(INSociete);
    //          String rechnom = new String();
    //          screenvarcli.INSociete.getText();
              ICCliFact = new JTextField( 20);
              screenvarcliPanel.add(ICCliFact);
              ILAdresseA = new JTextField( 20);
              screenvarcliPanel.add(ILAdresseA);
              ICPostal = new JTextField( 20);
              screenvarcliPanel.add(ICPostal);
              ILLocalite = new JTextField( 20);
              screenvarcliPanel.add(ILLocalite);
              ICPays = new JTextField( 20);
              screenvarcliPanel.add(ICPays);
              // Accessibility Section - relate labels and text fields
              // for use by assistive technologies
    //          LNSociete.setLabelFor( INSociete);
              LLAdresseA.setLabelFor( ILAdresseA);
              LCPostal.setLabelFor( ICPostal);
              LLLocalite.setLabelFor( ILLocalite);
              LCPays.setLabelFor( ICPays);
              setLayout( new GridLayout( 1, 2));
              add( s);
              add( screenvarcliPanel);
    //          setLayout(new FlowLayout() );
    //          add(s);     
    class ButtonPanelStr extends JPanel {
         public ButtonPanelStr( Connection dbc, DataPanelCli scv, JTextArea msg ) {
              setLayout( new GridLayout( 1 ,0 ));
              JButton addstr = new JButton("Ajouter");
    //          addstr.addActionListener( new AddStructure( dbconn, screenvarcli, msgout, ob));
              add( addstr );
              JButton majstr = new JButton("Mise � jour");
    //          majstr.addActionListener( new MajStructure( dbconn, screenvarcli, msgout, ob));
              add( majstr );
              JButton clestr = new JButton("Clear");
    //          clestr.addActionListener( new CleStructure( dbconn, screenvarcli, msgout, ob));
              add( clestr );
              JButton prnstr = new JButton("Impression");
    //          prnstr.addActionListener( new PrnStructure( dbconn, screenvarcli, msgout, ob));
              add( prnstr );
         // Fermeture de l'application
    //     protected void processWindowEvent(WindowEvent e) {
    //          if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    //               System.exit(0);

    To get data from one frame to another, either create one frame with a reference to the other one so it can discover the data in it, or create a static variable in one of your classes that both frames can access

  • How to redirect from list edit form to another page using jquery in sharepoint 2013

    hi friends i have been trying to find a way to redirect from list edit form to another page using javascript and jquery
    i found lot of codes online but non of them are working for me.
    what i need is i have to save the data in the form and after that it has to redirect to another page. it has to get the url from hyperlink field of the item.
    please help me in this regards

    Not sure if you have gone through below links:
    http://spservices.codeplex.com/wikipage?title=%24().SPServices.SPRedirectWithID
    http://blogs.askcts.com/2013/02/18/using-spservices-and-jquery-to-perform-a-redirect-from-a-sharepoint-list-newform-to-editform/
    Please ensure that you mark a question as Answered once you receive a satisfactory response.

  • How to pass on variables while redirecting from BSP to HTML  page.

    Hi all,
    I have two BSP pages - BSP1, BSP2.  When I click a submit button on BSP1, it should call BSP2 wherein BSP2 will work silently behind the scenes and redirect some variable values through hidden form fields to BSP1 back. 
    User will not see BSP2 in fact.  He just deals with BSP1, but when he clicks the submit button on BSP1, it silently calls BSP2, and then BSP2 will process something behind the scenes and sends back values through hidden form fields to BSP1 by means of redirection. After redirection from BSP2 to BSP1, I am not getting the hidden fields in BSP1.  From the BSP1, I am trying to get the hidden fields of BSP1 using:
    Here is how my code in BSP2 (redirecting to BSP1) looks like:
    <b>BSP2 : Layout:</b>
    <input type="hidden" name="hf1" value="vicky">
    <b>BSP2 : OnInitialization:</b>
      response->redirect( url_BSP1 ).
      navigation->response_complete( ).
    But when I am doing this, the hidden form fields from BSP2 are not being passed to BSP1 back.
    I am trying to get the form values <b>in BSP1</b> as below:
    <b>BSP1 : Layout:</b>
       <%
       data:  hfield type string.
       hfield = request->get_form_field('hf1').
       %>
    I even tried the above code in onRequest, and onInitialization sections.  But I am getting nothing.
    Please give me some ideas on how to deal with the redirection and get the hidden values out of that.
    Thanks in advance.
    Cheers,
    Vicky.

    Hi,
    There are different ways to do it, but let's pick this one. It closes the popup. If you need additional things to be done, you can make a form with all hidden fields, submit that form, do the same close and do whatever you need in the inputprocessing
    <html>
      <head>
    <title>title</title>
          <script language="javascript">
              function init() {
              <%if count eq 1.%>
                  opener.document.form.F<%=field%>.value = '<%=value.%>';
              close();
             <%else.%>
          <%endif.%>
          </script>
      </head>
      <body onLoad="init();">
    </body>
    </html>

  • How to get the values from repeated frame?.

    Hi
    how to get the values from repeated frame?. i have to disply the first 3 digits in another place in my report.
    i have field empno in repeated frame and i want to disply first 3 digits in another place in the same report.
    thanks

    How often do you need to display it? It sounds like you might want to base a summary on that formula with a function of first or last. If it's a per page basis, it can be a page level summary. If it's at a higher level repeating frame, then you can create the summary at that level. I'd suggest taking a look at the online help for summaries using the first/last functions.
    Hope that helps,
    Toby

  • HELP ME i need to pass String variables from one Frame to another

    I need help with some code.
    i need to pass a set of string values from one frame to another.
    from the mainscreen i need to pass what type of seats the user has requested this is done by radio buttons. i need this information to then be passed onto the next frame called Mydialog1 and placed in a textbox with label st. it dosn't comple and i don't know why
    this is getting me depressed. I need some serious help with this
    can anybody get this to work??
    here is the code
    Mainscreen1 code
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class mainscreen1 extends Applet implements ItemListener,
    ActionListener
    private Image layout1;
    private int frame;
    private int xpos,ypos,xdir,ydir;
    public TextField tn, tt1, tt2, total;
    public int value, ticketnum, sum, nr_seats, ctot;
    public Label title, seat, need, payable;
    public Button b1, b2, b3;
    Mydialog1 d;
    String stype, c1, sr;
    public void init()
         setBackground(Color.pink);
    setSize (600, 460);
    setLayout(null);
    //Mydialog1.mehod(sr);
    title=new Label("The Almeida Theater booking system");
         title.setBounds(100,0,400,30);
         title.setFont(new Font("Verdana", Font.PLAIN,24));
         add(title);
    seat=new Label("Please choose a seating location:");
         seat.setBounds(300,40,190,20);
         seat.setFont(new Font("Verdana", Font.BOLD,12));
         add(seat);
    payable=new Label("Total Payable:�");
         payable.setBounds(300,390,100,20);
         payable.setFont(new Font("Verdana", Font.BOLD,12));
         add(payable);
         need=new Label("Please enter the number of seats needed:");
         need.setBounds(300,180,245,20);
         need.setFont(new Font("Verdana", Font.BOLD,12));
         add(need);
         CheckboxGroup sr = new CheckboxGroup();
         Checkbox Stalls = new Checkbox("Stalls", true, sr);
         Stalls.setBounds(490,40,60,25);
         add(Stalls);
         Stalls.addItemListener(this);
         Checkbox Balcony = new Checkbox("Balcony", false, sr);
         Balcony.setBounds(490,65,65,25);
         add(Balcony);
         Balcony.addItemListener(this);
         Checkbox Concessions = new Checkbox("Concessions", false,
    sr);
         Concessions.setBounds(490,90,94,25);
         add(Concessions);
         Concessions.addItemListener(this);
    Button b1=new Button("Quote");
         b1.setBounds(20,395,80,30);
         add(b1);
         b1.addActionListener( this );
         Button b2=new Button("Confirm booking");
         b2.setBounds(110,395,100,30);
         add(b2);
         b2.addActionListener( this );
         Button b3=new Button("Clear");
         b3.setBounds(480,410,100,30);
         add(b3);
         b3.addActionListener( this );
         tt1=new TextField(60);
         tt1.setBounds(300,250,270,20);
    add(tt1);
         tt1.setEditable (false);
         tt1.addActionListener(this);
         tt2=new TextField(60);
         tt2.setBounds(300,300,150,20);
         add(tt2);
         tt2.setEditable (false);
         tt2.addActionListener(this);
         tn=new TextField(3);
         tn.setBounds(545,180,30,20);
         add(tn);
         tn.addActionListener(this);
         total=new TextField(5);
         total.setBounds(400,390,45,20);
         add(total);
         total.setEditable (false);
         total.addActionListener(this);
         xpos = getSize().width/-1400;
         ypos = getSize().height/12;
         layout1 = getImage(getDocumentBase(),"layout1.gif");
         repaint();
    public void itemStateChanged(ItemEvent e)
         String c1 = (String) e.getItem();
         if (c1 == "Stalls")
              value = 20;
         else if (c1 == "Balcony")
              value = 15;
         else
              value = 10;
         tt1.setText("You have chosen to sit in the " + c1 + "
    area");
         tt2.setText("Each seat will cost: �" + value);
         repaint();
    public void clearValue()
              //cb.setSelectiob
              total.setText("");
              tt1.setText("");
              tt2.setText("");
              tn.setText("");
    public void actionPerformed ( ActionEvent e )
    if( e.getActionCommand() == "Quote" )
         int nr_seats = Integer.parseInt(tn.getText());
         total.setText("" +nr_seats*value);
    else if( e.getActionCommand() == "Confirm booking")
         int nr_seats = Integer.parseInt(tn.getText());
         int ctot = Integer.parseInt(total.getText());
         //String stype = String.parseString(c1.getText());
         total.setText("" +nr_seats*value);   
         d = new Mydialog1();      
         d.set_text(nr_seats);
         d.set_texts(ctot);
         stype = sr.getSelectedItem();
    else if ( e.getActionCommand() == "Clear")
         clearValue();
              ticketnum = Integer.parseInt(tn.getText());
              repaint();
         public void paint(Graphics g)
              g.setColor(Color.black);
              g.drawString ("You have chosen:" + ticketnum +"
    seats", 300, 365);
              g.drawImage(layout1,xpos,ypos,null);
    Mydialog1 code
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Mydialog1 extends Frame implements ItemListener,
    ActionListener
    public Label title, custd, custd1, custfn, custad, custsn, custpc,
    custph, custem, custem1, need;
    public Button b1, b2, b3;
    public TextField cfnt, csnt, cdt,cdt2,cdt3,cdt4, tf, tt, st,
    cpct, cph, cem;
    public int value, nr_seats, ctot;
    creditcard cc;
    String stype, c;
    public Mydialog1() //constructor
         init();
    public void init()
         custer(String c)
         stype = c;
         setBackground(Color.yellow);
    setSize (500, 500);
    setLayout(null);
         setLocation(320,140);
         setVisible(true);
         //Mydialog1(Frame f);
    title=new Label("The Almeida Theater booking system");
         title.setBounds(70,20,400,30);
         title.setFont(new Font("Verdana", Font.PLAIN,24));
         add(title);
         CheckboxGroup ct = new CheckboxGroup();
         Checkbox Mr = new Checkbox("Mr", true, ct);
         Mr.setBounds(5,190,36,25);
         add(Mr);
         Mr.addItemListener(this);
         Checkbox Mrs = new Checkbox("Mrs", false, ct);
         Mrs.setBounds(50,190,42,25);
         add(Mrs);
         Mrs.addItemListener(this);
         Checkbox Miss = new Checkbox("Miss", false, ct);
         Miss.setBounds(95,190,45,25);
         add(Miss);
         Miss.addItemListener(this);
    custd=new Label("If above booking details are correct please
    fill in your deatils below");
         custd.setBounds(5,140,400,30);
         add(custd);
         custd1=new Label("If they are incorrect please click on
    close and re-book seats.");
         custd1.setBounds(5,160,400,30);
         add(custd1);
         custfn=new Label("*ForeName:");
         custfn.setBounds(5,220,60,20);
         add(custfn);
         cfnt=new TextField(60);
         cfnt.setBounds(70,220,150,20);
    add(cfnt);
         custsn=new Label("*SurName:");
         custsn.setBounds(230,220,60,20);
         add(custsn);
         csnt=new TextField(60);
         csnt.setBounds(300,220,150,20);
    add(csnt);
         custad=new Label("*Address:");
         custad.setBounds(5,250,55,20);
         add(custad);
         cdt=new TextField(60);
         cdt.setBounds(70,250,180,20);
    add(cdt);
         cdt2=new TextField(60);
         cdt2.setBounds(70,270,180,20);
    add(cdt2);
         cdt3=new TextField(60);
         cdt3.setBounds(70,290,180,20);
    add(cdt3);
         cdt4=new TextField(60);
         cdt4.setBounds(70,310,180,20);
    add(cdt4);
         custpc=new Label("*Postcode:");
         custpc.setBounds(5,330,60,20);
         add(custpc);
         cpct=new TextField(60);
         cpct.setBounds(70,330,180,20);
    add(cpct);
         custph=new Label("*Telephone:");
         custph.setBounds(5,360,65,20);
         add(custph);
         cph=new TextField(60);
         cph.setBounds(70,360,180,20);
    add(cph);
         custem=new Label("E-mail:");
         custem.setBounds(5,390,65,20);
         add(custem);
         cem=new TextField(60);
         cem.setBounds(70,390,180,20);
    add(cem);
         custem1=new Label("eg: [email protected]");
         custem1.setBounds(250,390,150,20);
         add(custem);
         need=new Label("* = required field.");
         need.setBounds(350,400,150,20);
         add(need);
         //seat number being pased into this textbox
         tf = new TextField();
    tf.setBounds(5, 80, 160,20);
         tf.setEditable (false);
    add(tf);
         //seat number being pased into this textbox
         tt = new TextField();
    tt.setBounds(5, 100, 160,20);
         tt.setEditable (false);
    add(tt);
         //seat number being pased into this textbox
         st = new TextField(stype);
    st.setBounds(5, 120, 230,20);
         st.setEditable (false);
    add(st);
         setVisible(true);
         Button b1=new Button("Close");
         b1.setBounds(20,440,80,30);
         add(b1);
         b1.addActionListener( this );
         Button b2=new Button("Proced with booking");
         b2.setBounds(110,440,150,30);
         add(b2);
         b2.addActionListener( this );
         Button b3=new Button("Clear");
         b3.setBounds(350,440,100,30);
         add(b3);
         b3.addActionListener( this );
    public void itemStateChanged(ItemEvent e)
         String c2 = (String) e.getItem();
         if (c2 == "Mr")
              value = 20;
         else if (c2 == "Mrs")
              value = 15;
         else
              value = 10;
    public void clearValuea()
              //cb.setSelectiob
              cem.setText("");
              cph.setText("");
              cdt.setText("");
              cdt2.setText("");
              cdt3.setText("");
              cdt4.setText("");
              cfnt.setText("");
              csnt.setText("");
              cpct.setText("");
              cph.setText("");
              cem.setText("");
    public void actionPerformed( ActionEvent e )
    if( e.getActionCommand() == "Close" )
    this.dispose();
    else if( e.getActionCommand() == "Proced with booking")
    cc = new creditcard();
    else if( e.getActionCommand() == "Clear")
    clearValuea();
         public void set_text (int nr_seats)
         tf.setText (" You have booked " + nr_seats + " seat/s");
         public void set_texts (int ctot)
         tt.setText (" The total is � " + ctot);
         public void SetTextField(String c1)
         st.setText(c1);
    creditcard
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class creditcard extends Frame implements ActionListener
         public Label title, ccd1, ccfn;
         public Button b1, b2;
         public TextField cnt, cdt, ccfnt;
         public String cfnt;
    public creditcard() //constructor
         init();
    public void init()
         setBackground(Color.green);
    setSize (500, 500);
    setLayout(null);
         setLocation(320,140);
         setVisible(true);
         //Mydialog1(Frame f);
    title=new Label("The Almeida Theater booking system");
         title.setBounds(70,20,400,30);
         title.setFont(new Font("Verdana", Font.PLAIN,24));
         add(title);
         ccd1=new Label("If billing address is different please edit below information.");
         ccd1.setBounds(5,50,400,20);
         ccd1.setFont(new Font("Verdana", Font.BOLD,12));
         add(ccd1);
         ccfn=new Label("*ForeName:");
         ccfn.setBounds(5,220,60,20);
         add(ccfn);
         ccfnt=new TextField(60);
         ccfnt.setBounds(70,220,150,20);
    add(ccfnt);
         Button b1=new Button("Close");
         b1.setBounds(20,440,80,30);
         add(b1);
         b1.addActionListener( this );
         Button b2=new Button("Proced with booking");
         b2.setBounds(110,440,150,30);
         add(b2);
         b2.addActionListener( this );
    public void actionPerformed( ActionEvent e )
    if( e.getActionCommand() == "Close" )
    this.dispose();
    else if( e.getActionCommand() == "Proced with booking")
    setBackground(Color.red);

    Here's the new mainscreen1.java file...
    public class mainscreen1 extends Applet implements ItemListener,
    ActionListener
      private Image layout1;
      private int frame;
      private int xpos,ypos,xdir,ydir;
      public TextField tn, tt1, tt2, total;
      public int value, ticketnum, sum, nr_seats, ctot;
      public Label title, seat, need, payable;
      public Button b1, b2, b3;
      Mydialog1 d;
      CheckboxGroup checkGroup; // heres the new global CheckboxGroup variable.
      String stype, c1, dialogString; // new name for the string too...
      public void init()
        setBackground(Color.pink);
        setSize(600, 460);
        setLayout(null);
        //dialogString = "Hi";
        //Mydialog1.mehod(dialogString);
        title=new Label("The Almeida Theater booking system");
        title.setBounds(100,0,400,30);
        title.setFont(new Font("Verdana", Font.PLAIN,24));
        add(title);
        seat=new Label("Please choose a seating location:");
        seat.setBounds(300,40,190,20);
        seat.setFont(new Font("Verdana", Font.BOLD,12));
        add(seat);
        payable=new Label("Total Payable:�");
        payable.setBounds(300,390,100,20);
        payable.setFont(new Font("Verdana", Font.BOLD,12));
        add(payable);
        need=new Label("Please enter the number of seats needed:");
        need.setBounds(300,180,245,20);
        need.setFont(new Font("Verdana", Font.BOLD,12));
        add(need);
        checkGroup = new CheckboxGroup(); // instantiate the global CheckboxGroup
        Checkbox Stalls = new Checkbox("Stalls", true, checkGroup); // add to the CheckboxGroup
        Stalls.setBounds(490,40,60,25);
        add(Stalls);
        Stalls.addItemListener(this);
        Checkbox Balcony = new Checkbox("Balcony", false, checkGroup);
        Balcony.setBounds(490,65,65,25);
        add(Balcony);
        Balcony.addItemListener(this);
        Checkbox Concessions = new Checkbox("Concessions", false, checkGroup);
        Concessions.setBounds(490,90,94,25);
        add(Concessions);
        Concessions.addItemListener(this);
        Button b1=new Button("Quote");
        b1.setBounds(20,395,80,30);
        add(b1);
        b1.addActionListener( this );
        Button b2=new Button("Confirm booking");
        b2.setBounds(110,395,100,30);
        add(b2);
        b2.addActionListener( this );
        Button b3=new Button("Clear");
        b3.setBounds(480,410,100,30);
        add(b3);
        b3.addActionListener( this );
        tt1=new TextField(60);
        tt1.setBounds(300,250,270,20);
        add(tt1);
        tt1.setEditable(false);
        tt1.addActionListener(this);
        tt2=new TextField(60);
        tt2.setBounds(300,300,150,20);
        add(tt2);
        tt2.setEditable(false);
        tt2.addActionListener(this);
        tn=new TextField(3);
        tn.setBounds(545,180,30,20);
        add(tn);
        tn.addActionListener(this);
        total=new TextField(5);
        total.setBounds(400,390,45,20);
        add(total);
        total.setEditable(false);
        total.addActionListener(this);
        xpos = getSize().width/-1400;
        ypos = getSize().height/12;
        layout1 = getImage(getDocumentBase(),"layout1.gif");
        repaint();
      public void itemStateChanged(ItemEvent e) {
        String c1 = (String) e.getItem();
        if (c1 == "Stalls") {
          value = 20;
        else if (c1 == "Balcony") {
          value = 15;
        else {
          value = 10;
        tt1.setText("You have chosen to sit in the " + c1 + " area");
        tt2.setText("Each seat will cost: �" + value);
        repaint();
      public void clearValue() {
        //cb.setSelectiob
        total.setText("");
        tt1.setText("");
        tt2.setText("");
        tn.setText("");
      public void actionPerformed( ActionEvent e ) {
        if( e.getActionCommand() == "Quote" ) {
          int nr_seats = Integer.parseInt(tn.getText());
          total.setText("" +nr_seats*value);
        else if( e.getActionCommand() == "Confirm booking") {
          int nr_seats = Integer.parseInt(tn.getText());
          int ctot = Integer.parseInt(total.getText());
          total.setText("" +nr_seats*value);
          d = new Mydialog1();
          d.set_text(nr_seats);
          d.set_texts(ctot);
          // You can do your checkbox selection data transfer here like this...
          // I used d.SetTextField because you had that defined in the Mydialog1 class.
          Checkbox chkBx = checkGroup.getSelectedCheckbox();
          d.SetTextField(chkBx.getLabel());
        else if ( e.getActionCommand() == "Clear") {
          clearValue();
        ticketnum = Integer.parseInt(tn.getText());
        repaint();
      public void paint(Graphics g)
        g.setColor(Color.black);
        g.drawString("You have chosen:" + ticketnum +" seats", 300, 365);
        g.drawImage(layout1,xpos,ypos,null);
    }

  • How do I go directly from one frame to another particular frame which is far away in the time line? (e.g the two frames are separated by 100 frames)

    How do I go directly from one frame to another particular frame which is far away in the time line? (e.g the two frames are separated by 100 frames). I mean, is it possible to take the playhead from one frame to another frame directly which is 100 frames away in the time line? Thanks for any reply.

    In the Timeline, go to the first frame and press M to put a marker on it. Go to the other frame you want to jump to and put a marker on that one too.
    Now press Ctrl+Semicolon to go to the previous marker - or Ctrl+Comma to go to the next marker.
    Andy

  • How do I create a photo in jpg or other photo format from a frame within iMovie11.  The suggestion I have found from earlier versions of iMovie does not create a jpg file that can be revealed in Finder. Help please.

    How do I create a photo in jpg or other photo format from a frame in iMovie. The previous suggestions on here do not create a jpg file when you chose reveal in finder when using iMovie11 and OS X

    First, get an app called MPEG Streamclip, which is free. (google MPEG Streamclip from Squared 5)
    Open MPEG Streamclip.
    In iMovie, select the clip you need. Then, right-click/Reveal in Finder.
    Drag this clip into MPEG Streamclip
    In MPEG Streamclip, move the playhead to the frame you want.
    In MPEG Streamclip, click FILE/EXPORT FRAME.
    Choose JPEG, TIFF, or PNG and give it a name.
    You can then drag this photo into iPhoto.
    Here is a video I made that steps through this...
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • How to put a string from one Frame to another Frame?

    Dear all,
    How can I put a String from one Frame to another Frame?
    When the application started, the Frame 'WindowX' will be displayed. After you press the 'openButton', a whole new Frame (inputFrame) will be shown. In this Frame )(inputFrame) you can write a String in a TextField. After pressing the okButton, this String will be sent to the first Frame 'WindowX'.
    But does anyone know how to realize the sending part?
    I've tested this code on Win98 SE and JDK1.2.2.
    Hope someone can help me. Thanks in advance.
    import java.awt.*;
    import java.awt.event.*;
    public class WindowX extends Frame implements ActionListener, WindowListener
         private Button openButton;
         private TextField resultField;
         public static void main(String [] args)
              WindowX wx = new WindowX();
              wx.setSize(300,100);
              wx.setVisible(true);
         public WindowX()
              setLayout(new FlowLayout());
              openButton=new Button("open");
              add(openButton);
              openButton.addActionListener(this);
              resultField=new TextField(10);
              add(resultField);
              resultField.addActionListener(this);
              addWindowListener(this);     
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==openButton)
                   inputFrame ip=new inputFrame();
                   ip.setSize(200,80);
                   ip.show();
         public void place(String theString) //this doesn't work
              resultField.setText(theString);
         public void windowClosing(WindowEvent event)
              System.exit(0);
         public void windowIconi......
    class inputFrame extends Frame implements ActionListener,WindowListener
         String theString = "";
         Button okButton;
         TextField inputField;
         WindowX myWX=new WindowX();   //??
         public inputFrame()
              setLayout(new FlowLayout());
              inputField=new TextField(10);
              add(inputField);
              inputField.addActionListener(this);
              okButton=new Button("OK");
              add(okButton);
              okButton.addActionListener(this);     
              addWindowListener(this);     
         public static void main(String[] args)
              Frame f = new Frame();
              f.show();
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==okButton)
                   theString=inputField.getText();
                   myWX.place(theString);   //??
                   dispose();
        public void windowClosing(WindowEvent e) {
        dispose();
        public void windowIconi......
    }

    Thanks for your reply!
    But I got an other problem:
    I can't refer to the object (wx) made from the main Frame 'WindowX', because it's initialized in 'public static void main(String [] args)'...
    Hope you can help me again... Thanks!
    import java.awt.*;
    import java.awt.event.*;
    public class WindowX extends Frame implements ActionListener, WindowListener
         private Button openButton;
         private TextField resultField;
         public static void main(String [] args)
              WindowX wx = new WindowX();   //!!
              wx.setSize(300,100);
              wx.setVisible(true);
         public WindowX()
              setLayout(new FlowLayout());
              openButton=new Button("open");
              add(openButton);
              openButton.addActionListener(this);
              resultField=new TextField(10);
              add(resultField);
              resultField.addActionListener(this);
              addWindowListener(this);     
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==openButton)
                   inputFrame ip=new inputFrame(wx);
                   ip.setSize(200,80);
                   ip.show();
         public void place(String theString)
              resultField.setText(theString);
         public void windowClosing(WindowEvent event)
              System.exit(0);
         public void windowIconi....
    class inputFrame extends Frame implements ActionListener,WindowListener
         String theString = "";
         Button okButton;
         TextField inputField;
         WindowX parent;
         public inputFrame(WindowX parent)
              setLayout(new FlowLayout());
              this.parent=parent;
              inputField=new TextField(10);
              add(inputField);
              inputField.addActionListener(this);
              okButton=new Button("OK");
              add(okButton);
              okButton.addActionListener(this);     
              addWindowListener(this);     
         public static void main(String[] args)
              Frame f = new Frame();
              f.show();
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==okButton)
                   theString=inputField.getText();
                   parent.place(theString);
                   dispose();
        public void windowClosing(WindowEvent e) {
        dispose();
        public void windowIconi..........
    }          

  • Passing data from one frame to another frame

    hello all, i am having a problem with passing data from one frame from another. I have a main frame when you click on connect button it display the second frame(class) that has 2 text fields and 2 buttons. When i click on connect it check if the data is correct. If the data is correct i want that frame to close and pass the data back to main frame. How can i do that.
    thank you

    hello all, i am having a problem with passing data
    from one frame from another. I have a main frame when
    you click on connect button it display the second
    frame(class) that has 2 text fields and 2 buttons.
    When i click on connect it check if the data is
    correct. If the data is correct i want that frame to
    close and pass the data back to main frame. How can
    i do that.
    thank you
    the original problem sounded like an ideal opportunity to use Modal Dialog. if you want one frame to display another to get user input then you need to stop the method in the main frame from executing until you recieve a valid input.
    you can use your own class and keep all of the components that you have in the connect frame but you would have to extend JDialog instead of JFrame.
    there is a way around it!
    if you must use JFrame for both, then you need to have access to the main frame in the connect frame, maybe pass the pointer to the constructor??
    anyway, when the connect frame is done with its duties, you have to use the pointer to call another method in the main frame that will continue the process. otherwise main frame doesn't know when connect frame is done and by that time, the method in main frame that instantiated the connect frame has long since died.
    also, it allows things to happen in the other window that you may not want to happen until the connect frame is done
    typically users of software start clicking around on things and you could have three or four connect frames going at the same time
    it's really best to use a Modal Dialog, it really can look just like a JFrame!!!!!!!!!!!!!!

  • Retreive data from a frame to another

    Hi All,
    I have a Frame AppCli and in it I have the numcli, namecli, street, tel.....
    I want to send from the Frame AppCli the values numcli and the namecli to another Frame StruCli.
    Can I do this or have I to use another king of class
    regards.
    Thierry

    Yes you can.

  • How to create HTTP 301 redirect from UCM 7.5.2

    Is it possible to send a HTTP response with a permanent redirect from a UCM/Stellent website? We're using version 7.5.2 with iDoc script.
    We can use the iDoc function setHttpHeader() to send the Location HTTP header, but how to send the HTTP response code 301, to signal the permanent redirect to the browser?

    Hi Rob,
    If you are using IIS there is a config variable that allows you do this. First create a virtual directory in IIS point to <install dir>\Inetpub\wwwroot directory.
    and then do the below steps
    a.     Login to Content Server
    b.     Click on Administration Admin Server
    c.     Click on Content Server instance name(button)
    d.     Click on General Configuration
    e.     Update SSWebFilterIgnoreList configuration variable
    f.     SSWebFilterIgnoreList=virtualDirectory There should not be any spaces
    g.     Click on save
    h.     Restart Content Server
    Let me if this is what you are looking for.
    regards,
    deepak

  • How can I pass variable's from one frame to other

    //This is the first frame where the value in the TextField
    //tf1 and tf2 are to be passed to 2nd Frame
    import java.awt.*;
    import java.awt.event.*;
    public class del extends Frame implements ItemListener,ActionListener
    public Panel p,p1,p2;
    public Button b,n;
    public Label l1,l2;
    public TextField tf1,tf2;
    public del()
    setLayout(new FlowLayout(FlowLayout.LEFT));
    Panel p=new Panel();
    n=new Button("Submit");
    p.add(n);
    add(p);
    l1=new Label(" Enter the Temperature : ");
    tf1=new TextField(5);
    p.add(l1);
    p.add(tf1);
    add("South",p);
    l2=new Label(" Enter the Compund ");
    tf2=new TextField("N-OCTANE",15);
    p1=new Panel();
    p1.add(l2);
    p1.add(tf2);
    add("South",p1);
    setSize(600,700);
    setVisible(true);
    public void itemStateChanged(ItemEvent ie)
    repaint();
    public void actionPerformed(ActionEvent a)
    if(a.getSource()==n)
    this.setVisible(false);
    new Finalput1();
    repaint();
    public static void main(String[]args)
    del d=new del();
    //2nd Frame which will appear on clicking submit button
    import java.awt.*;
    class del1 extends Frame
    public static double T;//value in 1st text field has to be stored in variable T
    String compd=" ";//value in 2nd textField has to be stored in this string
    TextField tf;
    public del1()
    setLayout(new FlowLayout());
    setSize(800,700);
    setVisible(true);
    public void paint(Graphics g)
    g.drawString(" INPUT DATA : - ",30,120);
    g.setColor(Color.black);
    g.drawString(" Component Name ="+compd,20,160);
    g.drawString(" Temperature of the Mixture ="+T,30,250);
    public static void main(String[]args)
    new del1();
    Pls help me.
    I will be happy if anyone help's me!

    Both your classes seem to be independent applications. (they are public, and they have their public static void main)
    Is this your intention? If so, your question is how to pass data from one application to another. That can be done in many ways, and it is a complicated issue. (if one application wants to pass data to another, you first have to find the other one, and if it isnt running you might want to start... - lots of things to think about.)
    If what you want to do is simply to pass data from one Frame to another, the matter is quite more simple.
    Here is a sample:
    import java.awt.event.*;
    import java.awt.*;
    public class F1 extends Frame implements ActionListener
    private F2 theOtherFrame;
    public F1()
    Button b;
    b=new Button("Action");
    b.addActionListener(this);
    add(b);
    setSize(100,100);
    setVisible(true);
    public void actionPerformed(ActionEvent e)
    if (theOtherFrame == null)
         theOtherFrame = new F2();
         theOtherFrame.setSize(100, 100);
    theOtherFrame.setSomeData("Her you have som data");
    theOtherFrame.setVisible(true);
    public static void main(String[] args)
    new F1();
    class F2 extends Frame
    private String strData;
    private Label lab;
    public void setSomeData(String str)
    lab.setText(str);
    repaint();
    public F2()
    lab = new Label();
    add(lab);

Maybe you are looking for

  • Auto Assignment of Business Place in Sales Orders

    Dear Experts, So far my knowledge a business place can be assigned to sales office and if the sales document is with some VAT Tax code it takes business place automatically. But I have sales which is free of tax. Please advise how to assign business

  • Do Text Edit's new features apply to other apps?

    Do the new features in Text Edit (holding down a letter key to evoke accent marks, spelling auto correction bubbles) apply to any other Apple products such as Pages, Keynote, Numbers, or any other word processors, such as Microsoft Word? Or do these

  • Duplicate Accounting Documents

    Dear ALL, 2 Accounting Documents were generated for 1 billing document,How this happens? Please advice me on how to correct this. TIA KOGI

  • User Function in Fullscreen ALV

    Hi guys, i'm using a fullscreen ALV (CL_SALV_TABLE) and want to add a user defined function. On halp.sap.com i found a hint that i have to copy the GUI-STATUS SALV_TABLE_STANDARD and add that copy to ALV by using the method SET_SCREEN_STATUS. Now the

  • Fetching Actual Price of Item for Profit Report

    All items in system are managed serially, while Inward entry in GRPO transaction price  of item is defined. For Ex Item X there are four GRPO transaction with a value Purchase Value 1= 2500 , Purchase Value 2= 2600 , Purchase Value 3= 2700 , Purchase