Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

<input type="image"> causes a postback when clicked within WebDialogWindow

Last post 08-01-2008 12:35 by jeffsailor. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-01-2008 11:56

    <input type="image"> causes a postback when clicked within WebDialogWindow

    I have a webdialogwindow that contains an html <input type="image"> element. When the image is clicked, it causes a postback to the server. Is there anyway to stop this postback from occurring? I have a client-side javascript function that is handling the onclick event. The content pane contains nothing but html (no asp or infragistics server controls).

     

    Filed under:
    • Post Points: 20
  • 08-01-2008 12:08 In reply to

    Re: <input type="image"> causes a postback when clicked within WebDialogWindow

    When input type="image" , it acts like a submit button and will cause a page to refresh. Try using this on the page itself, and you should see it causes a page refresh. If you want to perform client-only action using an image, you have two options.

    1. Return false from within the onclick method to stop post back.

    2. Use an img to display an image and hook an onclick event to it.

     

    I hope this helps.

    Taz.

    Product Manager, Web Clients
    Microsoft - MCP
    Infragistics, Inc

    Product Help : http://www.infragistics.com/gethelp

    Feature Request : http://devcenter.infragistics.com/Protected/RequestFeature.aspx
    • Post Points: 20
  • 08-01-2008 12:35 In reply to

    Re: <input type="image"> causes a postback when clicked within WebDialogWindow

    Answer

    That did the trick. Thanks!

    • Post Points: 5
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems