Tuesday, October 25, 2011

JavaScript error: SCRIPT16389: Unspecified error.

we had an issue with running our enterprise web app (e4se) under IE8 and IE9, it gives error message "SCRIPT16389: Unspecified error", apparently this is not quite helpful but it did give me the line of the code that caused the panic.

here is the original code:

var oOption;
oOption = document.createElement("OPTION");
oOption.text = descValue;
oOption.value = codeValue;
sel.add(oOption); //this is where the error occurs

after refer to one of Microsoft's technical article on its Javascript implementation, I changed the above code to:

sel.options.add(oOption);
oOption.innerHTML = descValue;
oOption.value = codeValue;

the mentioned MS article is listed below:

add Method (areas, controlRange, options, ...):

'via Blog this'

No comments:

Elevating LLM Deployment with FastAPI and React: A Step-By-Step Guide

  In a   previous exploration , I delved into creating a Retrieval-Augmented-Generation (RAG) demo, utilising Google’s gemma model, Hugging ...