0

Hi All,

I am trying to add a an element(Select Box and added a function in onChange) through Javascript, which is working fine in IE6, IE7, FF and Opera. But i am failing in IE8.

If anyone has come accross this issue please help me.

here is my code

var productItems = ajaxObjects[ajaxIndex].response.split('**CREATIVE**');

var a3 = document.createElement('A');
div1.appendChild(a3);
a3.appendChild(document.createTextNode("Cancel"));
a3.onclick = function(){ couponCancel(productItems[0]); };
a3.style.textDecoration = 'underline';
a3.href = 'javascript:;';

Edited by saiprem: n/a

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Airshow
0

Try replacing:

a3.appendChild(document.createTextNode("Cancel"));

with:

a3.innerHTML = "Cancel";

Also, if you ensure that couponCancel() returns false, you can get rid of the line a3.href = 'javascript:;'; , though this should have no effect on your IE8 problem.

Airshow

0

Try replacing:

a3.appendChild(document.createTextNode("Cancel"));

with:

a3.innerHTML = "Cancel";

Also, if you ensure that couponCancel() returns false, you can get rid of the line a3.href = 'javascript:;'; , though this should have no effect on your IE8 problem.

Airshow

Hi Airshow,

Thanks for you response, I solved it, any way thanks once again.

The code which i gave in my previous post is absolutely working fine, I did mistake in my remaining code of javascript code.

0

Thanks for you response, I solved it, any way thanks once again.

The code which i gave in my previous post is absolutely working fine, I did mistake in my remaining code of javascript code.

:cool:

Airshow

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.