Announcement Announcement Module
Collapse
No announcement yet.
Using a image as a submit button Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using a image as a submit button

    Hello,

    Is there another way then this:

    Code:
    <A href="javascript:document.myForm._eventId_proceed.name='_eventId_proceed';document.myForm.submit();">
      <img src="<%=response.encodeURL(request.getContextPath()+ "/static/img/btn_next.gif")%>" class="right" alt="Next" />
    </A>
    <input type="hidden" name="_eventId_proceed" value="transition">
    to use a image as a submit button?
    Last edited by mkamer; Aug 10th, 2009, 07:12 AM.

  • #2
    Please use [ code][/code ] tags when posting code.

    To answer your question, use a button or input element with type image.

    Comment


    • #3
      Hi Marten,

      Thanks for answering.

      The use of html button i know. The problem is that if I use an image with href surrounded then the form will not be submitted and the value will not bind to my model object.

      The code that I mentioned contains a peace of javascript as a workarround. I was wondering if there is another (easier) way to accomplish a form submission in combination with webflow and an image as a button.

      It really looks trivial but I can't find a nice solution.

      Regards,

      Marc

      Comment


      • #4
        As I stated use a button. The button will submit a form and you can put a img tag inside there... No need for the href...

        Comment


        • #5
          Okay Marten...Thanks...

          I'll try that! I'm not able to test it at the moment. As soon as my server is up and running again i'll test it.

          Comment

          Working...
          X