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

Changes ???

Is there anyway to tell if some of the content of a form has changed in
anyway?

For example, I have a form with some <input> elements, to include
<input type="text"... >, and <select ...>. Let's call this the "parent"
form.

On that "parent" form there is a link for a pop-up. The pop-up has
another form for data input. This "child" form has functionality that
save and then attempts to refresh the "parent" form just before it
closes.

The problem is some users do data input into the "parent" form inputs
and then press the link opening up the "child". Well you can guess it,
the data inputs are lost because the parent form gets refreshed.

So, If I know if any of the content of the parent form has changed,
then instead of executing a refresh I can save first.

Any ideas? What I'd hate to so is carte-blanc save the form inputs
every time.

Mike

Sep 14 '05 #1
9 1306

"mike" <hi****@charter.net> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Is there anyway to tell if some of the content of a form has changed in
anyway?

For example, I have a form with some <input> elements, to include
<input type="text"... >, and <select ...>. Let's call this the "parent"
form.

On that "parent" form there is a link for a pop-up. The pop-up has
another form for data input. This "child" form has functionality that
save and then attempts to refresh the "parent" form just before it
closes.


here is your problem, why do you refresh the parent when the child chages ?

you could save the form before the page is refreshed or loaded but this is a
waste of resources.

instead of refreshing the parent just use dhtml to edit...
Sep 14 '05 #2

"mike" <hi****@charter.net> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Is there anyway to tell if some of the content of a form has changed in
anyway?

For example, I have a form with some <input> elements, to include
<input type="text"... >, and <select ...>. Let's call this the "parent"
form.

On that "parent" form there is a link for a pop-up. The pop-up has
another form for data input. This "child" form has functionality that
save and then attempts to refresh the "parent" form just before it
closes.

The problem is some users do data input into the "parent" form inputs
and then press the link opening up the "child". Well you can guess it,
the data inputs are lost because the parent form gets refreshed.

So, If I know if any of the content of the parent form has changed,
then instead of executing a refresh I can save first.


if you need to do this create a boolian on the page and set this when the
user chages the form using theonChange()
Sep 14 '05 #3
mike wrote:
Is there anyway to tell if some of the content of a form has changed
in anyway?


There is nothing built-in, but you can use my isFormModified() function
found here:
http://www.JavascriptToolbox.com/val...ns/source.html

That should give you an easy interface to determine if any form elements are
different from their default values.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 14 '05 #4
Because the parent form has some information the user can update on the
child form.

For instance, there are 15 elements total, 5 of those are updated
really often so they are on the parent form, the other 10 are not. But
when the child form opens (all 15 elements are there) and updates one
of the 5 that are also on the parent, the parent data has to be changed
or the user is confounded and thinks his data was not updated because
he just changed it on the child form.

Sep 14 '05 #5
Matt,

Cool, let me try that.

Mike

Sep 14 '05 #6

"mike" <hi****@charter.net> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Because the parent form has some information the user can update on the
child form.

For instance, there are 15 elements total, 5 of those are updated
really often so they are on the parent form, the other 10 are not. But
when the child form opens (all 15 elements are there) and updates one
of the 5 that are also on the parent, the parent data has to be changed
or the user is confounded and thinks his data was not updated because
he just changed it on the child form.
you should be using DHTML on the parents page and not saving and then
refreshing the page, it is not very ecconomical.


Sep 14 '05 #7
Talk to me about that .... what are you recommending?

Sep 14 '05 #8

"mike" <hi****@charter.net> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Talk to me about that .... what are you recommending?


Well you create a function in the parent window called something like
applyChanges()

When the child window is saved make a call to applyChanges() and use
JavaScript to update the form elements. You can pass in the values to
applyChages() or get applychanged on the parent winow to read the child
window.

See ?
Sep 14 '05 #9
Yep, I see that...

Sep 14 '05 #10

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

Similar topics

0
by: robmcdan | last post by:
Hi, I'm using RegNotifyChangeKeyValue() (via DllImport) to detect changes to registry keys and subkeys. However, in addition to catching changes, I would like to know what the changes were. ...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
0
by: Jeff Reed | last post by:
I am experiencing the the problem outlined the below. Unfortunately, I am using WinXP and I not sure if I can apply the solution due to lack of security control Any feed back would be apreciated ...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
6
by: lanem | last post by:
I have a page that shows some data in a datagrid. All rows are updateable and then the changes are saved by hitting the "Save Changes" button. It is not a row by row save. All edits are made and...
16
by: Richard | last post by:
Hi, I am passing a structure to a subroutine where the passed parameter has been declared as ByVal. However, changes made to the passed variable inside the subroutine flow through to the...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
5
by: vovan | last post by:
I have set of controls (Textboxes, checkboxes etc) along with the Grid on Windows Form. I use BindingSource to populate both Grid and the set of Controls. User selects the record in the grid and...
11
by: gyap88 | last post by:
Hello i m using vb 2005 express to do my project. I m suppose to create a datagrid to allow user to make changes to the database. The program display the database in a datagrid where users can juz...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.