hi ...
i don't use IE ... i'm on a mac ;) ... but perhaps the following will work:
-
var text_node = document.createTextNode('text to append');
-
var text_area = document.getElementById("wow");
-
-
text_area.appendChild(text_node);
-
kind regards
Good idea, but sadly it doesn't work either.
My code is currently
-
<script type="text/javascript">
-
function changeChassis() {
-
var t = document.forms[0].chassistype.selectedIndex;
-
var v = document.forms[0].chassistype.options[t].value;
-
var res = 'junk';
-
if(v == 'DAF LF55 220 4x2 Day cab 3750mm')
-
res = 'DAF LF55 220 4x2 Day Cab 3750mm wheelbase 18 Tonnes G.V.W';
-
-
-- loads more if statements generated from database --
-
-
if(v == 'Volvo FM400 8x4 Globetrotter Cab 5100mm')
-
res = 'Volvo FM400 8x4 Globetrotter Cab 5100mm wheelbase 32 Tonnes G.V.W';
-
if(v == 'Volvo FM440 8x4 Sleeper Cab 5600mm')
-
res = 'Volvo FM440 8x4 Sleeper Cab 5600mm wheelbase 32 Tonnes G.V.W';
-
var fld = document.forms[0].chassisdescription;
-
var node = document.createTextNode(res);
-
fld.replaceChild(node,fld.childNodes[0]);
-
}
-
</script>
-
chassisdescription is the textarea.
chassistype is the selection.
This is the onchange routine for chassistype.
Idea is to set the default to a fuller description of the chassis when one is selected - and permit later edits.
The code works fine in Safari, Firefox, IE6 on Win2K, but fails on the customer's site (Win Server 2003/ EI7).
I'm going bald trying to find out why.
Ian