javascript

UIWebView: Can You Disable Javascript?

You can disable Javascript in both mobile Safari and Cocoa's WebView but I can see no means of doing so in UIWebView. Am I correct? I ask in relation to this question regarding obtaining the title of page displayed in an UIWebView using Javascript. I had worried that it would fail if Javascript was disabled but it appears the API does...

Django check if JavaScript is on

Hi, Is there a way in Django (preferably in a view) to check if the user has JavaScript turned on? I need to display a very different page if a user has JavaScript than if they don't. Thanks ...

Dynamic scriptData in jQuery Uploadify

I'm pretty new to javascript and jQuery. I'm using Uploadify to upload images to the server. There are multiple Uploader objects on the page. I need to pass the id of the Uploader object being used to the server. This is what I have so far: $('input.ImageUpload').uploadify({ ... 'scriptData': {'id': ??????}, ... }); How ca...

Javascript asynchronous calls stepping on one another

I'm using AHAH (as outlined here http://microformats.org/wiki/rest/ahah) to make two calls to populate HTML on a page. The calls happen after the document is ready and are fired off one after another. The result, every time, is the first call gets overwritten with the last calls response. So I'll have two of the same chunks of HTML on th...

Injecting JS functions into the page from a Greasemonkey script on Chrome

I have a Greasemonkey script that works just fine in Firefox and Opera. I struggle with getting it to work in Chrome, however. The problem is injecting a function into the page that can be invoked by code from the page. Here's what I'm doing so far: First, I get a helper reference to the unsafeWindow for Firefox. This allows me to have ...

how to replicate JQtouch smooth iphone animations?

Hi! so, i know how to do this by theory, buy when i try the animation is really laggy. what i"m doing: i got this UL with all sort of items and text (really standard) and when i want to animate it i just add with JS a class "flipout" like so: element.className = "flipout"; the CSS for the animation looks like this: .flipout{ -webkit-...

Custom form elements script.

I am looking for a customized Form elements like RadioButton, Checkbox and Selectbox script. What do you suggest. (widthout using any framework please!) Thanks in advance. ...

Ajax data two-way data binding strategies?

I'd like to 1) Draw create form fields and populate them with data from javascript objects 2) Update those backing objects whenever the value of the form field changes Number 1 is easy. I have a few js template systems I've been using that work quite nicely. Number 2 may require a bit of thought. A quick google search on "ajax data bi...

jquery mouse events masked by img in IE8 - all other platforms/browsers work fine

Using the jQuery mouse events for mouseenter, mouseleave or hover all work swimmingly on all Mac or Windows browsers except for IE8/Windows. I am using mouseenter and mouseleave to test for hot rectangles (absolutely positioned and dimensioned divs that have no content) over an image used as hotspots to make visible the navigation butto...

How do I make an html radio button display as selected at launch time when the stored value="on"?

Hi guys, Using Javascript and html: I have a list containing radio buttons that is dynamically loaded at launch time based on stored data. Even though the stored value of the radio is "on" the radio at launch does not display as selected. I cant figure out what I'm missing. if (defsales !== undefined) { $('.defsales', newRow).val...

Making a variable name a dynamic variable

Hi There I hope someone can help me with the following... I have this code below it is written in classic asp and javascript... I have this variable in the code below my2String1 how can I make this a dynamic variable like: my2String1_1 my2String1_2 my2String1_3 I have a database value Recordset2.Fields.Item("article_no").Value wh...

How to deal with IE errors

I don't get any error in firefox or firebug, but yet in IE I get invalid argument for some reason, and I can't figure out what is the invalid argument, the javascript halts when "error" is discovered .. what can I do to debug it ? ...

Resizing an image in an HTML5 canvas

I'm trying to create a thumbnail image on the client side using javascript and a canvas element, but when I shrink the image down, it looks terrible. It looks as if it was downsized in photoshop with the resampling set to 'Nearest Neighbor' instead of Bicubic. I know its possible to get this to look right, because this site can do it j...

How to serialize DOM node to JSON?

I want to serialize DOM node or even whole window to JSON. For example: >> serialize(document) -> { "URL": "http://stackoverflow.com/posts/2303713", "body": { "aLink": "", "attributes": [ "getNamedItem": "function getNamedItem() { [native code] }", ... ], ... "ownerDocument": "#" // recursive link he...

Hide Radio Button but Show Label?

Hey guys I'm tryng to hide radio button while showing label image. <span id="js" class='info'> <label><input type="radio" name="vote" value="0" size="<?php echo $row['id']; ?>" onclick="js(this.value, this.size);" /><img src="something.jpg"/></label> <br />No: <label><input type="radio" name="vote" value="1" size="<?php echo $row[...

url rewritting to redirect to correct javascript file version

I recently read on Meta about some browser not flushing their cache even after reading a script url of this form myscript.js?v=1234 so to go around the problem i am thinking about implementing a solution i also read but without any details given to it. something like myscript-1234.js and reroute to the actual correct file, but i have a...

ajax and multiple check boxes

how to display multiple checkboxes value in ajax language? ...

What's low level Javascript?

I've seen the term "Low level Javascript" come up a few times but I've no idea what it means. Google shows no results surprisingly. Can someone shed some light on it? ...

Can you recommend a mapping API for commercial use?

The requirements I have have to do with being able to print routes between many nodes, be able to query the distances between nodes for best possible route calculation and to show custom icons on the maps. It is important to have a mapping source which is accurate as far as roads and streets are concerned. I have investigated open stre...

Iframe navigation breaks Firefox back button - workaround?

There is an annoying bug in Firefox where navigation in a dynamically created iframe, which is then removed via Javascript, results in the inability to go back using the Firefox back button (you have to use the drop down and navigate back a further couple of pages). I am using a form in an iframe which validates and submits data. On fo...