mootools

squeezebox ajax mootools

我的未来我决定 提交于 2019-12-13 05:30:56
问题 I use the modal window a fair bit in joomla and just found out that it doesn't work with ajax added links. What is the code I need to have the modal window work with those links? I'm better at jquery than moo tools ... Thanks, Mat I found this code but can't get it to work. <script type="text/javascript"> window.addEvent('domready', function() { SqueezeBox.initialize({ ajaxOptions: { evalScripts: true } }); //SqueezeBox.initialize({}); $$('a.modal').each(function(el) { el.addEvent('click',

mootools: help loading multiple, per-page, Asset.javascript files

橙三吉。 提交于 2019-12-13 04:51:41
问题 i want to load an array of page-specific external .js files. in the past, i did it through PHP at the top of each page, like so: <?php $jsFiles = array("file01.js", "file02.js", ...); include("header.php"); ?> the header.php file loaded the files like so: foreach ($jsFiles as $file) { echo "<script type='text/javascript' src='_js/$file'></script> \n"; } but now i need to do this all in JS because i have to load these files AFTER domready which is checked and fired in the header.php file...

mootools accordion not working

╄→尐↘猪︶ㄣ 提交于 2019-12-13 04:32:02
问题 I've been wanting to try out the Accordion effect on mootools but I can't get it to work, it's just like the js doesn't load at all this is the HTML code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>BarDiJan - We Deliver</title> <link rel="stylesheet" href="/stylesheets/reset.css"

get opened pages/tabs with mootools

瘦欲@ 提交于 2019-12-13 03:51:42
问题 i have a site that need to know if the user have other pages/tabs opened just to make actions in them (like closing them, redirect etc..). i'm not talking about popups, i'm talking about content opened in a new page tab manually by the user. so basically i need a method to get a list of tabs/windows opened on my domain and be able to access the content in them (as all is the same domain, there should not be any security problems) exist something like that? Regards, Shadow. 回答1: I think it

ajaxify multipart encoded form (upload forms)

点点圈 提交于 2019-12-13 03:39:24
问题 is there a way to do this? I'm not looking for an alternative plugin (like FancyUpload or Uploadify), I just want to know how I can ajaxify the submission of an upload form. 回答1: i have seen this done with an iframe shin, something like this: http://www.openjs.com/articles/ajax/ajax_file_upload/ although i would not condone the usage of iframes normally :D 回答2: If you aren't wanting to use a plugin that couples Flash with JavaScript to provide upload progress, you can try a few things: Use

addClass converting from jQuery to MooTools

China☆狼群 提交于 2019-12-13 02:25:40
问题 I have Kunena forum template for Joomla that use MooTools 1.4. I integrated in this theme bootstrap tooltip functionality and added MooTools addClass to trigger tooltips in some classes. I checked MooTools doc's and the code should looks like below: $$('h3 a, .tk-page-header h1 .tk-latestpost a, .tk-topic-title a, .tk-topic-info a, .tk-preview-avatar a, .tk-social-icons a, .kpost-user-icons a, .kicon-profile, .tk-user-info-body li a, span.kkarma-plus, span.kkarma-minus, .btnImage').addClass('

Streamlining my javascript with a function

自闭症网瘾萝莉.ら 提交于 2019-12-13 02:24:40
问题 i have a series of select lists, that i am using to populate text boxes with ids. so you click a select option and another text box is filled with its id. with just one select/id pair this works fine, but i have multiples, and the only thing that changes is the id of the select and input.. in fact just the ending changes, the inputs all start with featredproductid and the select ids all start with recipesproduct and then both end with the category. i know that listing this over and over for

Need help using this function to destroy an item on canvas using javascript

喜欢而已 提交于 2019-12-13 01:57:21
问题 I have the following piece of code written using mootools and mootools canvas library. CANVAS.init({ canvasElement : 'canvas', interactive : true }); var itemlayer = CANVAS.layers.add({ id : 'items' }); for(var j = 0; j < 5; j++) { for(var i = 0; i < 5; i++) { itemlayer.add({ id : 'item-'+i + '-' + j, x : 51 * i, y : 51 * j, w : 50, h : 50, state : 'normal', interactive : true, //although they have no interactive events! colors : { normal : '#f00', hover : '#00f' }, events : { onDraw :

dynamically added input fields not submitting

左心房为你撑大大i 提交于 2019-12-12 16:14:56
问题 here's the jsFiddle. i'm sorry if it doesn't work properly; damn things rarely do for me... i hate jsFiddle, but it gets the code to you faster... the php document it goes to simply does this: <pre><?php print_r($_POST);?> </pre> the rows add to the DOM just fine. but the values do not submit to the $_POST array. what am i missing? and yes i've read this and this and they don't help. using Mootools, btw, so please don't bother with any jQuery answers. 回答1: In your code I see an HTML syntax

mootools Type function

﹥>﹥吖頭↗ 提交于 2019-12-12 13:30:13
问题 So I am trying to learn javascript by learning how Mootools works internally. I am looking at these lines specifically: var Type = this.Type = function(name, object){ if (name){ var lower = name.toLowerCase(); var typeCheck = function(item){ return (typeOf(item) == lower); }; Type['is' + name] = typeCheck; if (object != null){ object.prototype.$family = (function(){ return lower; }).hide(); } } if (object == null) return null; object.extend(this); object.$constructor = Type; object.prototype.