How can I display a confirm box using JSP?

Dear All,
I am new to the Java language; please help!
What I'd like to do is to prompt the user, within a loop, to click OK to continue the loop or CANCEL to exit the loop. I've tried to use JavaScript in conjunction w/ Form submittion to handle the parameter passing ('true'/'false') of the confirm box to a JSP. Yet, every form submission will cause the JSP page to re-load from the top which is the incident I'd like to avoid.
Is there anyway I can have a confirm box written using JSP? Please help!!
Thanks,Wing.

if you do any modifications in the jsp page the whole page will be refreshed to show the latest result after modification.
if you dont want the whole page to be refreshed
you can pass the control to another page after the confirm box or you can use frames to your interest.

Similar Messages

  • How can i display a message box when error comes in jsp?

    Hi,
    i need to display a message box whenever an error comes in my jsp. Actually my appln is that i am creating a bar chart using one applet by taking data from the database. When a user does not select a number data for y axis, now in the centre of the web page one java error is coming. "not in number format". it is looking very odd.
    so i want to display the error in a message box whenever it comes as above. pls help me how can i do the same...
    Regds,
    Abhi...

    Hi,
    thanx for ur response. so u mean to say that i can
    display the errors in the web page itself instead of
    displaying as a message box?Either way. You can have the JSP send a message to the applet to display a message box. Or you can just have the JSP do it. or you can have the applet detremine if the JSP would produce an error and then display the message it would display.
    >
    actually i am using servlets. jsp pages are used only
    as the front end. all the background works are doing
    in servlet only.It should be the same in any case. Is the applet connecting to the JSP pages or are you having the browser do it?
    >
    pls get back...

  • How can i display database data in my jsp page?

    actually i m doing a small appliaction of quiz test.
    where i m keeping my question and answers in the database.
    now i want to pull questions from the database and display in the jsp or html page.for each question i m having 4 options 4 them.
    like this user has to answer the question and display the resuklt in the end.
    so how can i do this?
    can i get any example or source code for this from any sites?

    I never tried this... but doesn't the normal html <applet> tag work?

  • How can you display to multiple monitors using a Mac book pro

    I Need to out put my display to a projector and a vison mixer the projector is VGA and the vision mixer is DVI is there a adaptor that I can  use or hardware that will carry out this task for me

    Sorry, but your Mac can only support a single monitor. Will need to buy a Mini-DisplayPort to DVI or VGA adapter, you will need to decide what you need best.
    The newer (2011 & forward) Macs come with a Thunderbolt port instead, and that supports up to 2 cascaded devices.

  • How can I display to a projector using the VGA adapter?

    Using a VGA Adapter to the Thunderbolt connection, I  can display a Keynote presentation just fine, but I cannot seem to display the screen to project an internet page to a group of people. Is there some trick to this?

    From your description my guess is that you need to open System Preferences and select the Displays tab. Then click on the Arrangement tab and in the bottom right hand corner click on Mirror Displays. My guess is that at the moment your display setup is for 2 separate displays, 1 for the computer and 1 for the projector.

  • How can i display the success msg using module pool

    Hi frnds,
    I want to display the error mesg or success msg in a dialogbox with ok button through module pool,
    Pls help me any one.
    Thanks in advance.

    Hi,
    Check this example in SAP:
    DEMO_MESSAGES -
    > This is a good example of displaying messages given by SAP.
    For more information on messages please visit this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/91/dec863880411d194cb0000e8353423/content.htm
    This will tell you the complete status of each messages in the ABAP with its displaying position on the screen.
    May this information helps you.
    Thanks
    Deepak Sharma

  • How can I display Chinese Character correctly in JSP

    <p>Dear Expert,</p><p>Now I develop web application which using CR report, the development tool is IBM RAD(rational) and the database is DB2 UTF-8. Because need user to input something in JSP, so the programmer use "GB2312" to convert to insert into the database. But when I create the crystal report and view in the web, the Chinese character can&#39;t disply correctly, like "???????", even I formated the font in report, doesn&#39;t work too.</p><p>And I set the report JSP charset to "GB2312" or "UTF-8", both of them failed. Following is my JSP seting:</p><p><%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%%></p><p>or <%@ page language="java" contentType="text/html;charset=GB2312" pageEncoding="GB2312"%%></p><p>And I think I must convert the data from database site firstly, then display, but I don&#39;t know where I can coding it and how to coding? Could any one tell me how to get it? </p><p>I use RAD(Rational) as development tools.</p><p>Thanks so much for your any comments. Many thanks!</p><p>Steven</p>

    <p>Hi Steven,</p><p>         It sounds like you are on the right track to get the Chinese data to appear up correctly in the report. Can you tell me if you are using the JSF viewer or the JSP viewer?</p><p>From what the developers are telling me the following should work:</p><p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">For JSP viewers to set  content type correctly you can either use</span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial"><%@ page  contentType="text/html;charset=UTF-8" %></span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">Or</span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">response.setContentType("text/html;charset=UTF-8âu20AC)</span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">or  </span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">simply call  viewer.setOwnPage(true); if it not necessary to blend with other  pages.</span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial"> </span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">For JSF viewer the  third option is not available.</span></font></p><p class="MsoNormal">What does your JSP page code look like? Also, what does the output look like?</p><p>Finally, one last thing is to ensure that the font you are using in the report is available to the engine at runtime. This will mean that it wll need to be installed on the application server where your JSP page is running. Give this a try and let me know what you find. </p><p>Regards,<br/>Sean Johnson (CR4E Product Manager) <br/><br/> Rate this plugin @ Eclipse Plugin Central          </p>

  • How can I display the date on a jsp page??

    Is there anyway to display the current date when someone views a jsp page??? Can I get it from the server or something like that?
    Thx
    Rich

    is there any type of formatting that goes witth
    that.....Most definitely -- check out the java.text.DateFormat object and its cohort java.text.SimpleDateFormat.
    For example, if you wanted to display the current date in MM/DD/YYYY format, you could do the following:
    <%-- This could go somewhere near the top of the JSP %>
    <%
    SimpleDateFormat f = new SimpleDateFormat("MM/dd/yyy");
    %>
    <% And later on, you could have... %>
    <%= f.format(new Date()); %>Note that I've omitted the proper <%import%> directives.
    -Navin

  • How can I display iPad on tv via apple tv.

    How can I display screen from iPad using apple tv?

    The correct answer is only with a limited number of apps, you cannot share the iPad screen, unfortunately. YouTube, iPhoto. I am very disappointed keynote presentations are not supported.

  • How can I display JTextFields correctly on a JPanel using GridBagLayout?

    I had some inputfields on a JPanel using the boxLayout. All was ok. Then I decided to change the panellayout to GridBagLayout. The JLabel fields are displayed correctly but the JTextField aren't. They are at the JPanel but have a size of 0??? So we cannot see what we type in these fields... Even when I put some text in the field before putting it on the panel.
    How can I display JTextFields correctly on a JPanel using GridBagLayout?
    here is a shortcut of my code:
    private Dimension sFieldSize10 = new Dimension(80, 20);
    // Create and instantiate Selection Fields
    private JLabel lSearchAbrText = new JLabel();
    private JTextField searchAbrText = new JTextField();
    // Set properties for SelectionFields
    lSearchAbrNumber.setText("ABR Number (0-9999999):");
    searchAbrNumber.setText("");
    searchAbrNumber.createToolTip();
    searchAbrNumber.setToolTipText("enter the AbrNumber.");
    searchAbrNumber.setPreferredSize(sFieldSize10);
    searchAbrNumber.setMaximumSize(sFieldSize10);
    public void createViewSubsetPanel() {
    pSubset = new JPanel();
    // Set layout
    pSubset.setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    // Add Fields
    gbc.gridy = 0;
    gbc.gridx = GridBagConstraints.RELATIVE;
    pSubset.add(lSearchAbrNumber, gbc);
    // also tried inserting this statement
    // searchAbrNumber.setText("0000000");
    // without success
    pSubset.add(searchAbrNumber,gbc);
    pSubset.add(lSearchAbrText, gbc);
    pSubset.add(searchAbrText, gbc);
    gbc.gridy = 1;
    pSubset.add(lSearchClassCode, gbc);
    pSubset.add(searchClassCode, gbc);
    pSubset.add(butSearch, gbc);
    }

    import java.awt.*;
    import java.awt.event.*;
    import javax .swing.*;
    public class GridBagDemo {
      public static void main(String[] args) {
        JLabel
          labelOne   = new JLabel("Label One"),
          labelTwo   = new JLabel("Label Two"),
          labelThree = new JLabel("Label Three"),
          labelFour  = new JLabel("Label Four");
        JLabel[] labels = {
          labelOne, labelTwo, labelThree, labelFour
        JTextField
          tfOne   = new JTextField(),
          tfTwo   = new JTextField(),
          tfThree = new JTextField(),
          tfFour  = new JTextField();
        JTextField[] fields = {
          tfOne, tfTwo, tfThree, tfFour
        Dimension
          labelSize = new Dimension(125,20),
          fieldSize = new Dimension(150,20);
        for(int i = 0; i < labels.length; i++) {
          labels.setPreferredSize(labelSize);
    labels[i].setHorizontalAlignment(JLabel.RIGHT);
    fields[i].setPreferredSize(fieldSize);
    GridBagLayout gridbag = new GridBagLayout();
    JPanel panel = new JPanel(gridbag);
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.weightx = 1.0;
    gbc.weighty = 1.0;
    gbc.insets = new Insets(5,5,5,5);
    panel.add(labelOne, gbc);
    panel.add(tfOne, gbc);
    gbc.gridwidth = gbc.RELATIVE;
    panel.add(labelTwo, gbc);
    gbc.gridwidth = gbc.REMAINDER;
    panel.add(tfTwo, gbc);
    gbc.gridwidth = 1;
    panel.add(labelThree, gbc);
    panel.add(tfThree, gbc);
    gbc.gridwidth = gbc.RELATIVE;
    panel.add(labelFour, gbc);
    gbc.gridwidth = gbc.REMAINDER;
    panel.add(tfFour, gbc);
    final JButton
    smallerButton = new JButton("smaller"),
    biggerButton = new JButton("wider");
    final JFrame f = new JFrame();
    ActionListener l = new ActionListener() {
    final int DELTA_X = 25;
    int oldWidth, newWidth;
    public void actionPerformed(ActionEvent e) {
    JButton button = (JButton)e.getSource();
    oldWidth = f.getSize().width;
    if(button == smallerButton)
    newWidth = oldWidth - DELTA_X;
    if(button == biggerButton)
    newWidth = oldWidth + DELTA_X;
    f.setSize(new Dimension(newWidth, f.getSize().height));
    f.validate();
    smallerButton.addActionListener(l);
    biggerButton.addActionListener(l);
    JPanel southPanel = new JPanel(gridbag);
    gbc.gridwidth = gbc.RELATIVE;
    southPanel.add(smallerButton, gbc);
    gbc.gridwidth = gbc.REMAINDER;
    southPanel.add(biggerButton, gbc);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(panel);
    f.getContentPane().add(southPanel, "South");
    f.pack();
    f.setLocation(200,200);
    f.setVisible(true);

  • How can i display the values in the vector in a jsp using jstl

    in a task i am recieving a vector in a jsp... how can i display those vector values in the jsp using jstl.... plz help me
    thanks in advance

    <%
    here you got vector say; v
    pagecontext.setAttribute("varname",v);
    %>
    <c:forEach var="i" items="${varname}">
    <c:out value="${i}">
    </c:forEach>

  • How can I display special characters of NonEuropean languages (French, Italian, Spanish, German and Portuguese.) using import string mechanism

    I would like to translate the User Interface of my application to French, Italian, Spanish, German and Portuguese.
    When I put special characters in the import string file they showed up as ? (question mark)
    The import strings file includes the following parameters for each string: font, text, size and style. (but no field for script)
    In order to use a unicode font such as Arial I need to select a french script. But this option is not supported bu LabView (As far as I saw)
    A) Is there a font which is directly German/ French etc and not regula font + script parameter?
    B) Are there another required step
    s for special characters support? (When I put speciual characters in the import string file the showed up as ? question mark)

    This was discussed last week in this group- read the previous messages.
    Look for the thread "Foreign Languages in Labview"
    And recite the mantra
    ActiveX is good
    ActiveX is holy
    All Hail Bill
    Those who claim otherwise are heretics and not to be trusted
    Actually, in this case the non-ActiveX suggestions may be good.
    talia wrote in message
    news:[email protected]..
    > How can I display special characters of NonEuropean languages (French,
    > Italian, Spanish, German and Portuguese.) using import string
    > mechanism

  • How can I display current iPhone GPS coordinates using compass app

    How can I display current iPhone GPS coordinates, when traveling overseas with no access of data or wifi
    using "iphone compass app"(Both the latitude and longitude) ??
    if iphone compass app require any sort of data
    what alternative would there be? (to document the coordinates)?

    Hi
    Iphone 5s 16 gb 8.1
    My fone freeze whenever i charge my fone its appear white screen with apple logo.. and as soon as i try to press hold home and power button
    it shows battery drained sign>> i m facing this problem from last one week
    and itunes also not  getting cconnected
    can any1 please help me out
    sorry for poor english

  • How can I display total playlist size in iTunes 11.  It used to be visible for each playlist or CD, but I can't find it now.

    How can I display total playlist size in iTunes 11.  It used to be visible for each playlist or CD, but I can't find it now.

    The Friend: Thanks from me too for that super simple fix!! I feel kinda stupid for not knowing that.
    Too bad Apple didn't:
    Give it a more intuitive name than "Status Bar"... "status" is what is shown at the top of the window along with the Artist and Song Title, e.g.; how far into the song/podcast/video I've played and how much is left,
    Put the keyboard commands in a more prominent place in their release notes when version 11 came out so we could more easily find the information they decided to hide in this attempt to make the desktop less cluttered and
    Allow us the option of displaying the data size along with the song count and duration just beneath the playllist title. The status bar is a redundant listing of information except for the data size!  Poorly conceived!
    Perhaps Apple will remedy this in a future release. For those of us who like to burn our playlists to CD, DVD and even a thumb drive this information is essential. WIthout it, we're left to guess whether a given playlist will fit on our target device.
    Thank you!

  • How can we display svg files in flex at runtime using FileReference? Actually we are trying to load

    how can we display svg files in flex at runtime using FileReference? Actually we are trying to load the svg file from the  local directory.

    This should give you the JRE version;
    System.out.println(System.getproperty("java.version"));
    and this should tell you where its running from;
    System.out.println(System.getProperty("java.home"));
    There are loads more system properties, check the JDK documentation for java.lang.System and look at the getProperties method which has a list.
    Stewart

Maybe you are looking for