Hi Ben,
I'm returning the <select> through responseText. I'll try using
createElement. Great idea. 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]
_____________________________
On Sep 24, 2007, at 8:50 PM, Ben Johansen wrote:
Do you create the select statement "document.createElement" or are
you creating the select statement and using "responseText"?
I have found that to work cross platform i was better to create a
shell of the select in the main form and populate it thru Ajax.
this way the select object is already registered in the form object.
though there is nothing wrong with doing it thru hiddens
Ben
On Sep 24, 2007, at 11:33 AM, Brian Humes wrote:
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
______________________________________________________________________
__
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf