I have an HTML string representing an element: '<li>text</li>'. I'd like to append it to an element in the DOM (a ul in my case). How can I do this with Prototype or with DOM methods?  (I know i could do this easily in jQuer...
I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address.  Now I think it would look much nicer, if the textarea I'm using for the main ad...
Does anybody know of a method to trigger an event in Prototype, as you can with jQuery's trigger function?  I have bound an event listener using the observe method, but I would also like to be able to fire the event programatically.  Thanks in...
I'm wondering what the best practice is for passing variables to JavaScript functions in a rails view.  Right now I'm doing something like:  <% content_for :javascript do %>    <script type="text/javascript">     Event.o...
In an application where certain elements have custom CSS properties, is there any way to retrieve such a value via JavaScript?  e.g.  <div id="myDiv" style="color:#f00;-my-custom-property:upsidedown;" />   I can access the col...
For some reason, the prototype framework (or another JavaScript code) that is shipped with Magento is replacing standard console functions, so I can't debug anything. Writing down in JavaScript console console I get the following output:  > co...
Problem: Load js files asynchronously, then check to see if the dom is loaded before the callback from loading the files is executed.     edit: We do not use jQuery; we use Prototype. edit: added more comments to the code example.   Hey guys,  I'...
We're using Prototype for all of our Ajax request handling and to keep things simple we simple render HTML content which is then assigned to the appropriate div using the following function:  function ajaxModify(controller, parameters, div_id) {...
I have this class where I am using a combination of jQuery and Prototype:  var MyClass = Class.create({     initElements: function(sumEl) {        this.sumEl = sumEl;        sumEl.keyup(this.updateSumHandler);     },      updateSumHandler: function(e...
I've got an HTML page (the parent) with an embedded IFRAME. The parent page has a couple of event listeners for mouse and keyboard events, as shown below (I'm using the Prototype library).   var IdleMonitor = Class.create({      active: null,...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.