Hi,
I'm writing a javascript for IE 6 (yes, I know it's better to be protable, but we only need it for a limited number of IE 6 users).
I would greately appreciate advice as to whether there's a way to dynamically create a new form which is *invisible* (in memory only), populate it, and then submit the new form.
Notes:
1) I have to use POST, this is why I can only rely on form.submit() . If it were GET, I could manually concatenate required parameters to the server URL, and put it into the navigator. But this won't work for POST.
2) The form needs to be created dynamically, and be invisible. The idea is, I collect data from various crazy controls, do some javascript calculations, and then submit a shorter and clearer parameters list to the server.
In * non-formal * notation, it would be something like:
Can this be done in IE 6 , using javascript (not, say, VB) ?
Thanks a lot
I'm writing a javascript for IE 6 (yes, I know it's better to be protable, but we only need it for a limited number of IE 6 users).
I would greately appreciate advice as to whether there's a way to dynamically create a new form which is *invisible* (in memory only), populate it, and then submit the new form.
Notes:
1) I have to use POST, this is why I can only rely on form.submit() . If it were GET, I could manually concatenate required parameters to the server URL, and put it into the navigator. But this won't work for POST.
2) The form needs to be created dynamically, and be invisible. The idea is, I collect data from various crazy controls, do some javascript calculations, and then submit a shorter and clearer parameters list to the server.
In * non-formal * notation, it would be something like:
Code:
// This is not real javascript, just the general way i'd
// like it to appear!
// Invisible form in memory:
form f=new form();
f.method='post';
// Add parameter "salary=99" :
f.salary = new textInput(); f.salary.value=99;
// Add parameter "department=HR":
f.department=new textInput(); f.department.value='HR';
// Submit:
f.submit();
Can this be done in IE 6 , using javascript (not, say, VB) ?
Thanks a lot