JavaScript Onclick firing a button (C#)

Discussion in 'ASP .Net Datagrid Control' started by Jer, Nov 28, 2004.

  1. Jer

    Jer Guest

    Has anybody ever used JavaScript to fire a button? I want a user to be able
    to click anywhere in a row to be able to make a selection. I use mouseovers
    and mouseouts to highlight the selected row. Currently the only way I know
    how to allow a user to click anywhere on a row is to register a JavaScript
    OnClick script which redirects back to the same page with a specified
    querystring (like an id). I don't want to use querystrings within the same
    page though.

    J
     
    Jer, Nov 28, 2004
    #1
    1. Advertising

  2. On server side use either ItemDataBound or PreRender event to set the same
    javascript handler for "onclick" client event to all cells in the same row.
    Pass the row key value to the handler. It is not clear what sort of button
    you want to fire and what for.

    Eliyahu

    "Jer" <> wrote in message
    news:Q9tqd.34574$...
    > Has anybody ever used JavaScript to fire a button? I want a user to be

    able
    > to click anywhere in a row to be able to make a selection. I use

    mouseovers
    > and mouseouts to highlight the selected row. Currently the only way I

    know
    > how to allow a user to click anywhere on a row is to register a JavaScript
    > OnClick script which redirects back to the same page with a specified
    > querystring (like an id). I don't want to use querystrings within the

    same
    > page though.
    >
    > J
    >
    >
     
    Eliyahu Goldin, Nov 29, 2004
    #2
    1. Advertising

  3. Is this what you are looking for?

    http://msdn.microsoft.com/library/d...uestionsAboutASPNETDataGridServerControl.asp#

    Alan

    "Jer" <> wrote in message
    news:Q9tqd.34574$...
    > Has anybody ever used JavaScript to fire a button? I want a user to be

    able
    > to click anywhere in a row to be able to make a selection. I use

    mouseovers
    > and mouseouts to highlight the selected row. Currently the only way I

    know
    > how to allow a user to click anywhere on a row is to register a JavaScript
    > OnClick script which redirects back to the same page with a specified
    > querystring (like an id). I don't want to use querystrings within the

    same
    > page though.
    >
    > J
    >
    >
     
    Alan Z. Scharf, Nov 29, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vikram

    button server onclick not firing

    Vikram, Feb 1, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,495
    Patrick.O.Ige
    Feb 2, 2006
  2. Replies:
    7
    Views:
    12,499
  3. SAL
    Replies:
    9
    Views:
    811
  4. John Harte

    Dynamic Button OnClick not firing

    John Harte, Jan 14, 2008, in forum: ASP General
    Replies:
    0
    Views:
    169
    John Harte
    Jan 14, 2008
  5. Replies:
    2
    Views:
    285
Loading...

Share This Page