Link to home
Start Free TrialLog in
Avatar of fmhelp
fmhelpFlag for United States of America

asked on

Dependent dropdown not working in IE

I searched and found some javascript / jquery that does what I need but it doesn't work in IE 10 or 11. Have not tried other ie versions. Code works in both Firefox and Chrome. Problem with IE is when: Is this a printing issue is changed to Yes, (line 130) all that happens is the Loader.gif spins perpetually, I never get the expected drop down list. File extension is .cfm (coldfusion) I've changed to .html to upload.

I don't know javascript other than to search for, find and edit to fit my needs. Yes, I plan on learning but right now, it is what it is.
Any help in solving this for IE is appreciated.
java-problem.html
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Do you have a link to the rendered CF page?  If not, can you open the page in IE, then retrieve the source code and post the source code (but replace sensitive info with *** first)?

In the mean time, the things that stand out are:
a. In the "inline" javascript, I see:
...
            }M <==
            function selectText(textField)
...

Get rid of that "M".

b. in drop_down.js, these are better off done after the page has finish loading:
var select   = document.getElementsByName('sPrinting_issue')[0],
    textarea = document.getElementById('txtarea');

if (select.addEventListener) {
     select.addEventListener('change', handler, false);
} else if (select.attachEvent) {
     select.attachEvent('onchange', handler);
}

Open in new window


I suggest you change the lines above to:
$(document).ready(function(){
	var select   = document.getElementsByName('sPrinting_issue')[0],
	    textarea = document.getElementById('txtarea');

	if (select.addEventListener) {
	     select.addEventListener('change', handler, false);
	} else if (select.attachEvent) {
	     select.attachEvent('onchange', handler);
	}
});

Open in new window

Avatar of fmhelp

ASKER

hielo,
IE Source code (is this what you're looking for?)
I'll try to implement your suggestions.
Thanks for your response.
 File attached: iesourcecode.html
Avatar of fmhelp

ASKER

hielo,
Implemented your suggestions and still having the same issue. IE doesn't load the printing type drop down list. Works in other browsers.
There's no file attached.
Avatar of fmhelp

ASKER

Interesting. I'll try again.
iesourcecode.html
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fmhelp

ASKER

Hielo,
AWESOME! Those changes worked great. Thank you so very much.