Alessandra wrote:
> Hi all,
>
> I created a form with extension:Simple Forms. I use
> extension:ExtAuthDB and extension:AdminWhiteList to read users and
> their permission.
> I'm using mediawiki 1.14 release. I created a javascript code that I
> added into index.php so that it is always loaded.
> Well, I tested that with admin this js code works instead, with simple
> user this js code does not work.
>
> I have got other mediawiki site with 1.14 release with wiki user and
> permission system; so that I tested form with extension:Simple Forms
> and javascript code. js code works with admin and simple user.
>
> I tested form with extension:Simple Forms and javascript code (plus
> extension:ExtAuthDB and extension:AdminWhiteList to read users and
> their permission) in 1.15.1 release and js code works only with
> administrator..
>
> js code works with admin with $wgUseAjax = true; line and $wgUseAjax =
> false; line.
> Can you help me about where I could search error about permissions/js?
>
> My js code is simple:
>
> function multrtpcr(f,i) {
> var A, B, C;
> if (i == 0) {
> A = document.forms[f].a.value;
> B = document.forms[f].b.value;
> C = (A * B);
> document.forms[f].c.value = C;
> } else if (i == 1) {
> A = document.forms[f].d.value;
> B = document.forms[f].e.value;
> C = (A * B);
> document.forms[f].f.value = C;
> } else if (i == 2) {
> A = document.forms[f].g.value;
> B = document.forms[f].h.value;
> C = (A * B);
> document.forms[f].i.value = C;
> }
> document.forms[f].tipo_abb.value = 'RTA'+A;
> }
I suspect that in the case where it doesn't works you're accessing a
different form.
Also note that accessing the fields as <form>.fieldname is deprecated.
_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l