问题标签 [mootools-more]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
141 浏览

javascript - Mootools iterate over form and grep values for xhr-request

Is it possible to get all values from a <form> and parse it to mootools/json, so that I can use it in an XHR-request like:

At the moment I have only text-input fields. In the json I like to have the input-name or ID as the key for the value. e.g.:

//mootools script parsing above to this:

0 投票
1 回答
514 浏览

javascript - 如何使 Mootools get('html') 包括输入字段的值

当我有 HTML 输入字段并通过直接输入更改它们时,它们实际上应该更改值属性。但是当我尝试获取整个 HTML 记录时,它只会显示旧的值属性。不知何故,这对我来说很清楚,因为 HTML 没有被覆盖,但我需要包含更改的输入值的 HTML。我该如何接近它?

例子:

http://jsfiddle.net/hJtzc/1/

始终提醒:

但我需要得到的是:

0 投票
1 回答
669 浏览

debugging - Mootools 'Uncaught TypeError: Property 'container' of object # is not a function' error when accordion added

I'm working with a site developed by an external developer. I've noticed the code they use for accordions only supports

I'm working with a site developed by an external developer. I've noticed the code they use for accordions only supports a fixed number of accordion items per page (even though their CMS can create an unlimited amount of items marked as being displayed accordion-style). I'm trying to tidy this up to avoid confusing my colleagues later down the line.

I'm trying to add a standard Mootools more accordion, but when I add it to a page I get the error below:

Uncaught TypeError: Property 'container' of object # is not a function mootools-core-1.4.5-full-compat.js:683

Here's an example page - the links in tags below 'Session details - Click the titles below for more information on each session.' should all be accordions.

I'm calling this code at the bottom of my page from http://www.aua.ac.uk/scripts/accordion.js:

Using these versions of Mootools (referenced at the top of the page in the head):

mootools-core-1.4.5-full-compat.js and mootools-more-1.4.0.1.js

Here is a fiddle using those verions of mootools, a portion of the HTML from my page, and the same accordion code - and it's all working. I think there is a conflict somewhere on my full page but I can't work out where.

http://jsfiddle.net/bcfu2/5/

Does anyone have any idea how to either fix this, or where to start debugging it - other than removing code/links to JS files one by one?


How to avoid XSS in this c:out?

Normally i scan my code changes using veracode to detect security vulnerabilities. Now there is a string in DB which i am collecting in a string called custFunctionality and previously i was displaying this in jsp as :

Well veracode scanned it and let me know that it constitutes a security defect.

So i used c: out here as :

Now the problem here is that the string consists of html related mark up and special characters which i need to show in the page and if i don't give escapexml='false' those characters and mark ups don't materialize. However, since there is escapexml='false' string here in the code, this constitutes a security defect for veracode as i found it out after re scanning the file.

Can anyone suggest me an alternate solution out of this quagmire ?

0 投票
1 回答
2567 浏览

mootools - 错误 - MooTools 未定义

Joomla 2.5 网站:

212.113.141.98/~艺术风暴/

得到错误:

即使在源代码中定义了 mootools-more.js。

有任何想法吗?

0 投票
2 回答
106 浏览

javascript - 我正在使用哪些 mootools 模块?

所有 mootools 更多模块都包含在我的应用程序中,但我想删除我不使用的模块。有没有一种快速的方法可以根据 mootools 更多地从脚本开始了解我正在使用哪些模块?

0 投票
1 回答
86 浏览

javascript - Mootools Fx.Slide & CSS 样式?

我正在玩一些下拉菜单的 Mootools 的 Fx.Slide 效果。我以前使用过它们没有任何问题,但由于某种原因,现在似乎一旦我在一个元素上设置了一个新的 Fx.Slide,它就会弄乱我的 CSS 样式。这是一个上传的例子......

在应用 Fx.Slide 之前

应用 Fx.Slide 后

您可以看到我的下拉菜单样式的差异。我所有的样式都首先通过这个样式表应用,似乎把我的样式弄乱的那一行是这个 menu.js 脚本中的第 19 行(这里是同样的东西的粘贴,带有行号。)。

上面两个示例之间的区别仅在于 menu.js中的第 19 行,您可以看到我在第一个示例中已将其注释掉... subNav[index] = new Fx.Slide(subNav[index], {duration: 200});

再一次,奇怪的是我在其他网站上使用过 Fx.Slide(比如这个网站上的下拉菜单),它似乎从来没有弄乱我的任何风格。有什么建议吗?

0 投票
1 回答
42 浏览

javascript - Form.Request 事件不会触发

我在处理 MooTools 中的事件时遇到问题Form.Request()

onSuccess事件触发快乐,但该onRequest事件什么也不做。我忽略了什么吗?

0 投票
1 回答
204 浏览

google-chrome - MooTools More "new Date().parse()" 在 Chrome / WebKit 中产生错误的月份

考虑使用最新的MooTools Core & More 1.5在 jsFiddle 中查看)的这个片段:

当我运行这段代码时,我通常会得到一些类似的东西

但是,当我使用 Chrome (38.0.2125.104 m) 或 PyQt 4 WebKit 窗口使用俄罗斯时区(Windows 中任何RTZ名称中包含的)时,日期是未来 1 个月

这显然不会发生在 Firefox 或 Internet Explorer 或任何非俄罗斯时区。

有人知道为什么吗?

0 投票
2 回答
101 浏览

mootools - 使可调整大小的方法使输入字段不可点击

我的行为真的很奇怪,我花了几天时间试图找出问题所在。

MooTools 方法使我的输入字段不可点击,我不知道为什么。

上面的代码需要使所有具有类'class1'和'class2'的div的子级都可以重新调整大小,并且效果很好,但除此之外它还使输入字段不可点击。

有没有人有类似的问题?

任何形式的帮助将不胜感激。

谢谢

0 投票
0 回答
50 浏览

slider - 旋钮拖动超出右边界 [更多 1.5.1]

当使用 Mootools More 1.5.1 Slider 类创建一个漂亮的滑块时,我注意到“旋钮”可能被拖到右边太远。

考虑这个滑块场景:

|---|~|----------------|

我发现我能够做到这一点:

|---------------------||~|

overflow:hidden当父 div设置时,这不好。

这是因为 Slider 类中的 Drag 对象将最左边的 x 位置 ( limit.x[1]) 设置为传入元素(旋钮的父级)的宽度。

希望这个限制是元素宽度减去旋钮宽度。

无论“旋钮”是在“元素”内部还是外部(DOM 的上方和下方),我都会遇到同样的问题。

我可以解决这个问题的唯一方法是使用 hack:

看看这个Fiddle(破碎和被黑的例子)。

我在这里错过了什么吗?还是应该将其作为错误提出?