javascript

ASP.NET MVC - AjaxContext

I've tried to inspect the AjaxContext that ASP.NET-MVC uses on for instance Ajax Actionlinks and their onSucces, onComplete etc. clientside functions. But I don't understand very much of it... Where is the documentation on this thing? Does anybody know how to I get the 'target' or 'srcElement' (e.target or window.event.srcElement) when...

Does JavaScript have a memory heap?

In other words, what options do I have to allocate memory in JavaScript? I know you can allocate memory either globally, or inside function scope. Can I allocate memory dynamically? What does the new operator really mean? Edit: here's a specific example. How would you implement reading an integer value from the user - n, and then read ...

CSS compression & combining / js minification - Better to do at runtime or at build time?

I have to come up with a solution to compress, version (for caching purposes) and potentially combine our JS and CSS files and I've seen two dominant approaches so far: 1) At build time: As an MSBuild task or similar. 2) Dynamically at run time: As a custom HTTPHandler (we are ASP.NET btw) for .js and .css files, with something like thi...

PHP XML IE problem

<?xml version="1.0" ?> <NBR> <resultGroups> <result>Hello</result> </resultGroups> </NBR> i have a n xml created in PHP ike this. i am retruning this XML into javascript and is trying to acces the value of node "result" using alert($(xmlObj).children('result').text()); In firefox its working fine. but in IE it gives o...

javascript prompt for password (i.e. *******)

I'm writing a bookmarklet and I need to be able to prompt the user for a "password". However, I don't want it to be in clear text on screen, so I cannot use prompt. Is there a masked alternative to prompt()? Any other suggestion? ...

HTTP Header

I am using a virtual host, so I have a shared IP address. I would like to access my test site by sending the hostname http header to the IP address, so the server can resolve the name and send back my site page. I am using an unregistered domain name on the server so I can't just type the url into the browser. Does anyone know the easies...

How can I test if a letter in a string is uppercase or lowercase using JavaScript?

How can I test if a letter in a string is uppercase or lowercase using JavaScript? ...

Is it possible to create new widget instances from within a Dashboard widget?

This is a followup to this question. It seems to be impossible to to simply keep already configured dashboard widget instances. An alternative way would be to recreate previous instances. Is it possible to create new Dashboard widget instances from within another widget? I couldn't find anything about this topic, yet. ...

How to use SpiderMonkey on Windows

Hi, I would like to use SpiderMonkey ( the javascript engine from Mozilla ) in my application. I want to use the js3250.dll shipped with firefox but i have a pb from the very beginning. It seems that the JS_NewRuntime method is not available anymore (according to the depends tool ). Any idea how to embed the javascript engine into anoth...

Javascript read files in folder

Hi all, I have the following problem which i'm trying to solve with Javascript. I have a div with a backgroudn image specified in a css file, and i want my javascript to change that image periodically (let`s say every 5 secs). I know how to change that, the problem is that i have a set of images in a folder to choose from for the back im...

Constantly Querying Server via Javascript - Good Idea?

I've got a small website that has about 5-10 administrators. I've set it up to monitor what each administrator is doing (adding items, removing items, etc). I had a list within our admin-panel that shows the previous 10 activities performed by the collective administration. Today, I decided to make this self-updating every 30 seconds. M...

How do I change the toolbar dynamically in Zimbra

Hi, what is the best way to change the toolbars in Zimbra. Zimbra does have a Toolbar for every view and we need to change it by either adding or removing buttons. I think Zimlets are supposed to provide this functionality, but Zimlets are loaded at the end and therefore the user would see the initial buttons first. Then they would disa...

jQuery: How to disable tooltip

Is there a way to disable browser tooltip from displaying when hovering over elements that have attribute 'title' populated? Note that I don't want to remove title content. Here is the code are requested: $(document).ready(function() { $('a.clickableSticky').cluetip({ splitTitle: '|', showTitle: false, ...

Can an asp:DropDownList set to be displayed in a particular direction; up or down?

Is it possible to set the direction that an asp:DropDownList appears on a page (e.g. up or down) in a code-behind/with javascript irrespective of how a browser will render it? ...

Opening a new window using php and displaying data in that.

I am having a problem in my php. What I'm trying to do here is, that I have a .html which directs to an external .js and this js file open up a .php The php extracts data from mysql tables and xml and displays the data on the webpage, (in .html form as table rows). Now when a user clicks on any row, I want that php should open up a new ...

Complex client-side logic -- better to move to the server side?

I'm working with a third-party search api, and am rather enjoying keeping pretty much the entire application on the browser side. The xml is digested entirely with javascript, and I'm rendering complex result objects dynamically, using a javascript templating engine. There are few page reloads happening, and lots of fancy javascript goin...

I'm trying to build a greasemonkey script, Chrome's debugger doesn't even like my first few lines !?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> <title>Hijack Example</title> <script type="text/javascript" src="./jquery-1.2.1.js"></script> <script type="text/javascript"> var preventDefaultAction = true; //TODO-U var cmdSpecStr = 'C-l'; //TODO-...

Tool to reverse Javascript minify?

Online javascript minify tools basically strip out comments and whitespace. Is there a tool that can reverse this? Taking what is usually a single line of code: function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}} and auto-formatting it so you can begin reverse-engine...

Styling a YUI Split button

I want to use split buttons for a left side menu. I tried adding the class following. <STYLE TYPE="text/css"> .catbutton { display: block; } </STYLE> The buttons were the right width but the menu arrow was the section taking up the variable width. Not only was it ugly but the menu activation section was in the correct place on the far...

jQuery error, only with Explorer

I have a custom jQuery script that works fine in all bowsers but one (Explorer 6, 7, 8?). The purpose of the code is to allow a user to add multiple form fields to their form (if the user want more than one phone number or more than one web address). It is written so that any "A" tag with a class containing "add" is bound to the jQue...