js template dose'nt work in ie

js template dose'nt work in ie

by yuval shafriri -
Number of replies: 7
?Why is it no script semms to be working No problem with ff and crome Thanks Yuval Shafriri
Average of ratings: -
In reply to yuval shafriri

Re: js template dose'nt work in ie

by Itamar Tzadok -

The script may contain something IE doesn't like (there are many such things especially if you develop the script on FF). The browser should indicate an error in the js file. If you have the code in an ide or any editor which shows line numbers you should be able to detect the problem quickly. hth smile

In reply to Itamar Tzadok

תשובה ל: Re: js template dose'nt work in ie

by yuval shafriri -
No NO error in my script. i Have tried also the Script from Moodle Docs. ( I generated syntax Error deliberatly and had an error)
In reply to yuval shafriri

Re: תשובה ל: Re: js template dose'nt work in ie

by Itamar Tzadok -

Which moodle version? And post the script so that we could take a look. smile

In reply to Itamar Tzadok

תשובה ל: "Re: seems to be the use of "innerHTML

by yuval shafriri -
Hi. i checked at v 2.0 . it Dose Generate An error that mean IE dosent recognise innerHTML property. and maybe also the "getElementsByName" dosent get the element at all.. the script is here: http://docs.moodle.org/en/Database_templates#Javascript_template Thanks a lot.
In reply to yuval shafriri

the error is at the getElementsByNames.. got it

by yuval shafriri -
it is not the innerHTML. when i use getByTagName it was ok. for my function it is Enough, but not for getting more specific element, so maybe better to specify it at the moodleDocs js-db-template. actually my function is to replace the "hl=en" to "hl=he", in the location field( gmap) at my db activity. (i use it as a teacher so i cannot change it at the server).
In reply to yuval shafriri

Re: the error is at the getElementsByNames.. got it

by Itamar Tzadok -

If you need to get a specific element in the Add entry template you can use the builtin field id tags (e.g [[Loc#id] ]). For the single or view template you can enclose the field in an identified div or span which you can get by getElementById and than the desired element by getElementByTagName(<tag name>)[0]. smile

In reply to Itamar Tzadok

תשובה ל: Re: the error is at the getElementsByNames.. got it

by yuval shafriri -
Thanks Hope some day they will goin us (to a unified compatible browser)