javascript

How do you make something to appear slowly on a page using Javascript?

Is there easier way to make something to appear slowly on webpage? I tried to incrementally increase opacity of the CSS, but it (opacity) tag is different for each browser. Is there well know Javascript function that everyone uses? Or is there any css tag? [edit] Thanks for Jquery suggestion. Is there other option? My page is very small...

Is it possible to pass a javascript array through GET and access it through $_GET at the other end..?

Hi all... I have a javascript array say jsArr[]. I want this array to be passed to a php page through the get method. Something like "nextPage.php?arr=jsArr[]". There i should be able to access the array like "$arr[] = $_GET[arr]" and perform operations like foreach($arr as $key => $val). Is it possible...? Thanks a lot in advance.....

How can I send some attributes to the callback function?

When I add an event listener like so: oTarget.addEventListener(sEventType, fnHandler, false); how can I send some attributes to the fnHandler function? ...

Help with FQL and List (of T)

Hi I am using the Facebook Toolkit and making a request using FQL.Multiquery. I am using the following code which returns the correct data: Dim query1 As String = String.Format("SELECT post_id, actor_id, target_id, message FROM stream WHERE source_id in (SELECT target_id FROM connection WHERE source_id={0}) AND is_hidden = 0", FBuserI...

Javascript: prototype method error?

I am getting a "TestFunc is not defined" error when this bit of code... /* my_object.js */ "use strict"; function MyObject (param) { this.param = param; } MyObject.prototype.TestFunc = function () { console.log ('in TestFunc'); } MyObject.prototype.RealFunc = function () { // I have tried 3 different ways to call TestFunc:...

getElementsByTagName problem in chrome and safari

I`m parsing a Google Maps RSS with javascript and using the following code to get the point coordinates: point_coords = items.getElementsByTagName('georss:point') Unfortunately it works in FF but not in safari and chrome (still not tested in Opera and IE) The XML looks like: <item> <guid isPermaLink="false">guidNo</guid> <pu...

JS error: play is not a function

Hi all. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><meta http-equiv="content-type" content="text/xhtml; charset=utf-8" /> <script type="text/javascript" language="javascript" src="/j...

Problems clearing <textarea> after message is sent

I'm currently making a web-based chat system but I've run into a problem. I have set up a function in javascript to check if the user presses enter in the textarea and send the message if this has happened. The problem is every time that function is used the textarea is left with a single carriage return in it as if the value of the text...

How to add an event listener with a callback function that accepts attributes?

And also, how to remove it then? ...

jQuery dialog scripts for input val

Hi, I have a bit of a problem with a jQuery dialog and the way scripts are handled. In the dialog html, I have <input id="test"> If I do <script type="text/javascript> $('#test').val("haha") </script> after the input, it shows up. If I put it before, it doesn't work. Now the problem is I'm trying to change the value of $('#te...

upload large files in a browser with a progress bar, prefer no flash just js and php

what is the best way to build an upload widget that can handle large files is there a great jquery plugin for this? I'd really love to have a progress bar without having to depend on flash would need to use php for the backend ...

Custom image editor for Google Docs

I am designing a web application that as an end result creates images (graphs plots, etc). These images will get used in Google docs documents. Users also need to be able to edit these images after they already posted to Google docs. In the current version, I add a link around the image with the url to the location of my Flash editor, ...

JavaScript: Asynchronously loaded scripts, are those evaluated "in parallel" (Race conditions)?

Hello, given I asynchronously(!!) load several JavaScript files with an asynchronous script loader (that writes a script tag into the document's head that then will download the file), are these scripts evaluated in parallel? <script> var script = document.createElement('script'); script.src = "library1.js"; document.getElementsByTa...

Specify No. of rows of textarea depending on content. HTML,Javascript

Hi I have a function to increase the No. of rows of a textarea when the user types on it, so it works fine. But when the form brings the text into the textarea as the user is not typing in, it does not increase the number of rows, but it shows only the number of rows defined at the beginning (rows="1"), as I need it to be the smallest nu...

Best way to add a 'callback' after a series of asynchronous XHR calls

Hey folks I stumbled on a piece of Ajax code that is not 100% safe since it's mixing asynchronous/synchronous type of code... so basically in the code below I have a jQuery.each in which it grabs information on the elements and launch an Ajax get request for each: $(search).each(function() { $.ajax({ url: 'save.x3?id='+$(this).attr(...

JavaScript timer implementation

Hello, I am trying to find out exactly how JavaScript timers work. In particular whether a timer function is executed immediately the timer expires or instead when the JavaScript engine is in some kind of idle state. For example if the JavaScript engine is executing a block of code and a timer goes off does the execution of the block o...

Debug JavaScript on a remote site using Visual Studio 2008 / IE7

I would like to debug JavaScript that resides on a 3rd-party site, using IE7 and Visual Studio 2008. How can I break into the debugger? There are no JavaScript errors and I don't have access to the JavaScript source (since it is on a third-party site). I just want to walk through the JavaScript and see how it's working. The JavaScript ...

use javascript to change <li> style

I have defined styles for <li> #mainNav{clear:both;background-image: url(../images/bg_menu.jpg);width:975px;height:43px;color:#fff;margin-top:-25px;} #mainNav ul{list-style: none;padding: 0;margin: 0;} #mainNav ul li{line-height:43px;float:left;background-image: url(../images/bg_menu.jpg);font-size:15px;font-weight:normal;text-align:cen...

Is it a Best Practice to separate css and JavaScript logic on JQuery Plugins?

We are starting to contribute to the JQuery libraries with some useful plugins that we are using in our web sites. We want to make sure that we cover the basics best practice towards the creation of plugins. My idea (which I don't know if this is a best practice or not), is to keep separate any styling from the actual logic of the Plu...

how to change zIndex .dragndrop question

first, have to look at this dragndrop (http://code.google.com/p/jquery-drag-and-drop/) what i want to ask is , isit possible to add a ACTIVE "window" onClick??? example: i got 3 window dragable, name drag1 , drag2 and drag3 drag1 zIndex="98" drag2 zIndex="99" drag3 zIndex="100" when i click on the drag1, change the drag1 zIndex va...