Jump to content

IE error Unable to modify the parent Please help


garethhall

Recommended Posts

I have the code below and works fine in firefox ans safari but I get an IE error. Can you guys tell me way?

 

As far as I can tell the error is caused by appendChild()

 

Many thanks :)

 

<script type="text/javascript">
var theNo = Math.floor(Math.random()*9999);
var spm = document.createElement('input');
spm.setAttribute('type','hidden');
spm.setAttribute('name','spamHidden');
spm.setAttribute('id','spamHidden');
spm.setAttribute('value',theNo);
document.getElementById('frm').appendChild(spm);
</script>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.