Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > JavaScript Onclick firing a button (C#)

Reply
Thread Tools

JavaScript Onclick firing a button (C#)

 
 
Jer
Guest
Posts: n/a
 
      11-28-2004
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


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      11-29-2004
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" <(E-Mail Removed)> wrote in message
news:Q9tqd.34574$(E-Mail Removed). com...
> 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
>
>



 
Reply With Quote
 
 
 
 
Alan Z. Scharf
Guest
Posts: n/a
 
      11-29-2004
Is this what you are looking for?

http://msdn.microsoft.com/library/de...erControl.asp#

Alan

"Jer" <(E-Mail Removed)> wrote in message
news:Q9tqd.34574$(E-Mail Removed). com...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Button OnClick not firing John Harte ASP General 0 01-14-2008 02:40 PM
Button OnClick not firing on first click SAL ASP .Net 9 07-19-2007 02:15 PM
asp.net dynamically created button not firing onClick event rsaffy@nuvox.com ASP .Net 7 07-20-2006 09:02 PM
button server onclick not firing Vikram ASP .Net 3 02-02-2006 11:35 PM
button.onclick = new Function("func2()") + button.onclick foldface@yahoo.co.uk Javascript 2 09-26-2005 08:13 AM



Advertisments