js template dose'nt work in ie

js template dose'nt work in ie

yuval shafriri -
回帖数:7
?Why is it no script semms to be working No problem with ff and crome Thanks Yuval Shafriri
回复yuval shafriri

Re: js template dose'nt work in ie

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 微笑

回复Itamar Tzadok

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

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)
回复yuval shafriri

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

Itamar Tzadok -

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

回复Itamar Tzadok

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

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.
回复yuval shafriri

the error is at the getElementsByNames.. got it

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).
回复yuval shafriri

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

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]. 微笑

回复Itamar Tzadok

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

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