javascript

How does one round TABLE corners with JS or CSS?

Hi everyone, First, thanks to everyone for helping so much, I'm addicted to the community :-) All righty, so I've got a plain ole html table, and I'd like to round its corners in some way that is more automated than creating a different image for each foreground/background combination. Oh, and it absolutely must work with IE7. Anyone kn...

Convert date/time in GMT to EST in Javascript

In Javascript, how can I convert date/time in GMT to EST irrespective of user settings ? Thanks. ...

javascript 'with' reserved word

What does the Javascript 'with' keyword do? I tried searching online but no luck. Thanks. ...

How to best utilize jQuery to programmatically generate HTML elements

I have a bunch of Javascript functions that look like the following: function generateBusinessImage (business) { var business_image = document.createElement('img'); business_image.setAttribute('class','photo'); business_image.alt = business.name; business_image.title = business.name; business_image.align = 'right'; business_...

Palm Pre frameworks

I have some measure of web development experience (not my main skill, but I am pretty good with the basics) What I'm sorely lacking is knowledge of and experience with modern JS frameworks (Prototype, jQuery, YUI, whatnot). I'd like to play with them (all eventually but need to start with one). Here's the problem: I'm very interested i...

Exposing a function from Java to Rhino

It's easy to make objects available to Rhino from Java using ScriptableObject.putProperty, but is there a way to expose a top-level function? That is, can I make it so scripts in Rhino can call foo() and have that call out to Java code? ...

JScript intellisense with ScriptManagerProxy

Hi I've got a problem making my ScriptManagerProxy expose registered scripts. When I add a ScriptManager, everything works as expected and the scripts are reflected correctly, but whenever I change it to a ScriptManagerProxy, every script, even the MicrosoftAjax.js, dissapears from the intellisense. I believe there is some sort of bug ...

Possible to force printer setup (paper size) in javascript?

I have a need to print pages from a webap on to 8x4 index cards. IE doesn't save print settings from one print to the next, so is there a way to programatically force the print set up? ...

Javascript returning month as 9 where it is 10

I'm building today's date using a onclick event in JavaScript. When i set the .value property with: var now = new Date; ...Value = now.getMonth() + "/" + now.getDate() + "/" + now.getYear(); this produces: 9/9/2009 I am expecting: 10/9/2009 This happens in both IE and Firefox. The system time on my computer is correct. Any ideas? ...

Prototype and YUI

I saw a reference on a company intranet recently that "You should use YUI instead of prototype". (formerly Prototype was company recommended JS framework). Is that because YUI builds on/extends Prototype? Or merely implements a super-set of its functionality? ...

How to use both onclick and ondblclick on an element?

I have an element on my page that I need to attach onclick and ondblclick event handlers to. When a single click happens, it should do something different than a double-click. When I first started trying to make this work, my head started spinning. Obviously, onclick will always fire when you double-click. So I tried using a timeout-...

Loading HTML straight from ajax reqest, or clone templates and insert data with javascript?

I'm working on a forum like page, where changing between pages of a thread pulls in html from an ajax request and inserts it into the div container. My question, is would it be faster to just get the basic data through json retrieval, and then do something like cloning a message template and inserting the needed data into that template?...

JavaScript onKeyPress assigning problem

I am trying to add an onKeyPress event to a dynamically created html element using javascript. In practise, the element is added, the id is assigned, and the innerHTML added, but the onmouseover, onmouseout, and onKeyPress (2nd last line) events are not added to the element. The last line (.focus()) does work. Code: function newParagr...

Javascript: How to delay loading external JS file (Google Analytics)?

I'm using the following code to load my Google Analytics (external javascript) in a way that is meant to not block rendering. However, using both YSlow and Safari Web Inspector - the network traffic clearly shows that the ga.js script is still blocking rending. /* http://lyncd.com/2009/03/better-google-analytics-javascript/ Inserts GA ...

jQuery: Watching for nodevalue change

I want to watch for the nodeValue change of an element that's edited with contenteditable. Basically, I want to run a function on change of the nodevalue. I found this post: http://james.padolsey.com/javascript/monitoring-dom-properties/ Which seems to have a plugin for what I want. Here's the watch plugin: jQuery.fn.watch = function...

SOLVED: Modal dialogs from within a tabbed UI (Improved example)

(I have tightened up my original example) I'm trying to invoke modal dialogs from within a tabbed UI, and I'm confused about the behavior I'm seeing. The first time I display the UI, my dialog behaves as expected, I can pull the data out of the fields, everything's wonderful. tabtest2.html: <html xmlns="http://www.w3.org/1999/xhtml" xm...

pass a form value to another form on a different page without using url variables (javascript)

Hi I have a form on a page and I want to pass a form inputbox value to another inputbox on another form on another page without using URL variables - is this possible? They both share the same header page section if that is of any help. Thanks Jonathan ...

AJAX change page content

I have used AJAX to successfully change the content of a web page. I can include another web page from my domain but the problem I have is making the hyperlinks to work. If the hyperlinks use relative addressing then that will not work relative to the page I am including it in so I was investigating php to parse the html tag as I read i...

keydown on checkbox doesn't bubble in FF, but it does in IE. How to solve?

Using jQuery, I bind keydown globally like this: $(document).bind('keydown', function(e) { alert('keydown fired'); }); When I press a key having focused a text input field, the alert shows just fine. But when I focus a checkbox and then press a key, it does not fire. Not even with the keypress event. Why do these events not bubble up ...

Force Javascript function call to wait until previous one is finished

I have a simple Javascript function: makeRequest(); It does a bunch of stuff and places a bunch of content into the DOM. I make a few calls like so: makeRequest('food'); makeRequest('shopping'); However, they both fire so quickly that they are stepping on each other's toes. Ultimately I need it to have the functionality of. make...