javascript

How to float elements in a div that is smaller than it's floated elements?

I want to build my own carousel for learning purposes. But I'm curious how to do it properly. I tried to put divs as carousel items next to each other with float:left. Every div has a fixed width and height. After that, I've put a div around the carousel items, called "clipping". The clipping div has the same size as the elements in it...

Automating Products (with details) Addition

Assume a simple order processing system. A Category is selected, which lists range of products, and when a product is selected, it allows for details about that product to be entered. The details differ for each product. The admin user wants enable adding new products to this system, without the programmer getting involved. The cha...

How can I configure the jquery ui date field to make it a good date of birth entry?

I have an entry I need to accept a person's date of birth in. I'm using a default jquery-ui date field but it is difficult for users to enter in a normal DOB using the graphical tools (typing it in is fine, but users keep trying to use the graphical tools of the date entry and get frustrated.) The problem is that there are only about 2...

how to get scrollTop position of parent window.

Hey guys. if (window.parent) { scrollTop = jQuery(window.parent).scrollTop(); } following code from iframe window throws permission denied. this direct code (not jquery) too. parent.document.body.scrollTop Is it possible to go around this problems? :) ...

Will existing JavaScript frameworks incorporate CommonJS?

JavaScript frameworks like Prototype, jQuery, YUI, MooTools, Dojo, et al. all seem to target client-side developers, with the focus on enabling common user interaction patterns to be implemented more efficiently and with less code. With the emergence of server-side JavaScript, do these frameworks intend to incorporate the CommonJS stand...

Custom subgrid row names in jqGrid

I've been looking for a way to specify the cell name for sub-objects in jqGrid, however I have not reached any information in the documentation. For example, my JSON result might look like this: { 'id': 32, 'company': 'Best Company Ever', 'subaffiliates': [ { 'id': 13, 'company': 'Second Best ...

Javascript - Prototype/Scriptaculous Pause on MouseOver

I'm using this simple slideshow and wondered if anyone knew how to make it pause when I moved my mouse over it and then start again if I move my mouse off the image? There is a demo of the slideshow here: http://script.aculo.us/stuff/simplest_slideshow/ This is the main code: <script> setInterval(function(){ var imgs = $$('.fadein i...

Detecting and acting on Single Verus Double KeyPress

I've hit a wall trying to solve this problem and have found no resources that address it specifically. Some are close, but nothing complete. The default behavior of the DOWN arrow-key on the web page is to scroll the page down. I'm looking for a way to detect a quick successive double-tap of the DOWN arrow-key, That accounts for: Wil...

Adding a JavaScript confirmation prompt to a delete command button in an ASP.NET grid view?

Hello all, So I have an ASP.NET grid view: <asp:GridView ID="gvReferences" runat="server" AutoGenerateColumns="False" ShowHeader="False" OnRowEditing="gvReferences_RowEditing" OnRowDeleting="gvReferences_RowDeleting" onrowcreated="gvReferences_RowCreated"> <Columns> <asp:TemplateField ItemStyle-Width="400px"> ...

Alternative to cookies

Hi I build portable HTML/Javscript prototypes, which are intended to be Zipped up and shared via email/sharepoint. The key word here is 'portable' - no server is required to run these prorotypes - just a javascript enabled browser. And there is no database. Some of the prototypes require that I persist data (just to show off potential...

jQuery vs. Yahoo UI API design

I am baffled by the difference in design between jQuery and Yahoo UI APIs. Disclaimer: I have a strong dislike of the jQuery api, but I am also a huge ignorant in web programming and javascript in general, so I could be dead wrong and come back here begging for redemption. so long... The point of my question is the following. The two de...

Error when calling a .net dll from Com Visible dll using javascript

I am developing a windows 7 gadget.I am creating an activex object and loading the assembly.I am following the methodlogy mentioned here at codeproject (GadgetInterop). One of the tasks of the gadget is to interface with Facebook. This is how I am referencing: Javascript creates a GadgetBuilder object. From here I load the my library. s...

unable to remove row from table created by jquery

hi, i am creating a table based on result from servlet, which contains a checkbox , when the cheked property of checkbox is true there will be one button in the bottom of the table which calls for a remove function, which removes that particular row from table, this function is working when the table is created inside jsp using server ta...

Is jQuery compatible with ExtJS?

I believe Ext.js was using jQuery, but I'm not sure. Does anyone know if there is full compatibility with jQuery and Ext.js? ...

Checking if Class type is available in Javascript Namespace

I would like to check if a class type is even instantiable before attempting to instantiate it via the new keyword in javascript. For example var geocoder = new GClientGeocoder(); will fail if the GClientGeocoder class is not available in the namespace. What's the javascript idiomatic way to do this? ...

Why does my jQuery event handler fail when attached to multiple elements?

I am using jquery to add mulitple new "addTask" form elements to a "ul" on the page every time a link is clicked. $('span a').click(function(e){ e.preventDefault(); $('<li>\ <ul>\ <li class="sTitle"><input type="text" class="taskName"></li>\ <li><input type="button" value="saveTask" class="saveTask button"><...

IE6 crashes with this jQuery

The following code crashes IE6 every time. It keeps refreshing the page and crashes after a minute: $(window).bind("load resize", function () { var hnf = $('#header').height() + $('#footer').height(); $('#main').height($(window).height() - (hnf)); $('.fluid').height($('#main').outerHeight()); $('#content').width($('#main...

What tools do you use when generating markup from mockups?

So I endeavor to spend most of time on the app server side of things but time to time I need to get my hands dirty and generate markup/css/js from a wireframe or mockup. As far as tools go, Ive found browsershots and Litmus app helpful and of course, vm's as well for checking things out live in ie-{6,7,8}. Otherwise I do the heavy liftin...

Effect.SlideDown not working in a JS function declaration in Rails

Why this is not working? link_to_function "share", "slide-build(#{@idea.id.to_s})", :class => "share" in my application.js function share_build(aa) { Effect.SlideDown("s_" + aa); } I used to have the javascript inside a helper in rails, and worked: link_to_function ("share", nil , :class => "share") do |page| page.visual_eff...

JavaScript dot notation

The following line is apparently written best in dot notation. I am trying to clean my JavaScript code to make it strict. What does it mean? if (ie||ns6) { var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""; } I added some context to my line of code, in c...