0

scenario is -

bnm () function is to be called for first time and resultObject constructed .

Later on , item function is to be called dynamically .

This function get called successfully  in IE 7 .

but not in IE 8 ,  9 ,  10 .

Please suggest any solution  .

///////////////////////////////////////////////////

   function bnm(xmlData)
   {     
       this.item = function (recordno, itemname)
       {
         // some code
          return result;
       }

       return this;
   }

// Here i am calling above function

       resultObject = bnm(anyData);

       text1.value = resultObject.item(8, 'Policy1');
       text2.value = resultObject.item(6, 'Policy4');
       text3.value = resultObject.item(2, 'Policy8');
6
  • I think the function itself is working, but referring HTML element in the way you (probably) do, is deprecated for over a decade ago. Please set ids for elements and use document.getElementById() to get a reference.
    – Teemu
    Commented Jul 4, 2013 at 18:53
  • How to call item function in IE10 ? Commented Jul 4, 2013 at 19:02
  • To answer this we need more information, basicly your code should work. Please add the relevant real code to your question, and the HTML snippet too. You could also provide a jsFiddle snippet to show a non-working example. Have you tested other browsers than IEs? Any errors in the console?
    – Teemu
    Commented Jul 4, 2013 at 19:06
  • i can not do it due to security policies . The html is not imp here . Can you suggest alternate way of calling inliine functions and anonymous functions . Commented Jul 4, 2013 at 19:11
  • Hmm... I mean it would be nice to see the construction of the script and HTML. You can still narrow them down or use partial pseudo code. Or if it's something within // some code... Definitely inline functions, constructors and anonymous functions are working in all IEs. Btw. what exactly means "not working", do you get wrong results, not results at all, or an error?
    – Teemu
    Commented Jul 4, 2013 at 19:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.