javascript

I need to know how COMET works

Hi i want to implement comet in php... i have idea about how ajax works but i tried to study about long polling server push using comet but i am facing problem to figure out how it works. so can you please help me... ...

JavaScript IE appendChild() - Unexpected call to method or property access

I have been having this problem in IE. I have two divs which I use to drag selected elements from one to another. Lets say I have a child element (also a div) in div1 and some child elements in div2. I call the div2.appendChild() method on child element of div1. It removes the child from div1 and appends it to div2. If I then try to appe...

Google Analytics code: can it go before in the document?

Google recommends to put the analytics code just before the <body> tag. I'm trying to integrate ecommerce in my site and it'd be easier to call pageTracker._addTrans from other places than the footer. Will it be ok if I change ... <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." ...

On load, jump to anchor within a div

Let's say I have the following page: <html> <body> <div id='foo' style='scroll:auto;height:400px'> // content, content, content... <div id='bar'></div> // content, content, content... </div> </body> </html> What jQuery (or vanilla Javascript) can I use so that when the page loads, it jumps to #bar only within the div...

drag and drop from outlook to webpage

I'm looking for the following functionality and a push in the right direction if it is possible... I would like to be able to drag an email that I have in Microsoft Outlook over to a webpage and have the webpage parse out details within that email. Is this possible? The intent is to take that data and interface with our help desk soft...

retrieving the image saved on the local drive using canvas drawWindow

Hi, In the previous post I rendered the webpage as image and i saved scaled the image to thumbnail and saved it on my c://. I have a collection of links that i ahve appended on a frame. So when the user hovers the mouse over these links i want the images that i saved earlier (C:/) to popup. so is there way to source the image from c:/...

calling __dopPostback from javascript where target control is an ASP.Net custom control

I need to pop up a jquery dialog as confirmation before a submit happens. I don't want the dialog to always pop up, that depends upon the setting of a dropdown. The submitting control (which I can't change by the way) is a custom control with a save and a cancel button and handlers for the save and cancel buttons. So when the user has ...

How to make a website "bigger"

I'm in a dilemma, hoping you guys can help: I've created a website for a friend of mines relative. However, after making the whole thing, the relative says she didn't understand that the design pictures I sent her where scale 1:1, so she wants the website "bigger". (basically the same thing as pressing ctrl+plus in Firefox) Do I have t...

Ajax Adobe AIR and Facebook Connect

Hi guys, Is anyone aware of any Facebook Connect implementation for Adobe AIR Ajax. I know there is an Action Script (written by facebook guys) but it seems that Facebook has forgotten about AJAX version for Adobe AIR. Since Adobe AIR can't make calls via xd_receiver.htm would be quite usefull to have version written for Adobe AIR AJAX...

Javascript Submit does not include Submit Button Value

Ok, this is less of a question than it is just for my information (because I can think of about 4 different work arounds that will make it work. But I have a form (nothing too special) but the submit button has a specific value associated with it. <input type='submit' name='submitDocUpdate' value='Save'/> And when the form gets submi...

How do I access an '@attr' value in JSON with jQuery

I'm working with the last.fm api to get artist images, and I'm getting JSON results where I need to check an '@attr' value. Unfortunately, I can't seem to access this value. The results look something like: {"image":[{ "url":"http:\/\/www.last.fm\/music\/Undefined\/+images\/3040021", "format":"jpg", "sizes":{"size":{"#text":...

How invoke ".html" as google map marker information window?

hi i have a small webpage "My_Page_1.html". i wands to invock this webpage to my google marker information window, The below code, i used for calling google map to my webpage "My_Page_2.html"... <script type="text/javascript"> var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(32.54681317351514, 3.5...

how to get javascript to execute in update panel

Hi there, I have an update panel which contains a table, to which I add rows of controls on a button click. One of the controls that is added, is a user control and it is a datepicker. Inside of that user control I have a textbox, and I have JQuery which applies the JQuery UI DatePicker plugin to it thereby turning it into a datepicke...

Javascript regexp question

I have a regexp which checks if a value has at least 10 digits: if (foo.match(/^\d{10,}$/)) { // At least 10 digits } However I want to divide the validation in 2 steps, so first i check if foo has got only numbers, and no other characters, and then i check if its got at least 10 digits. I can check the 10 digits part using foo.leng...

how to validate input type = 'file' with javascript?

you cant change the value of the input type = 'file' in a form because of security reasons. But is it possible to read the value at all with javascript to then check extensions and validate the form? or will that also be a security breach? Some examples would ease my pain... thanks ...

How can I use Autoit to close all javascript alerts and confirmations that may appear?

I am testing in selenium and I have a bunch of stuff that happens on page load. I found out about autoit, and I was thinking that it could handle all javascript dialog issues. I was searching around the web for some autoit script that could handle this... Other options would be helpful as well! I don't necessarily need all the code, b...

Real time collaborative use interface on the web

I'm wondering what the technologies and best practices are behind real time collaboration in web interfaces. An example of this is of course Google Wave. Another is PivotalTracker.com. I'm particularly interested in any work (frameworks, plugins, etc) people are doing with Ruby on Rails here. I imagine it would have to use Javascript...

Accessing Json fields with weird characters

i have a json string im converting to object with a simple eval(string); heres the sample of the json string: var json = @' "{ description" : { "#cdata-section" : "<some html here>" } } '; var item = eval('('+json+')'); I am trying to access it like so item.description.#cdata-section my problem is that javascript does not like the ...

Make a link activate on doubleclick only

I'm building a very simple web-based file browser for my website. I've styled my links to look like files and I want to be able to single-click to select them so I can do things like rename etc, and I want to be able to double-click to actually activate the link and download the file. I've come up with the following, but it looks ugly....

Creating a Front Row List's effect for a <div> with Javascript

Anybody up for a HTML/Javascript challenge? For those have used Apple Tv or Front Row on any mac/macbook, I am looking for some web design UI help. I'm trying to recreate the up-down list navigation style with javascript. There would be a list, with a semi-transparent box that scroll up and down the list to frame the list entries. For...