473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Table Events

I have a table that I populate with values from a database.
when someone clicks on these values it fires a client side event that I
added to the cells of the table during building of the table with the
Attributes.Add method.
this works ok, But what I would really like to do is add a server side click
event to the table or cells so I can add more data to the page without
refreshing. I would also have to know what cell was clicked.

how do I do this?
Dec 28 '06 #1
3 1223
Hi,

Slim wrote:
I have a table that I populate with values from a database.
when someone clicks on these values it fires a client side event that I
added to the cells of the table during building of the table with the
Attributes.Add method.
this works ok, But what I would really like to do is add a server side click
event to the table or cells so I can add more data to the page without
refreshing.
if you want to do that without refreshing you'll have to do it on the
client-side, that is, by using i.e. JavaScript.
I would also have to know what cell was clicked.
If you're using an ASP-table, add some JS-code to the cell's
<onclick>-event where it passes its ClientID to a JS-function via code or,
if you're using an HTML-table, do so at design-time.
This way your function may handle i.e. the backcolor of the cell that was
clicked via document.getElementById.

Cheers,
Olaf
--
My .02: www.Resources.IntuiDev.com
Dec 28 '06 #2

"Olaf Rabbachin" <Ol*********@IntuiDev.comwrote in message
news:uj**************@TK2MSFTNGP02.phx.gbl...
Hi,

Slim wrote:
>I have a table that I populate with values from a database.
when someone clicks on these values it fires a client side event that I
added to the cells of the table during building of the table with the
Attributes.Add method.
this works ok, But what I would really like to do is add a server side
click
event to the table or cells so I can add more data to the page without
refreshing.

if you want to do that without refreshing you'll have to do it on the
client-side, that is, by using i.e. JavaScript.
>I would also have to know what cell was clicked.

If you're using an ASP-table, add some JS-code to the cell's
<onclick>-event where it passes its ClientID to a JS-function via code or,
if you're using an HTML-table, do so at design-time.
This way your function may handle i.e. the backcolor of the cell that was
clicked via document.getElementById.

Cheers,
Olaf
--
I have done the job client side, but I really want to do it serverside, when
I say server side I mean with a asp.net event like a asp:button. I could
include a asp button in each cell, but I thought there must be a simpler way
of doing it
My .02: www.Resources.IntuiDev.com

Dec 29 '06 #3
Hi,

Slim wrote:
I have done the job client side, but I really want to do it serverside, when
I say server side I mean with a asp.net event like a asp:button. I could
include a asp button in each cell, but I thought there must be a simpler way
of doing it
if you want to do it server-side, then adding a server-side event would be
the simplest approach. If you'd actually like to check things on the
client-side before actually posting back to the server (and your checkups
may not be solved using validator-controls), then use some JavaScript to do
your checkups on the client-side and, if appropriate, post back to the
server. ASP.Net will always create the __doPostBack-handler in the
resulting HTML-files - you could utilize that function to do your own
JS-handled postback.

Cheers,
Olaf
Dec 30 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Luklrc | last post by:
Hi. I have a problem I hope someone can help me with. I have a database of events. Each event has a date and a duration (days). What I need to do is to be able to display search for events...
1
by: Eric Adem | last post by:
Try out the following code: <html> <body> <table onMouseOut="alert('out');" width="50%" height="50%" bgcolor=yellow><tr><td> <table width="100%" height="100%"><tr valign=middle> <td...
0
by: Rick Slansky | last post by:
Hi: This should be a fairly simple page, which lines up the second row cell nicely in the lower right corner. It does in Netscape, but when I check the page in Explorer, that cell (the entire...
2
by: news.hp.com | last post by:
I have situation where I need to copy multiple records (only certain fields) from a Rules table to an Events table based on a selection identified in a combo box. When the selection is made in a...
3
by: Ram | last post by:
Hi, I am trying to set up a DB for a race series where a riders best 6 of 10 rides count towards a league position. I have a table of Riders ( say 300 ) I want to use a form to select which...
8
by: John Smith Jr. | last post by:
I am looking for some way to persist a table web control so when page_load event comes up, i can display the table as it was. I tried using ViewState with the rows collection but that didn't work...
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
1
by: Bob | last post by:
Hi all, I've designed a database that has an events table and an application table. Each event has an application associated with it and I've stored an application code in the events table then...
9
by: dli07 | last post by:
Hello, I'm trying to convert a piece of code that creates a dynamic vertical resizing bar in a table from internet explorer to firefox. It's based on a post from...
7
by: jp45678 | last post by:
Hi, been trying to do this for literally hours, cannot for the life of me remember how to do it. I have one table for Clients, just surname, forename, address, contact number etc, and I have added...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.