javascript

Is it possible to use Django to include CSS (here's the tricky part) from a JS file?

As far as I know, there's no way to use {% include %} within a dynamic JS file to include styles. But I don't want to have to make another call to the server to download styles. Perhaps it would be possible by taking a stylesheet and injecting it into the head element of the document...has anyone does this before? ...

Using depends with the jQuery Validation plugin

I've got a form with a bunch of textboxes that are disabled by default, then enabled by use of a checkbox next to each one. When enabled, the values in these textboxes are required to be a valid number, but when disabled they don't need a value (obviously). I'm using the jQuery Validation plugin to do this validation, but it doesn't se...

Google gadget Unique ID

How to get unique Google Gadget ID from a gadget added to a iGoogle website, with Javascript? ...

Javascript iPhone Scroll Effect in an iFrame / Javascript Mouse Acceleration

Hey Stackoverflow, I'm trying to recreate the iPhone flick / scroll event in a window using JavaScript. Starting with JQuery, I'm measuring the mouse's acceleration and offset during click - drag - release events using a timer: var MouseY = { init: function(context) { var self = this; self._context = context || wi...

Implementations of Subspace JavaScript cross-domain communication?

This pdf paper describes a way to manage cross-domain communication using JavaScript with a bit of help from the server. Does anyone have experience with this approach? I know CrossSafe has an implementation, but it's pretty quiet over there. (NSFW spam in that group.) While we're here, does anyone know of a good flash bridge? I'm O...

browsing olap cubes

dows anybody know any fine open source cube browser??? ideally it would be something built with plain javascript... does it even exists??? I'm planing to use it with classic asp agains a sql database... thanks a lot ...

Ajax Asynchronous in IE - Error "The Data Necessary to Complete This Operation is Not Yet Available"

Hey there. I have a 100% valid Ajax model written in Javascript with a few inputs I use being, Get or Post method, What page to communicate with, What String to send to that page and What element on my own page I might be fiddling with when I receive my response. The problem is that, should I set the request to Asynchronous (Hence Ajax),...

Adding jquery include to a DotNetNuke 4.8 skin does nothing

I'm trying to include JQuery in my DotNetNuke skin by adding these two lines of code at the top of my DNN skin: <% Page.ClientScript.RegisterClientScriptInclude("jquery", "http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js") Page.ClientScript.RegisterStartupScript(Me.GetType(), "jQueryNoConflict", "jQuery.noConflic...

How to customize date format when creating excel cells through javascript (activexobject)?

Hi all, I'm trying to convert an HTML table to Excel in Javascript using new ActiveXObject("Excel.application"). Bascially I loop through table cells and insert the value to the corresponding cell in excel: //for each table cell oSheet.Cells(x,y).value = cell.innerText; The problem is that when the cell is in date format of 'dd-mm-yy...

How to set selected index of dropdown to 0 when text of textbox is changed?

Hi, I am using a dropdown to populate a textbox. But if preferred value is not present in dropdown then user directaly enter value in that textbox. If user selects value from dropdown first and then he don't want that value and he types another text in that textbox then at this time the dropdown should be set to index 0 as user is typi...

Dynamic Floating window by javascript

Hi Friends, I want to build a dynamic floating window with close button at corner. Is it possible, and also i want to add some content dynamically into that window. Please help me.. It should be in javascript.. Better without AJAX.. Thanks in Advance ...

What is the best online resource for 3D rendering in JavaScript?

First a little intro: Last year i wrote this http://dragan.yourtree.org/code/canvas-3d-graph/ Now, i want to make complete rewrite of it, because that old version have some limitations, for example: sometimes it happens that bars are not visible, because they are drawn one behind another. In this old version there is no real 3d, just ...

Rails active_resource require JS to do delete by link_to?

When I use link_to :method=>:delete, what rails has generated is a javascript click, which is not nice if you do come across situation your client just have javascript disabled. That seems a bad idea to me. Any chance to get around this? ...

How do I disable hotkeys in Dojo StackContainer

Hi! I am using Dojo 1.2 to implement some functionality on my customer's webpage. One of the widgets I use is the dijit.layout.TabContainer, which inherits StackContainer. The StackContainer subscribes on keyboard events and creates a few hotkeys, like arrow left to move one tab to the left and so on. Now to the question: I would like...

JSON syntax for property names

What is the correct syntax to create objects in javascript that will work across the majority of web browsers (by that I mean : IE 6+, Firefox 2+, Opera 9+ ) Is this valid var a={ "class": "Person", "name": "William Shakespeare", "birthday": -12802392000000, "nickname": "Bill" } ; Or is this: var...

AJAX + ASP.net to retrieve data from Sql Server?

I'm looking to dynamically control a set of drop downs so that they'll filter their items after another drop down's index has been changed. I'm working in C#/ASP.net and it would be great if I could get the necessary data straight from Sql Server. I suppose I could generate an xml file whenever new data is uploaded to the server but tha...

What Malicious Things has Javascript Done To You?

I asked the question: What's with those Do-Not-Use Javascript People and many people said that Javascript allows security exploits through client-side attacks. So I need to follow up and understand the how bad the nature of these attacks are: I'd like to hear some detailed descriptions of actual attacks or damage caused to your comput...

Help me understand this JavaScript exploit

I usually do not have difficulty to read JavaScript script but this one I can't figure out the logic. The code is from an Exploit that has been published 4 days ago. You can find it at milw0rm. Here is the code: <html> <div id="replace">x</div> <script> // windows/exec - 148 bytes // http://www.metasploit.com ...

Javascript - MultiLine RegExp: lastIndex stuck on newlines?

Some Context From Javascript: The Definitive Guide: When regexp is a global regular expression, however, exec() behaves in a slightly more complex way. It begins searching string at the character position specified by the lastIndex preperty of regexp. When it finds a match, it sets lastIndex to the position of the first character ...

Javascript form submission to activate Spring Web Flow transitions with JSF integration

Hello guys, I`m developing an application using Spring WebFlow 2, Facelets and JSF. One of my flows does have a page that must trigger a form submit at certain events. For each different action, a different view must be presented. So, I'm trying to activate the following javascript code to perform the submission: function myFormSubmit(...