How do you make 2 buttons that have different link in one form?

<form name="form1" method="post" action="">
<input name="cmdBtn" type="submit" id="cmdBtn" value="one">
<input name="cmdBtn" type="submit" id="cmdBtn" value="two">
</form>
i want the link of button "one" to have different link with button "two". How can i do it using jsp?
thanks

i posed this question to the javascript forum but no reply, so i just post it here if in case there are jsp users here who knows the answer to my question. hope u guys understand. thanks
I have 2 jsp files namely page1.jsp and page2.jsp.
page1.jsp
<%@ page contentType="text/html; charset=" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
function MM_openBrWindow(theURL,winName,features)
{ //v2.0
window.open(theURL,winName,features);
</script>
</head>
<body>
<form name="form1" method="post" action="">
<p>
<input name="txtValue" type="text" id="txtValue" value="i want this value to be passed when i click the 'open new window' button" size="80">
</p>
<p>
<input type="submit" name="Submit" onMouseDown="MM_openBrWindow('page2.jsp','','scrollbars=Yes,width=500,height=500')" style="TEXT-DECORATION:none" value="Open New Window">
</p>
</form>
</body>
</html>
page2.jsp
<%@ page contentType="text/html; charset=" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
String value = request.getParameter("txtValue");
%>
<form name="form1" method="post" action="">
<p> Value is <%=value%></p>
</form>
</body>
</html>
what the code does is it open a new window (page2.jsp) if you click the button in page1.jsp, my problem is, i can't pass the value of txtValue from page1.jsp to page2.jsp, How can i do it?
thanks

Similar Messages

  • How do you make an expanadble text box in a pdf form?

    How do you make a text box expand automatically in a pdf form?

    Hi;
    Is this a question related to FormsCentral or to PDF forms in general?  If it is for PDF forms you should ask in the Acrobat forms forums: http://forums.adobe.com/community/acrobat/forms
    If it is related to FormsCentral the text boxes do not expand automatically in a PDF, except for when saving a Response as a PDF form, when the responses from the View Responses tab are saved as a PDF form all Multi-line text fields are expanded to fit the text the user had entered.
    Thanks,
    Josh

  • How do you make a SpryMenuBar a different color for each page?

    Hey everyone. I'm new to web design and dreamweaver is definitly kicking my butt. Anyway, I'm trying to create a simple website for a foundation and I want to make each page have a different color Sprymenubar to match the color theme of the different pages. The site will only have about 6 color themes max so this shouldn't be a huge undertaking. The trouble I'm having is I have created the home page (the color green) and right now I'm working on the second page (the color blue). When I added a new sprymenubar and changed the CSS Rule to make the color of the menu blue and the hover color light blue it then changes the color of the menu on the home page from Green to Blue. How annoying! I even tried starting from scratch and inserting another horizontal sprymenubar but I can't seem to make another horizontal sprymenubar with a whole new set of rules independent from the first one. What can I do? Do I have to make an editable region or am I just not clicking a certain button to make the new menubar independent from the first one?
    Examples
    First this
    Then this
    And then this happens 
    Let me know!!

    Ok I found a similar question on this forum that was answered and helped. If anyone comes across this wondering the same thing, copy and paste your SpryMenuBarHorizontal.css file and rename the copy to something like "(Title_Of_Page)SpryMenuBarHorizontal.css" and then replace "SpryMenuBarHorizontal.css" in your code to <link href="../SpryAssets/(Title_Of_Page)SpryMenuBarHorizontal.css" and then you are good to go.

  • How do you make the font of a link different to the link font in Page Properties?

    In my case, I've designated links as Century Gothic, 16, black in Page Properties. I want most of the links on my page to be like that. However, there is one link that I'd like to look different (I want it to be size 12). How would I change that without changing the other links?

    Hi Bob,
    If the link change is only going to be happening on a single page, you might
    want to take a look at using an internal style sheet or using a inline style to
    achieve the look you seek.
    Below is a link to perhaps help you to understand the use of css.
    http://www.w3schools.com/css/css_howto.asp
    Leonard B

  • How do you rearrange photos that have been loaded into Iphoto?

    How do you rearrange photos in Iphoto on the new Ipad?

    Step 1 : Plug your ipod touch to your computer
    Step 2 : create a folder on finder and name it whatever you like. leave it empty
    Step 3 : go to photos tab under devices, your ipod name on itunes
    Step 4 : check "sync photos from" and choose your empty folder
    Step 5 : click apply on the lower right corner in itunes
    Step 6 : if you don't want any of your photos in your computer to be synced, uncheck the "sync photos from" and click apply
    Step 7 : if you want some of your photos to be synced, choose the folder you want to be synced and click apply
    hope this answer help

  • How can I add buttons that do different things to each row of an rpt result

    Hi there,
    I'm trying to figure out how to add buttons to each row of a report. Here is the scenario:
    report query returns a set of data that needs to be "approved". The options are "Append", "Replace", or "Reject" (I want to make the results look like so:)
    Person1 today blah, blah blah... Append button Replace button Reject button
    Person2 today blah, blah, blah... Append button Replace button Reject button
    PersonA today something, blah... Append button Replace button Reject button
    and so on.
    I'd like to set up the page so that there is an append, replace, reject button for each row returned by the report. So when the "Approver" clicks on the append button, something happens for that row, etc. How does one do this? So far I can only get the buttons to show up in the region. I also thought it might be possible to somehow turn the append, replace, reject text into links that called a plsql proceedure that would handle the action, but I'm not having any success with that idea either.
    Edited by: user10361829 on Sep 29, 2009 12:10 PM

    What I've done is make my report query as follows:
    select field_a, field_b, field_c, 'Append', 'Replace', 'Reject'
    from table_x
    where field y = :PX_ID
    That gives me the words (append, replace, reject) in the report. Then I go to the report attributes section and make a link out of the columns (append, replace, reject) so far, so good.
    Next question is how to make clicking on those links activate an update action on tableN. In the column_link section there is a box marked "Request" that looks like it might be relevant because Request is a term connected to buttons, but I've no idea how to use it. Or, can one use the tabluar form element section of the report attributes page to connect the Append (pseudo column) to an action? I've looked at your example (Sam) with the delete button, but what I really need to see is the Apex menu that sets it up because there are so many levels in the interface it is not intuitive (at least for me). I know exactly what I want it to look like but I'm missing the crucial step to get there... Thanks for your help so far.
    Column link section is described below :
    Column Link     Top
    Link Text      flashlight          
         [*Append*][Icon 1][Icon 2][Icon 3][Icon 4][Icon 5]
    Link Attributes      
    Target: *"Page in this application"*     Page: *10*     
    Reset Pagination
    Request Clear Cache      
    Name     Value
    Item 1      Px_page_item flashlight *#????#*          flashlight
    Item 2      flashlight          flashlight
    Item 3      flashlight          flashlight
    URL      
    Page Checksum

  • How do you make an image have a transparent background?

    i brought an image from PS into Illustrator and i want to put it in AE and use the puppet tool. however, when i bring it in it has a white background, but i just what the object i am going to puppet, so how do i do that?

    AE does not require an image to be sent through Illy first. Just make sure your image has a transparent background and/or an alpha channel if need, then save as a psd file. In AE bring the psd file in as footage, unless you need a compostion and folder for the psd created in the project list. You should then be able to use the puppet tool on an image with a transparent background.

  • How would you setup users to have different versions of Flash Player?

    I am looking to test some setups with different versions of Flash, but wanted to know how to setup one user to have Flash Player Version 6, one with version 7, 8, etc.
    How would I go about doing this?
    Thanks,
    Russ

    Create a new folder named Internet Plug-Ins inside the Library folder of the home folder of some of your user accounts, and move the different versions of the plugin into this folder, one per user account. The copy of the Flash plugin in the main Library folder is accessed when an account doesn't have a copy in its home folder.
    (13732)

  • How to compare 2 Strings that have different content in them..

    I have 2 Strings:
    String st1 = "1,2,3,4,6,7,9,10,11";
    String st2 = "4,5,10,11";
    I want to compare these 2 Strings where the result should be. Basically, any item from st2 is in st1: String res = "4,10,11";
    How can I do this in an efficient way?
    I was thinking of using StringTokenizer on st2 and compare each item to st1.... any help is appreciated. Thanks.

    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.StringTokenizer;
    * @author BADRINARAYAN
    public class stringTok {
    public static void main(String[] ar)
        String st1 = "1,2,3,4,6,7,9,10,11";
        String st2 = "4,5,10,11";
        TreeSet<String> value=new TreeSet<String>();
        ArrayList<String> set1=new ArrayList<String>();
        ArrayList<String> set2=new ArrayList<String>();
        StringTokenizer s1=new StringTokenizer(st1,",");
        StringTokenizer s2=new StringTokenizer(st2,",");
        while(s1.hasMoreTokens())
            set1.add(s1.nextToken());
        while(s2.hasMoreTokens())
            set2.add(s2.nextToken());
        for(Iterator it1=set1.iterator();it1.hasNext();)
            String temp1=it1.next().toString();
            for(Iterator it2=set2.iterator();it2.hasNext();)
                if(temp1.equals(it2.next().toString()))
                    value.add(temp1);
        System.out.println(value);
    }Edited by: badri.m on Feb 15, 2010 3:25 AM

  • How do you make a photo have a transparent background

    I have a photo of a fire truck outside of the fire department. I want to remove the background and select only the truck itself. I then want to be able to have it transparent when I put the picture on a scrapbook page. I do not want a white box background. What steps are needed to accomplish this. I currently have Photoshop Elements 6. Thanks!
    Teresa

    Use one of the selection tools. lasso tool for example, to select the truck
    Go to Edit>copy. This puts it on the computer's clipboard
    Open the scapbook background
    Go to Edit paste. The truck should be on a separate layer
    Access the move tool, position the truck.
    You can resize using the corner handles of the bounding box while holding down the shift key

  • How do you delete pictures that have been synced on from another computer?

    before our home computer crashed i synced some pictures on my phone, now they are using up space and i dont want them on there anymore but i can't figure out how to delete them. iv'e went through my itunes and i can't find anything. i need help!!

    they stayed there when i synced to my new computer. i have thought about doing a factory reset just to get rid of everything, i dont have much on my phone

  • How can you make an image an hotspot link for an email or paypal account?

    I have completed my first website using fireworks first then dragging it to dreamweaver cs6. My client is ready to launch their site. Two issues. I am literally trying to hotspot link an image for an email and paypal account. A few of my friends who are also website designers are having the same issue. Can this problem be solved so I can get paid?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <img src="FlightMiracle.fw.png" width="1600" height="3000" usemap="#Map" border="0" />
    <map name="Map" id="Map">
      <area shape="rect" coords="1281,34,1396,69" href="#mailto:[email protected]" alt="Contact" />
      <area shape="rect" coords="1001,27,1163,71" href="#&lt;form target=&quot;paypal&quot; action=&quot;https://www.paypal.com/cgi-bin/webscr" method=&quot;post&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_s-xclick&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;hosted_button_id&quot; value=&quot;XDVDENF8NGXZN&quot;&gt;
    &lt;input type=&quot;image&quot; src=&quot;http://www.flightmiracle.com" border=&quot;0&quot; name=&quot;submit&quot; alt=&quot;PayPal - The safer, easier way to pay online!&quot;&gt;
    &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width=&quot;1&quot; height=&quot;1&quot;&gt;
    &lt;/form&gt;
    " alt="Cart" />
      <area shape="rect" coords="1206,263,1422,307" href="#&lt;form target=&quot;paypal&quot; action=&quot;https://www.paypal.com/cgi-bin/webscr" method=&quot;post&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_s-xclick&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;hosted_button_id&quot; value=&quot;XDVDENF8NGXZN&quot;&gt;
    &lt;input type=&quot;image&quot; src=&quot;http://www.flightmiracle.com" border=&quot;0&quot; name=&quot;submit&quot; alt=&quot;PayPal - The safer, easier way to pay online!&quot;&gt;
    &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width=&quot;1&quot; height=&quot;1&quot;&gt;
    &lt;/form&gt;
    " alt="cart" />
      <area shape="rect" coords="1185,32,1271,77" href="#fmabout" />
    </map>
    </body>
    </html>

  • How can I combine post to two different tables with one form?

    I am trying to create a "phantom" record in a table to be used later in a report. How can I create a form and properly $_POST to two different tables? Thanks for any suggestions!

    In POST processing, just do the insert to one table, followed by the insert to the second table. I don't understand where you are getting stuck.
    Sometimes when we do an insert, we need the auto-generated ID from the newly created record as a "foreign key" for the record created in the second insert. MySQL has a nifty solution for that. The specific code depends on whether you are using the mysql, mysqli or PDO database connection.

  • Newbie Question...  How do you make sure java can find all the imports

    Hi everyone,
    I am new to Java and so far I really like it. But I am having problems porting applets to my websites. How can you make sure that all the references can and will be found in the applet...
    for example,
    I import javax.media.ControllListener in a project I am using and it works great in the applet viewer but when I try to port this to my website I'm working on, java can't find it. I really would appreciate any help on this cause then I would have java power :) and will keep me from losing my hair :).
    Thanks for those who help me.
    - Stan

    Hey jwenting,
    Thanks for the quick response. Classpath definitely makes sense so I have been reading up on that... But do you include .classpath file in your website too? And how would you reference it if you need to reference it?
    - Stan

  • When trying to locate songs in my iTunes library, often when I find the song it asks me if I would like it to find other missing files. Sometimes it can't find other missing songs. How do I make sure that it is looking at all of my hard dirves?

    Locating missing songs in my iTunes library. How do you make sure that all drives are being looked at for the missing songs?

    To import music into your iTunes library on the computer go to iTunes>Help>iTunes Help>Add items to iTunes and follow the instructions
    Delete the "songs" that do not play in your iTunes library and reimport them.

Maybe you are looking for