473,396 Members | 1,599 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,396 software developers and data experts.

need help with client-side table behavior

PJ6
I have a table that changes its cell (input text) colors when their contents
have changed (actually on keypress) and shows a couple of buttons
automatically, UDPATE and CANCEL. This works partially, though detecting
enter and escape doesn't seem to work, or parhaps calling the button click
events directly doesn't (see below).

In addition to getting the ENTER and ESC keypresses to fire their
appropriate button clicks, I need to be able to collect information on which
cells have changed, so on the page loading again I can read this
information, perhaps from a hidden field, to use to update a database
server-side.

What would be the best way to do this?

Thanks in advance for any help,
Paul

<script language=javascript>
function GirdTextKeyPress(txtID, btnsContainerlID, btnUpdateID, btnCancelID)
{
var txt = document.getElementById(txtID);
txt.className = 'GridChanged';
var bc = document.getElementById(btnsContainerlID);
bc.style.display = 'inline';

var btnUpdate = document.getElementById(btnsContainerlID);
if (event.keyCode == 13)
{
event.returnValue=false;
event.cancelBubble = true;
btnUpdate.click();
}

var btnCancel = document.getElementById(btnCancelID)
if (event.keyCode == 61)
{
event.returnValue=false;
event.cancelBubble = true;
btnCancel.click();
}
}
</script>

<style>
Input.Grid
{
border-style:none;
}
Input.GridChanged
{
background-Color:Yellow
}
</style>
Nov 30 '05 #1
1 1175
PJ6
Never mind, I sorted it all out.

Paul

"PJ6" <no****@nowhere.net> wrote in message
news:ZHjjf.165$n84.138@trnddc06...
I have a table that changes its cell (input text) colors when their
contents have changed (actually on keypress) and shows a couple of buttons
automatically, UDPATE and CANCEL. This works partially, though detecting
enter and escape doesn't seem to work, or parhaps calling the button click
events directly doesn't (see below).

In addition to getting the ENTER and ESC keypresses to fire their
appropriate button clicks, I need to be able to collect information on
which cells have changed, so on the page loading again I can read this
information, perhaps from a hidden field, to use to update a database
server-side.

What would be the best way to do this?

Thanks in advance for any help,
Paul

<script language=javascript>
function GirdTextKeyPress(txtID, btnsContainerlID, btnUpdateID,
btnCancelID)
{
var txt = document.getElementById(txtID);
txt.className = 'GridChanged';
var bc = document.getElementById(btnsContainerlID);
bc.style.display = 'inline';

var btnUpdate = document.getElementById(btnsContainerlID);
if (event.keyCode == 13)
{
event.returnValue=false;
event.cancelBubble = true;
btnUpdate.click();
}

var btnCancel = document.getElementById(btnCancelID)
if (event.keyCode == 61)
{
event.returnValue=false;
event.cancelBubble = true;
btnCancel.click();
}
}
</script>

<style>
Input.Grid
{
border-style:none;
}
Input.GridChanged
{
background-Color:Yellow
}
</style>

Nov 30 '05 #2

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

Similar topics

1
by: Marc | last post by:
Hello, I've fiddled with this for quite a while and thought I had the problem solved. I had a version that would successfully compile and run. But then I had to change the code to use a...
5
by: Rob R. Ainscough | last post by:
This is more of a conceptual question: 1. More and more companies are using VPN's and locking out internet connectivity (for a host of reasons, security, productivity, etc.). 2. ASP.NET...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
5
by: Rob R. Ainscough | last post by:
This is more of a conceptual question: 1. More and more companies are using VPN's and locking out internet connectivity (for a host of reasons, security, productivity, etc.). 2. ASP.NET...
1
by: DR | last post by:
What ports do i need to unblock on client and server (running msvsmon.exe) to debug remotely from my client box with visual studio 2005 pro? When I attach to remote process a connection shows up...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.