Image button in jsp

Hello
To delete or update a item in a list in a form, I create some image buttons with name. I want to get the value of each button after clicking as the following:
<form method="post">
<input type="image" name="button1" value="1" src="a.gif" alt="Update">
<input type="image" name="button1" value="2" src="a.gif" alt="Update">
<input type="image" name="button1" value="3" src="a.gif" alt="Update">
<input type="image" name="button2" value="1" src="b.gif" alt="Delete">
<input type="image" name="button2" value="2" src="b.gif" alt="Delete">
</form>
I want to use the value of this button to do something such as
if request.getParameter("button1"){
get value of this parameter
if value =1{
do something-update}
if value=2 {
else if request.getParameter("button2"){
get value of this parameter
if value =1
do something else}
However, I cannot do this in IE but can do in FireFox.
Could you please help
Many thanks for any help
shoa

hi shoa,
for jsp servlet its better to use in javascript like , write a function that takes to servlet where u want to do the update or delete.
function fnUpdate()
     document.form1.action = "servletName?hidMode=0";
     document.form1.submit();
function fnDelete()
     document.form1.action = "servletName?hidMode=1";
     document.form1.submit();
<input type="button" value="Update " onClick="fnUpdate()">
<input type="button" value="Delete " onClick="fnDelete()">
and in the servlet u can get the hidMode value
int hidMode = 0;
hidMode = request.getParameter("hidMode");
switch (hidMode) {
case 0:
call a method that update the list.
break;
case 1:
call a method that delete the list
break;
good luck i think this will solve ur problem
regards
haribabu

Similar Messages

  • JSP image button problem

    Hello
    I have a noob problem. I am trying to create an image button in my JSP page. I want to have an image as the background for the button with dynamic text on top of the image (in the foreground).
    This is what I have so far.
    <html:link href="javascript:submitLink('Monthly');"><html:img srcKey="button.buyPremium" altKey="motorInsuranceQuote.label.monthly"  />Monthly Payment: <c:out value="${MotorInsuranceQuoteForm.monthlyPremium}" /></html:link>The problem with the above code is that it produces an image button that doesnt have the dynamic text on top of the image and centred. How can I go about doing this?
    Thanks in advance for any help :-)

    sorry, may be my lack of awareness or my curiosity to solve the issue forced me to ask such a wide (a bit foolish too,l i agree) question. sorry
    but can u tell which all packages i hav to download from http://jakarta.apache.org/commons/fileupload/ for the proper working of this. bcoz i can see too many projects there in the download area. so that forbade me from doing some scratch works in that code. help me if u can
    aleena

  • RE: [iPlanet-JATO] image button handling

    Hi Todd,
    from what I have seen so far on the Project they are just buttons on
    the page.
    In the interim, I modified RequestHandlingViewBase.acceptsRequest() to
    handle the matching of parameter and command child names.
    from
    if (request.getParameter(commands)!=null)
    return getCommandChildNames()[i];
    to
    if (request.getParameter(commands[i])!=null ||
    (request.getParameter(commands[i]+ ".x")!=null ))
    return getCommandChildNames()[i];
    This fixed the problem with the image buttons in our cases.
    Kostas
    -----Original Message-----
    From: Todd Fast
    Sent: 10/27/00 6:21 AM
    Subject: Re: [iPlanet-JATO] image button handling
    Hi Kostas--
    I wanted to get some feedback on the known issue of the
    handleXXXXRequest method not being fired for buttons which have
    images, due to the the browser submitting
    the pixel coordinates back to the server like this:
    Page1.ImageButton1.x=...
    Page1.ImageButton1.y=...
    As the ND conversion project we are currently working on heavily uses
    image buttons we would like to get and indication if and when a patch
    is planned for this.
    Our current work around is to remove the src attribute from the JATO
    tags in the JSPs.We are currently working on getting this fixed. One question--what is
    the
    relative type of usage of image buttons in your project? Are they just
    buttons on the page (view bean), or do they appear in tiled views as
    well?
    Todd
    [email protected]
    [Non-text portions of this message have been removed]

    OK, here's what I'm trying to do: We have, like you said, a menu
    page. The pages that it goes to and the number of links are all
    variable and read from the database. In NetD we were able to create
    URLs in the form
    pgXYZ?SPIDERSESSION=abcd
    so this is what I'm trying to replicate here. So the URL that works
    is
    pgContactUs?GXHC_GX_jst=fc7b7e61662d6164&GXHC_gx_session_id_=cc9c6dfa5
    601afa7
    which I interpreted to be the equivalent of the old Netd way. Our
    javascript also loads other frames of the page in the same manner.
    And I believe the URL-rewritten frame sources of a frameset look like
    this too.
    This all worked except for the timeout problem. In theory we could
    rewrite all URLs to go to a handler, but that would be...
    inconvenient.

  • Getting mouse click coordinates with image button

    I'm using ADF Rich Client components in JDeveloper 11g Technology preview.
    I have to get the mouse click coordinates with an image button. In the page I put something like this:
    <af:commandButton text="commandButton1" icon="ambiente.jpg"
    actionListener="#{prova.listen}" action="#{prova.esegui}" />
    In the listener method of the managed bean I try to get the coordinates with this code:
    public void listen(ActionEvent e)
    FacesContext context = FacesContext.getCurrentInstance();
    String clientId = e.getComponent().getClientId(context);
    Map requestParams =
    context.getExternalContext().getRequestParameterMap();
    int x =
    new Integer((String) requestParams.get(clientId + ".x")).intValue();
    int y =
    new Integer((String) requestParams.get(clientId + ".y")).intValue();
    but it doesn't work. It seems that there aren't in the request the coordinates of the image point clicked. Is it true? How can I do that with ADF ?

    Hi,
    the mouse position is not part of the request parameters send. You will have to use client side JavaScript for this
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <af:document>
    <f:verbatim>
    <![CDATA[
    <script>
    function handleMouseCoordinates(event) {      
    alert("x: "+event.getPageX()+" y: "+event.getPageY());
    </script>
    ]]>
    </f:verbatim>
    <af:form>
    <af:commandButton text="My Click Button" icon="/images/jdev_cup.gif">
    <af:clientListener method="handleMouseCoordinates" type="click"/>
    </af:commandButton>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Frank

  • Multiple buttons in JSP

    hi,
    I am using a form in a JSP page with a back-end Oracle database. The JSP page displays a row of data from a table in the database, and i have an update button next to each one of them.
    The following code is used to create the buttons:
    <INPUT type="submit" name="u<%= i %>" value="Update">
    where i is the id of the row.
    I use the following code on the next page to know which button was pressed
    if (request.getParameter("u"+i) != null){
    All I want to know if how to replace the buttons on the first page with an image source without loosing the name/value property.
    thanks

    hi,
    i found a soln of the web.
    on the form page
    <input type="image" name="image" src="image.gif" alt="image" value="image">
    on the forwarded page:
    if (request.getParameter("image.x")!=null) {
    // image button pressed
    It works as i want to, but can someone explain why I need this '.x', and why it wont work simply with request.getParameter("image")
    thank you

  • Crystal Report Images Not Showing - JSP inside /WEB-INF folder

    Hi Experts,
    I am using Crystal report for Eclipse and also using Struts2 and tiles framework combination.
    The problem is when viewing the report all I've got is red X on all images and the graph image also not showing. This is when I use tiles and my jsp is inside the web-inf folder.
    This is my struts link: href="s:url value='/report/reportOpen.action?report=1'
    I've checked that the path to the viewer generated HTML is not correct. see code below.
    src="../../../crystalreportviewers/js/crviewerinclude.js"
    But when I test to access a simple jsp viewer that resides on the web root folder, this works fine but of course this is not what I want to have. I need to have my banner and menus on top of the report page (using tiles)
    This is my jsp link: href="s:url value='/ReportViewer.jsp?report=1'
    Viewer generated HTML below.
    src="crystalreportviewers/js/crviewerinclude.js"
    This might be a common problem and that you can share to me your solution.
    Note: I removed the script tags because I can't submit this entry.
    Thank you  in advance,
    Regards,
    Rulix Batistil
    Crystal Report Images Not Showing - JSP inside /WEB-INF folder

    Hi Saravana,
    After a few experimentation from your idea i was able to figure out the problem and now it is working.
    I don't have to copy the folder to where my jsp resides but still maintains it in the root location:  web/crystalreportviewers
    The changes should always be in web.xml.
    1st: change the crystal_image_uri value to ../crystalreportviewers
    2nd: change crystal_image_use_relative value to "web"
    Change to "web" instead of webapp because that is what I named my web root folder.
    <context-param>
              <param-name>crystal_image_uri</param-name>
              <param-value>../crystalreportviewers</param-value>
         </context-param>
         <context-param>
              <param-name>crystal_image_use_relative</param-name>
              <param-value>web</param-value>
         </context-param>
    Thank you. You showed me the way on how to solve the 3 day problem.
    BTW, my next problem is when clicking on any buttons prev/next/print/export, I got this error HTTP Status 404.
    Well, at least for now I can view my initial report.  I just need to figure out the next issue and with the help of the great people here in the forum.
    Thanks a lot.
    Regards,
    Rulix
    Edited by: Rulix Batistil on Nov 26, 2008 7:27 AM

  • "Save image" button of Camera Raw does not save JPEG with modifications made.

    I am using Bridge CC to process my RAW images and make modifications to some JPEG images as well.  I have no need to further alter images in Photoshop at the moment, so I do all modifications in Camera Raw. After altering my images, I then press the "save image" button at the left bottom corner of Camera Raw and choose the settings to save in JPEG.  However, when I upload these JPEG images to a website or when I email them, the image is uploaded without the modifications I had done!  It seems to me that Camera Raw is saving JPEGs the same way it does for RAW images, in a non-destructive manner, only attaching instructions for the images to be displayed properly on Photoshop. But when I save an image in JPEG, I expect the image to be saved entirely with the modifications I made while still keeping the original RAW file.  What goes on then?  What is Camera Raw doing and how do I get to save a modified image in JPEG with Camera Raw?  Would you please explain?
    Many thanks for your help,
    Beza

    Hi,
    What version of camera raw and operating system are you using?

  • How do I get a "transfer images" button to show up in the solution center?

    How do I get a "transfer images" button to show up in the solution center for my officejet 6500 709a on XP?
    Scan buttons are displayed and work, as does print.

    What installing the twain plug-in, you mean? Go to your applications folder. Find the Adobe Photoshop Elements 11 folder. Look in there for a folder called support files, then for a folder called optional plugins. In the Optional Plugins folder, there should be a folder called ImportModules. Just drag that from the Optional Plugins folder to the regular Plugins folder.
    This will be infinitely easier to do if you put your applications folder window into list view, not the default icon view. To do that, click this button at the top of the window:

  • To open a window & html page at a time on a single button, in JSP.

    Hello!
    I want to open 1 window as well as i want to open 1 html page on a single button click at a same time, in JSP.
    on button's "action" event i am opening the html page and button's "onclick" event i am opening the window, but it is not showing these 2 actions at a time. only window gets open when i click the button.
    [Also on form's "action" event i am having validate() function.]
    how do i open a window & html page at a time on a single button, in JSP?
    I don't know how to do this. I have stuck over here, if anyone is having any solution, please let me know.
    I need your help.
    Thank You.

    write js as
    window.open(page, "Popup", windowprops);
    windowprops = "height="+hi+",width="+wd+",top="+ wint +",left="+ winl +",location=no,"
              + "scrollbars=yes,menubars=no,toolbars=no,resizable=no,status=yes";
              encapsulate this in one function and call that function on button click event !!

  • Adobe premiere elements 12 - how to create menu bar action for my inserted image button

    adobe premiere elements 12 - how to create menu bar action for my inserted image button without using their movie menu theme

    forbemag
    I do not think that I am completely focused into this completely, so let us see if the following is going to help.
    You are going to need a base for your button. When you mention "image" button, I am assuming that you are using that term to differentiate between a text button and a thumbnail type button.
    The menus (main and scene) take their origin in .psd files on the hard drive and strict nomenclature and structure for Layers Palatte. And, the buttons on the menus trace back to the menu markers on the Timeline, main menu marker and order of placement of scene markers. The scene thumbnail will only appear when there is a scene marker on the Timeline to which it.
    In view of all that
    Where have you already inserted this "image (button)"...into the Layers Palette of a Photoshop document or other? Is this "image (button)" in a structured Layer Group in the Layers Palette with sublayer groups, text layers, graphic/background layer"?
    Let me give you an example
    If you have a button (with thumbnail) on the main menu and you want that to open to a specific scene in your movie, then you use a main menu marker on the Timeline at the spot that you want that button to target.
    If I am getting closer to what you seek, then please further clarify the DVD navigational envisioned scheme.
    Thanks.
    ATR
    Add On...I did not see the exchanges between us and SG until after I had posted mine. I thought that your discussions were concluded. Please excuse the interruption.

  • Using Bridge to Camera Raw to Open Image button also drop shadow problems

    I remember when I was working with RAW in PSE 8. I would be in Bridge looking at a pic and double click on it. PSE 8 would open in Camera RAW and I could play with the pic a bit, make some adjustments, then click on OPEN IMAGE. When I did that it would open in PSE and it would be in jpg format. With this PSE 9 and the updated Camera RAW 6.3, when I punch OPEN IMAGE I still have a picture labeled .CR2 which I think still means RAW. When I double click in Bridge the .CR2 pic shows as 8 bit depth. I can do a little more work on it and use SAVE AS. When I do that, the sample file name that shows is still in .CR2 format and I must change that to .jpg and then below change from PHOTOSHOP to JPEG to save my file as a jpg file. Is there something that I have to change in preferences to get it to open the image in jpg format when I hit the OPEN IMAGE button? Or, is this an "improvement" with RAW 6.3? Also, I seem to be having trouble adding a drop shadow (or any other effects) on jpeg pics. At least it doesn't show up on the screen after I apply it. I just recently updated to Camera RAW 6.3 and updated my Operating system on my iMac computer to OS 10.6.6. I emailed this request to my good friend with an identical setup on his iMac and he is having the same response when performing the above operations. Any ideas what the problem might be?

    Okay, previously you seem to have been using the bridge version of camera raw to edit your raw photos. That has many more options than the PSE version of the raw converter. (If you still have PSE 8, you can see the difference by using File>Open in the editor to open a raw photo for the PSE version of ACR, which works the same way in PSE 9.) In PSE's raw converter, you use the Open button, then save your photo in an image format in the editor. The Save button in ACR in PSE is only the DNG converter.
    Layer styles should work exactly the same way as in PSE 8. However, in any version of PSE a drop shadow, like a real shadow, needs someplace to fall, so unless there is empty space on the layer, it won't appear. Try creating text or drawing and simplifying a shape and adding a drop shadow. Does it appear then?
    Also remember that Jpegs won't let you save either layers or transparency when you resave the file.

  • I have a button in JSP page inside an UIWebView by pressing the button i want to run another existing iPhone native application in background only.Do anyone have a solution for this.

    I have a button in JSP page inside an UIWebView by pressing the button i want to run another
    existing iPhone native application in background only.Do anyone have a solution for this.

    Sounds like a virus.... I hope it's not...
    Launching Other Apps within an iPhone

  • Why am I having issues with the image button?

    Good day everyone!
    I am working on creating a business card template so that people can add their images of themselves and write in their own information. I was reading the Ted Padova book (for version 5 or 6) and I was excited when he said to use the image button to create variable image data and this would work with reader, standard and professional.
    I had sent the file to my clients and those who have reader cannot change the images at all but standard and professional can make changes.
    I have already checked to make sure that the rights for acrobat reader was in use.
    DOES ANYONE HAVE SOME INSIGHT FOR ME?  I really could use the help!    

    I was just about to prepare that for you guys when I had a quick flash to try applying the background image directly to the table instead
    of a containing div. I'm sure there was a reason I used a containing div to begin with, but can't for the life of me remember why right now. I'm sure it'll hit me at some point and I'll probably be back here when it does, but so far eliminating the containing div altogether has produced the desired effect. =)

  • How to add a hyperlink to a image button in theme area?

    Hi!
    We need to make an image button (on the theme area) to be
    clickable -- i.e., once you click that image button, it will
    call www.yahoo.com.
    Please advise how to do it.
    Points guaranteed. Thanks!

    Hello,
    Maybe this will help you?
    http://help.sap.com/saphelp_nw70/helpdata/en/9d/52f973810cb448842e35e13ad6c992/frameset.htm
    Gene Madikrama

  • Does anyone have the code to use an image button as the reset button?

    Does anyone have the code to use an image button as the reset button? I'm finally at the end of the form and got the submit button to work as an image button, but cannot do the same with the reset button.  Any help is greatly appreciated!

    I agree. 
    http://www.456bereastreet.com/archive/200909/almost_never_add_a_reset_button_to_a_form/
    Nancy O.

Maybe you are looking for

  • Error *Form F110_PRENUM_CHCK is not active* - while Vendo payment by F-58

    Dear Sir / Mam, While possing vendor payment through F-58 an error "Form F110_PRENUM_CHCK is not active" is appearing The document is geting saved but it doesn't get spooled. I checked the configuration @ FBZP - Maintenance of company code data for p

  • Issue in Clustered environment DB adapter Polling

    hi all , i have a table and one BPEL process is polling records depending on status value . Polled records are updated from N to P after polling . but , In cluster environment for One Row Multiple Instances are creating . Is there any way to ensure t

  • AP Hold on Invoices

    Our accounting department usually sets up invoices before they are ready to be tied to a PO or they are waiting on another department for approval, there are multiple different reasons. In the prior version of Oracle they were able to enter an invoic

  • Re: Adobe Photoshop Album Starter edition 3.0

    can u help me also how to solve my problem.. idont know and why , ive unlock also my adobe phtoshop what will be my unlock code tnx.............plsss help me im tired to do what ever it takes. pls pls pls pls        [email protected]

  • Why Obsolete Statements

    Hi,         What are the problems we need to face while using obsolete statements in a program. Is there any other options insted of Import and export of memory ids comes under the obsolute statements?   DATA:lv_run_id TYPE XXXX_run_id,        lv_mem