I've been asked to convert a pay increase spreadsheet to an intranet
page. So far I've developed a page that uses a combination of ASP and
Javascript to retrieve all of the required information from the HR
database. The problem is that I need to be able to calculate the new
salary based on an increase_amount field, as well as maintain a
running total of the increase amounts. Once the amounts have been
determined, I then need to submit them, matched up with an employee ID
that is already on the page, to a stored procedure.
I've never attempted something like this before and am a little lost
on how to complete the desired functionality. Is it even possible?
Can this be done without embedding an Excel spreadsheet?
- Mark 6 6349
Mark wrote: I've been asked to convert a pay increase spreadsheet to an intranet page. So far I've developed a page that uses a combination of ASP and Javascript to retrieve all of the required information from the HR database. The problem is that I need to be able to calculate the new salary based on an increase_amount field, as well as maintain a running total of the increase amounts. Once the amounts have been determined, I then need to submit them, matched up with an employee ID that is already on the page, to a stored procedure.
I've never attempted something like this before and am a little lost on how to complete the desired functionality. Is it even possible? Can this be done without embedding an Excel spreadsheet?
- Mark
This is actually very simple for JavaScript. As long as you know how
all of your formulas convert into the JavaScript math operators and
methods, setting up a spreadsheet-like page is trivial. Instead of
cells, just use text boxes for columns and rows of user input (one text
box for each cell).
In fact, with a little attention to layout, you can create a much more
"user friendly" spreadsheet than Excel.
Look up how to create forms and how to access the values of the input
fields. The HTML spec can be found at w3.org. If you want to learn how
to use JavaScript, you should read a good programming book about
JavaScript. The book I recommend is "javascript : The Definitive Guide"
by David Flanagan (3rd Ed).
(Go ahead and email me if you need any implementation-specific help. I
have example code of a project I did that calculated signal loss and FCC
rules adherence for microwave radios given many input values. It
started out as an Excel spreadsheet [provided by my boss] and ended up a
web page that fed off of a database on the backend.)
HTH,
Zac
probably your best bet is to use Javascript Event Handlers to capture
fields being entered/exited, then call a recalculation funciton to sort
out the data. For DB Communication I'd suggest a hidden IFrame that can
then be submitted to a server side script - ASP, PHP, Perl etc - to be
processed and then have that reply come back with Javascript in it to
update the form on the main page.
Mail me if you need more
Mark wrote: I've been asked to convert a pay increase spreadsheet to an intranet page. So far I've developed a page that uses a combination of ASP and Javascript to retrieve all of the required information from the HR database. The problem is that I need to be able to calculate the new salary based on an increase_amount field, as well as maintain a running total of the increase amounts. Once the amounts have been determined, I then need to submit them, matched up with an employee ID that is already on the page, to a stored procedure.
I've never attempted something like this before and am a little lost on how to complete the desired functionality. Is it even possible? Can this be done without embedding an Excel spreadsheet?
- Mark
probably your best bet is to use Javascript Event Handlers to capture
fields being entered/exited, then call a recalculation funciton to sort
out the data. For DB Communication I'd suggest a hidden IFrame that can
then be submitted to a server side script - ASP, PHP, Perl etc - to be
processed and then have that reply come back with Javascript in it to
update the form on the main page.
Mail me if you need more
Mark wrote: I've been asked to convert a pay increase spreadsheet to an intranet page. So far I've developed a page that uses a combination of ASP and Javascript to retrieve all of the required information from the HR database. The problem is that I need to be able to calculate the new salary based on an increase_amount field, as well as maintain a running total of the increase amounts. Once the amounts have been determined, I then need to submit them, matched up with an employee ID that is already on the page, to a stored procedure.
I've never attempted something like this before and am a little lost on how to complete the desired functionality. Is it even possible? Can this be done without embedding an Excel spreadsheet?
- Mark
Thanks Zac & Greg. I appreciate the replys. If you have an example
that you could show me I think it would help me understand. If not, I
at least have some direction.
Thanks again!
- Mark
Greg Griffiths <gr***@surfaid.org> wrote in message news:<3F***************@surfaid.org>... probably your best bet is to use Javascript Event Handlers to capture fields being entered/exited, then call a recalculation funciton to sort out the data. For DB Communication I'd suggest a hidden IFrame that can then be submitted to a server side script - ASP, PHP, Perl etc - to be processed and then have that reply come back with Javascript in it to update the form on the main page.
Mail me if you need more
Mark wrote: Thanks Zac & Greg. I appreciate the replys. If you have an example that you could show me I think it would help me understand. If not, I at least have some direction.
Thanks again!
- Mark
Hey Mark,
Here's an implementation of my system here: http://planetzac.net/test/apdb/wiapdb.php
I just set it up for educational purposes, so there's no sensitive
information there. Normally, I would password protect something like
this, but there's no need in this case. Go ahead and play around with
it and see how it works. Feel free to create new access points and
alter their values.
To see how the JavaScript works, just view the page source (it's all
there). If you're interested in the server-side script, I wrote
everything in PHP and I'd be happy to email you a copy of the code if
you're interested in that as well.
HTH,
Zac
Black Hills, huh? That would be in my "neighborhood"...
Thanks for sharing your page. I'm not sure that its going to help me,
however. Your page has a set number of fields all uniquely named and
referenced. I'm trying to figure out how to take something more like
a 2 column table that can have a varying number of rows. (The number
of rows needs to be flexible as each manager can oversee a different
number of people.) The first column would be the record key, and the
second column would be the salary adjustment from which other fields
would be calculated (ie a total adjustment amount field).
If I can create this, I'm thinking that I can then combine the key
with the adjustment and send it as one field, parse it out at the
server and then populate my table.
Does this make sense?
Zac Hester <ne**@planetzac.net> wrote in message news:<3f********@news.enetis.net>... Hey Mark,
Here's an implementation of my system here:
http://planetzac.net/test/apdb/wiapdb.php
I just set it up for educational purposes, so there's no sensitive information there. Normally, I would password protect something like this, but there's no need in this case. Go ahead and play around with it and see how it works. Feel free to create new access points and alter their values.
To see how the JavaScript works, just view the page source (it's all there). If you're interested in the server-side script, I wrote everything in PHP and I'd be happy to email you a copy of the code if you're interested in that as well. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Krishna Tulasi via .NET 247 |
last post by:
Hi,
I am having trouble with creation of XML programmatically using .NET. Specifically Im trying to create an element which looks like below and insert into an existing xml doc:
<Worksheet...
|
by: OM |
last post by:
I have 3 tables tblFI, tblFIDet, tblMac, in Access 2000
tblFI
fldFIAuto, autonumber,
fldDate, date
…and a few more fields that don’t matter.
tblFIDet
fldFIDetAutoID, autonumber...
|
by: nikkii |
last post by:
I currently have a spreadsheet with more than 1000 records. Within
this spreadsheet are many duplicates. In the past I've been using he
filter feature to find the duplictes. However, as the...
|
by: Dixie |
last post by:
I have a spreadsheet that uses VBA code in Access to save itself as a text
file. The line is as follows.
xl.ActiveSheet.SaveAs CurrentProject.Path & "\Reports\" &
DLookup("", "tblButtons",...
|
by: Mitch |
last post by:
I am using Access to create an Excel spreadsheets with graphs related
to rows on the sheet1 to the graph on sheet2. I am using the same data
but different subsets of the data to make different...
|
by: shapper |
last post by:
Hello,
I am for days trying to apply a XSL transformation to a XML file and
display the result in a the browser. I am using Asp.Net 2.0.
Please, could someone post just a simple code example,...
|
by: melcoats |
last post by:
Hi Everyone,
Looking for some help here. How do I reference a spreadsheet I inserted in a user form? I'm trying to create an app for a graphics program that calcluates area. The calc language I...
|
by: Louis |
last post by:
I am trying to use php to update a spreadsheet (MS Excel or OpenOffice
Calc) with data from MySQL.
I looked into PEAR::Spreadsheet_Excel_Writer if it will do the job. If I
understand it...
|
by: vijaymohan |
last post by:
Hi ..I am very new to perl..can some one help me with this script pls..
I am Querying database and writing data to excel..
Here is my script:
#!/usr/bin/perl -w
use strict;
use DBI;
|
by: Ed from AZ |
last post by:
I'm using Word 2003. I use a proprietary Java program that takes all
the information in the various forms and generates an XML file.
There
are times I need to move information between files. I...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
| |