I know I can get the values with something like:
var test_var = form.fieldname.value
Does anyone know if there is a way to get an array or something like this with both the field names and the corresponding values entered on the form?
O.k. I found some ideas, and I did find a way that I could access the corresponding values through something like this using an id value the same as the field name value. In case it is helpful to anyone else:
I have a problem with AJAX and FireFox that is on topic with form values.
var extra = document.form1.Students.value;
I'm using that in my AJAX function to get the value of a list/menu called Students. Then the AJAX sends the value to a php file and the php file recreates the form and removes the value that they previously selected.
No page refresh has taken place since it was all AJAX. The user then selects another name from the list/menu and the function is called again but this time var extra is returning the old value and not the new one. I need some way of refreshing Students.value. I'm not having this problem in IE.
I was able to fix my problem using window.location.reload(); at the end of my AJAX call. For whatever reason this wasn't required in IE. I'm guessing that IE automatically reloads when XMLHttpRequestObject returns something. Or maybe the implementation of form values is just totally different. Anyone know?