473,804 Members | 3,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=javasc ript>
function GirdTextKeyPres s(txtID, btnsContainerlI D, btnUpdateID, btnCancelID)
{
var txt = document.getEle mentById(txtID) ;
txt.className = 'GridChanged';
var bc = document.getEle mentById(btnsCo ntainerlID);
bc.style.displa y = 'inline';

var btnUpdate = document.getEle mentById(btnsCo ntainerlID);
if (event.keyCode == 13)
{
event.returnVal ue=false;
event.cancelBub ble = true;
btnUpdate.click ();
}

var btnCancel = document.getEle mentById(btnCan celID)
if (event.keyCode == 61)
{
event.returnVal ue=false;
event.cancelBub ble = true;
btnCancel.click ();
}
}
</script>

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

Paul

"PJ6" <no****@nowhere .net> wrote in message
news:ZHjjf.165$ n84.138@trnddc0 6...
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
automaticall y, 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=javasc ript>
function GirdTextKeyPres s(txtID, btnsContainerlI D, btnUpdateID,
btnCancelID)
{
var txt = document.getEle mentById(txtID) ;
txt.className = 'GridChanged';
var bc = document.getEle mentById(btnsCo ntainerlID);
bc.style.displa y = 'inline';

var btnUpdate = document.getEle mentById(btnsCo ntainerlID);
if (event.keyCode == 13)
{
event.returnVal ue=false;
event.cancelBub ble = true;
btnUpdate.click ();
}

var btnCancel = document.getEle mentById(btnCan celID)
if (event.keyCode == 61)
{
event.returnVal ue=false;
event.cancelBub ble = true;
btnCancel.click ();
}
}
</script>

<style>
Input.Grid
{
border-style:none;
}
Input.GridChang ed
{
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
3881
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 different module, and now it will compile but not run again. I know that functionality in this area is not fully supported yet, but there has to be someone out there that has got this to work. I am using Python2.3, with py2exe 0.4.2, and win32all 159....
5
1726
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 requires a web server and has more layers than a .NET Windows application 3. a .NET windows app .DLL's and .EXEs are very small So which is better, offer a Windows .NET component ("managed") that can be downloaded installed from a web site or...
2
2914
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 users). If user is from intranet, web server should recognize it and application should create additional options in controls regarding groups the user belongs to. If user is from extranet it should be logged in as anonymous and a link to login page...
5
274
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 requires a web server and has more layers than a .NET Windows application 3. a .NET windows app .DLL's and .EXEs are very small So which is better, offer a Windows .NET component ("managed") that can be downloaded installed from a web site or...
1
4876
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 in msvsmon.exe on the remote machine, however, the client box with visual studio displays error: "Unable to connect to the mricosoft visual studio remtoe debugging monitor named 'the box name' the micorosft visual studio remote debugging monitor...
0
9588
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7625
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.