Hi all,
On our corporate intranet, we have a timesheet application that each
employee fills out daily. Each line item of the timesheet has a
description, job number, task code and hours worked column. Up until
now, we've simply listed all available task codes in a pulldown menu
and hoped that employees would be careful and choose the correct code
based on what they're working on. Well, that isn't happening.
I've re-written the timesheet app so that only applicable task codes
(based on the job number) will appear in the pulldown menu. I do this
by changing the innerHTML of the div where the select element lives.
The AJAX is triggered by a onKeyUp event on the job number text input
element. After each key stroke in the job number column, I query a
witango app that checks to see if the job number is valid, and if so,
returns a full <select> element complete with applicable task codes
for that job number. This new <select> element replaces the default
blank <select> element, which is disabled.
This is working just fine, except when I try to submit the timesheet
form. In IE, the arguments and values for the task codes are coming
through just fine. In Safari and Firefox, they just aren't there. No
values, no arguments, nothing. We're a Mac shop, so this is a problem.
I've resorted to moving the values to hidden arguments when the form
is submitted, and this seems to work. I call this from an onSubmit
trigger:
document.getElementById('hiddencode1').value = document.getElementById
('taskcode1').options[document.getElementById
('taskcode1').selectedIndex].value
where hiddencode1 is a blank hidden input element and taskcode1 is
the AJAX created <select> element.
My questions:
1) What am I doing wrong?
2) Why is the value of taskcode1 callable through javascript but
won't come through as a post argument?
3) Is there a better way to do this?
I would be happy to provide code. Unfortunately, this is an intranet
so I can't direct you there. Any assistance, as always, is greatly
appreciated.
Thanks!!!
Brian Humes
Director, Interactive
JohnsonRauhoff Communications Group
269.428.9257 (Direct)
269.428.3377 (Main)
269.428.3312 (Fax)
www.johnson-rauhoff.com
[EMAIL PROTECTED]
_____________________________
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf