Hey guys!!! (and gals)
I’m having a bit of trouble getting around forms, innerHTML and div’s.
What i’m trying to accomplish is simple done, and i’ve found a solution to the problem but not one i’m happy with.
ok, so to get down to it…
I have a form, with two radio boxes, 1 select box and 1 submit button.
Now, while a certain value in the select box is selected I have an additional input box appearing for further information/input (duh!).
Anyways, the input field appears, looking spiffy…but, when i submit the form, the input field is ignored.
Now, the way i’m doing it is by using innerHTML and the <div> tag.
(example)
function AddInputField(foo) {
addField = "<input type='text' name='other' id='other'>";
if (foo == "other") {
if (ie4) {
document.all['input'].innerHTML = addField;
}
else if (ns4) {
document.layers['input'].innerHTML = addField;
}
else if (ns6) {
document.getElementById('input').innerHTML = addField;
}
}
else {
if (ie4) {
document.all['input'].innerHTML = "";
}
else if (ns4) {
document.layers['input'].innerHTML = "";
}
else if (ns6) {
document.getElementById('input').innerHTML = "";
}
}
}
ok, that was the example - easy enough (and it does work, sorta…well it shows up).
Anyways, I’m now annoyed to find out that the form ignores the inserted/created input field.
I’ve found my own solution, but it’s not particularly one i’m happy with. So is there anybody here (js gurus or pretenders, dun’ matter) that’s been split by one simple problem like this one and that’s willing to share that hard-earned knowledge ?
Cheers & Thanks