javascript

Understanding mod_proxy and Apache 2 for writing a comet-server

Hi folks, I currently try to implement a simple HTTP-server for some kind of comet-technique (long polling XHR-requests). As JavaScript is very strict about crossdomain requests I have a few questions: As I understood any apache worker is blocked while serving a request, so writing the "script" as a usual website would block the apach...

Javascript- Cancel parent elements onmouseup event?

So I have a parent that defines a onmouseup event that hide/display a table. The problem is that I want the ability to have nested expandable/collapsible tables but when I click one that is nested it will fire the event for the parent and collapse everything. I can do some niffy stuffy in javascript like assume that the nested event wi...

What's the best .Net counterpart of Google Web Toolkit?

What's the best .Net counterpart of Google Web Toolkit? How can you compare both of technologies? ...

Scope of variable in Javascript problem

var query1 = urlencode($('input[name="searchTerm1"]').val()); //user1 var query2 = urlencode($('input[name="searchTerm2"]').val()); //user1 var rpp = 20; //number of tweets to retrieve out var c=0; var f1=new Array(); var f2=new Array(); var common=new Array(); $.getJSON('http://twitter.com/followers/ids.json?screen_name='+ query1 + ' ...

Problem calling method inside another method in javascript?

Hi, I am having a JavaScript namespace say A={ CA: function() { this.B(); }, B: function() { var test='test'; var result='t1'; C: function() { this.test='test1'; ..... ..... return 'test1'; } result=this.C(); return result; } } Now when I am executing such c...

Javascript window with passback parameters after close

How can I pass back some arguments from a window that is closed? For example Insert file dialog in TinyMCE does this. When file is selected the url is pasted into editor. (The url is passed back to the main window) I am using Prototype fyi, if that helps. PS: I rephrased this question to better describe my requirements here. ...

what is "this._processor is null" error on firebug?

Hello, I get the following error on firebug: this._processor is null and the error is from the file below, it seems like a default component of Firefox but i don't know what it is for either. file:///Applications/Firefox.app/Contents/MacOS/components/nsLivemarkService.js it appears after a while when my application is idle. Do yo...

How can I stop images from being cached -OR- how can I check that a file exists on the server?

My site loads images based on names that are created for them. It loads images assuming that they're there when sometimes they're not. Every time it loads an image like this: <img src="/myimages/my-image.jpg" alt=""/> if it's not there on the server, it seems to cache that there wasn't an image there, so next time I load up the same i...

ASP.Net MVC Submitting Ajax Form Via JQuery

I have an Ajax form that updates a div when submitted with a submit button this works fine. However I want to remove the submit button and have the form submit automatically when a user changes a selection in a drop down list. I wrote the following JQuery for this in the dropdown change event $("#SummaryFilterForm").submit(); The pro...

Capture Right Click on HTML DIV

I am trying to paint cell on a html page, where each cell is a DIV, I need to be able to capture right click event on any of these cells, How can I do that? <script> function fn(event) { alert('hello'+event.button); } </script> <div id="cell01" class="" onclick="fn(event);" style="left: 1471px; width: 24px; ...

jQuery Plugin - Keep options object separate

I created a jQuery plugin that was working great until I started testing it with more than one object on a page. The problem is that the options object passed to each new plugin object is not always the same one associated with that specific object when I access it from inside a function in the plugin. I have a feeling that I am missing ...

Why does some jquery code only work if it's at the end of my html-body section?

I have the following code for creating tabs. It works at the end of the html body section but not if I place it at the beginning - before all of the divs are defined. Why might that be? <script type="text/javascript"> $("ul.tabs li.label").hide(); $("#tab-set > div").hide(); $("#tab-set > div").eq(0).show(); $("ul.tabs a")...

Can Javascript access native image size?

I'm writing a jQuery function where I'd like to access both the native size of an image, and the size specified for it on the page. I'd like to set a variable for each. How is that done? ...

Send a file from a web page in Outlook

I have a web page that displays a list of documents stored on the web site. I need to add a link next to each document that can e-mail it. By that I mean attach the entire document to the e-mail. When clicking the e-mail link, a 'New Message' window needs to display with: Subject line filled in with the title of the document (displaye...

How can I integrate a location search on my webpage with google maps?

I currently have Google Maps integrated into my webpage. It is being used to tell the user where an event is (generally, it's a user submitted event). The previous programmer put it the functionality to center the map on a latitude and longitude, if you knew it. However, most people don't know the latitude and longitude of locations (som...

Make onclick event stick after page reload

I have Javascript that opens another window and registers a click handler for all the links: //Inside a class somewhere this.file_browser_window = $(window.open("/filebrowser", "file_browser_window", "width=800,height=600")) Event.observe(this.file_browser_window, 'load', function (){ //This is the event I am after Event.ob...

Javascript error in IE (rollover)

i have some javascript roll over code that works fine in firefox but when i try it in IE i get this error: Message: 'document[...]' is null or not an object Line: 25 Char: 13 Code: 0 URI: http://www.jgm-design.com/ the code im using is: if (document.images) { image1 = new Image; image2 = new Image; image1.src =...

Controlling print size in IE7

It seems that IE7 defaults to "Shink to Fit" on the printing of HTML pages. Is there a way to control the browser settings/print preview settings using ActiveX thru Javascript? ...

JQuery Accordion Activation

Is there another way to activate an accordion menu besides the .accordion('activate', indexval); method? In IE7 this changes my header DIV formatting (it smashes it). The accordion is at the base of the page so when it is activated my header disappears. Can anyone offer me some help with this? Here's what I have.. The the activation i...

How do I distinguish between duplicate cookies?

I am observing, on both Firefox and IE, that if I have a cookie 'x' on the domain a.b.c.com, and also have a cookie with the same name 'x' on domain a.b.com, then when I look at the value of document.cookie on the a.b.c.com domain, it shows both cookies. I would like to see just the cookie from the a.b.c.com domain, and not the one from...