CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 9/24/2004 3:53:18 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 39 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
aher
Asp.Net User
Table Onlick event9/24/2004 3:53:18 PM

0/0

Hi There,
I want catch the onlick event on table and find out
which cell I have clicked on How do I do that?

Thanks for any help
Aher
Rodrigo Pires
Asp.Net User
Re: Table Onlick event9/27/2004 5:52:50 PM

0/0

You can use .htc files for that.... it would be something like that:


MyTable.htc
<PUBLIC:ATTACH EVENT="onclick" FOR="element" tagName="TD" ONEVENT="td_onclick()" />
function td_onclick()
{
var obj_td = window.event.srcElement; //get the TD element
//....do something
}

In your table, put this code:

<table id="Data" style="behavior:url(MyTable.htc)">
....
</table>


This may help you.
Rodrigo Pires
aher
Asp.Net User
Re: Table Onlick event9/28/2004 11:17:25 AM

0/0

Thanks mate , but isnt there a better way with asp.net
I create table something like this

<script> .... ....

oTable.CssClass="leftmenu_table";
oTable.CellSpacing=0;

for(int i=0;i<5;i++)
{
TableRow row=new TableRow();
TableCell cell=new TableCell(); cell.Text=myArray[i];
cell.CssClass="leftmenu_selected";
row.Cells.Add(cell); oTable.Rows.Add(row);
}

...... ...</script>

<asp:Table id="oTable" Runat="server" CellSpacing="0">

Now I just want catch the click event and find out which cell was clicked so that
I can take the appropriate action

Thanks
AHER

Rodrigo Pires
Asp.Net User
Re: Table Onlick event9/28/2004 5:47:36 PM

0/0

I think you can do this, before inserting the cell in the row:

cell.Attributes.Add("onclick","some_js_function(this)");

Then, in the Js function, you can obtain the cell object that generated the event, and take the appropriate action...

Hope this be helpfull!!


Rodrigo Pires
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
JavaScript: The Definitive Guide Authors: David Flanagan, Pages: 994, Published: 2006
Beginning JavaScript Authors: Paul Wilton, Pages: 1056, Published: 2000
Web Design in a Nutshell: A Desktop Quick Reference Authors: Jennifer Niederst Robbins, Pages: 796, Published: 2006
Dynamic HTML: The Definitive Reference Authors: Danny Goodman, Safari Tech Books Online, Pages: 1401, Published: 2002
JavaScript: A Beginner's Guide Authors: John Pollock, Pages: 550, Published: 2004
The Book of JavaScript: A Practical Guide to Interactive Web Pages Authors: Thau, Pages: 490, Published: 2007
Ajax Patterns and Best Practices Authors: Christian Gross, Pages: 386, Published: 2006
Access 2003 VBA Programmer's Reference: programmer's reference Authors: Patricia Cardoza, Patricia DiGiacomo, Teresa Hennig, Graham Seach, Armen Stein, Pages: 984, Published: 2004
Foundations of Ajax Authors: Ryan Asleson, Nathaniel T. Schutta, Pages: 273, Published: 2005
Making Use of JavaScript Authors: Shweta Bhasin, Pages: 448, Published: 2002

Web:
table and onClick - JavaScript You have to set the onclick event of the TD tags, not the TABLE itself. .... < table onclick="handleClick(event);">[/color][/color] ...
Nabble - Wicket - User - onclick event in a listview Nov 3, 2008 ... onclick event in a listview. I have two tables side by side in my page . Table 1 has two columns name, age Table 2 has details column like ...
onclick event on table cells and radios [Archive] - WebDeveloper.com [Archive] onclick event on table cells and radios JavaScript. ... Click to See Complete Forum and Search --> : onclick event on table cells ...
update table onclick event - Dev Shed update table onclick event- Java Help. Visit Dev Shed to discuss update table onclick event.
HTML Test Suite for UAAG 1.0 (Draft)
...
Code behind and onclick on html table row I have a page with a table of which the rows have to be added dynamically. What I also want is 'code behind' the onclick event of a row (the ...
Inside Dynamic HTML - Menu Bar Toolkit Adding an event handler for a menu choice is as easy as adding an ONCLICK handler to a specific menu choice's table cell: ...
the "onlick" event Go on, taste it! the "onlick" event. ... always holds the shift down a little too long and then I have to go back and change it to ...
Show/Hide - table on the OnClick Event : hide, onclick, show, table Hello Everybody, I am trying to show and hide a table on the OnClick of a link. But it is not working. The properties are getting set on mouseover and ...
Onlick event error Sep 2, 2008 ... Author Topic: Onlick event error (Read 637 times) ... How do i insert the value of this form to mysql table without the page reloading. ...

Videos:
AK vs. FACE Boxing




Search This Site:










maintaining viewstate in custom control based on dropdown list

deprecated apis in control designer

multiple <@ register lines

user control help

really good/fast hosting

help files for controls

how to know web hosting provider is using microsoft license server

is anyone know how to design tabsmultipages webcontrol with itemplate ??

list of valid values in property box

design time appearance for the datagrid control

reuse of validationexpression in regularexpressionvalidator

looking for a host like webmatrixhosting

how to get version number of calling assembly?

how do i deal with an unexpected tag when xml is rendered?

retrieve inline(.aspx) declared controls from template

toolbox icons in visual studio .net?

isa server

treeview displays text only

ftp security concerns

creating .net custom server controls and .net pages programatically

overriding maxlength property of textbox

loadpostdata and page.registerrequirespostback(this) question

handling errors in a web custom control.

freewebdot... not so free

user control type

render html control within a .net console app

getting my web form on the internet

hosting asp web site

registerclientscriptblock fails when used in user control

integrating server controls

  Privacy | Contact Us
All Times Are GMT