javascript

Popup Window for a Flicker feed using CSS, Ajax, Javascript, in a Coldfusion environment.

Creating hover over window on thumbnails of a Flicker feed using CSS, Ajax, Javascript, in a Coldfusion environment. ...

Test ascending Javascript array of Date objects

I have a javascript array of Date objects, which I'd like to test for ascendingness. This is what I built, but I am kind of disappointed by it. Any suggestion? function isAscending(timeLine) { if (timeLine.length < 2) return true; for(var i=1; i < timeLine.length; i++) { if(timeLine[i-1] > timeLine[i]) return false; ...

Why do textfields become disabled in IE6 for no reason?

I have made few changes on this huge JSF page, which is full of Javascript as well. I dont know which change make the problem happen. The problem is: after some Javascript is executed, all the text fields in the page become readonly. The problem is not occurring in IE7 nor in Firefox. I have debugged all the javascript, there is no erro...

dynamic web forms

Hi, I'm developing a web application that allows reports to be written and viewed online. These reports will have the structure of a typical school report or annual employee appraisal report. I would like the user to be able to customise the structure of their report. For example, one school might want a report in the format Subject ...

what is the use and purpose of uncompressed version of jquery library file provided by jquery.com?

Jquery.com provide 2 version of jquery library. I always use Minified version because i never edit anything in jquery base file. but what is the use and purpose of another Uncompressed Code version? Does people edit main library file to get something? If yes then if we edit anything in main file then we can't use google ajax library lin...

Javascript: traversing 2 level deep array with "for" doesn't produce another array..

Hello, Sorry if my title is hard to understand. Let me explain. To use this example of my structure: Array ( [2] => Array ( [0] => stdClass Object ( [category_id] => 2 [category_name] => women [project_id] => 1 [project_name] => Balloons ...

Can AJAX calling a external webservices functions

<asp:ScriptManager ID="ScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="WebService.asmx" /> </Services> </asp:ScriptManager> <script type="text/javascript"> WebService.GetUpdate("hhh",OnComplete, OnTimeout, OnError); </script> this code is working ...

How to get 19KB Minified version of jquery file?

Jquery.com shows Minified and Gzipped version as 19KB? Production (19KB, Minified and Gzipped) Development (120KB, Uncompressed Code) but when we click on download for Production version. it goes to this link http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.min.js&amp;downloadBtn= and the file which is on thi...

Help me to understand <script src="some.js?param1=one;param2=two" />

I observed chunks like below sometimes on web pages. So i am curious to know what this really does? or why its written in such a way? <script src="somefile.js?param1=one&param2=two" /> i can only make out following few intentions behind it Its not page URL (i mean .aspx/.php/.jsp etc.) so its not hacking kind of code where user can ...

Problems with $.getJSON in certain browsers

I have a php file that outputs json encoded text via echo '(' . json_encode( $final ) . ')'; And i have a javascript file that fetches that page $.getJSON(file, function(data){ var object = eval(data); alert(object); //for testing ... When any browser other than firefox 3.5 visits the page that calls .getJSON it alerts null BUT!!!...

loop through javascript collection, output custom text

I have a collection that looks like: var stuff = new Array(); stuff["col1"] = new Array( "key", "value", "key2", value2" ); And other one that looks like: var fun = { "key": "value", "key2": "value2" } I need to loop through each one, and output something like: INSERT Table1 (c1, c2) V...

Google Map Ajax load.

Hello, I am having "fun" with google maps and was after some assistance. Basically I have a small block of HTML/Javascript which can be loaded into a standard HTML page or into a div using Ajax. All I am attempting to do at present is get the map to appear. When the page loads as part of the HTML it is fine, appears, sings, dances and o...

Detect timezone abbreviation using JavaScript

I need a way to detect the timezone of a given date object. I do NOT want the offset, nor do I want the full timezone name. I need to get the timezone abbreviation. For example, GMT, UTC, PST, MST, CST, EST, etc... Is this possible? The closest I've gotten is parsing the result of date.toString(), but even that won't give me an abbrevia...

Javascript equivalent of PHP's list()

Really like that function. $matches = array('12', 'watt'); list($value, $unit) = $matches; Is there a Javascript equivalent of that? ...

Custom Live Validation Function

Hi, I've been trying to create my own custom LiveValidation ([LiveValidation.com]) function that connects to a database and checks if a username already exists. This is the relevant part of the form: Username: <input type="text" name="username" id="username" class="textinput"> <script type="text/javascript"> var username = new Li...

Is it possible to functionally traverse objects in JavaScript?

I think JavaScript doesn't have anything like obj.first, but I was wondering if something like this can be achieved in any way: var foobar = { aint: "foo", an: "bar", array: "foobar" }; var recursiveObjDump = function (obj, idx) { if (idx == obj.last.index) return obj[idx]; else return obj[idx] + " " + recursiveObjDump(obj, obj[...

ajax post special characters

How do I pass a a large string containing characters like '%' and '&' to my php page through ajax post? In other words how to javascript-encode them and php-decode them? ...

Sending xml using php

Hello, I have a xml file on my server. I have the following two questions. How to send this xml file using php to the clients browser ? The client would be making an ajax get request to the php script that sends the xml as a response. On the server side i use php simplexml functions to parse xml data. But, on the client end what would...

Why does onChange crash Internet Explorer 7?

We just released an online shop. On this page the selectboxes crashes Internet Explorer 7 on some computers. Never on my computer. Does anybody knows why? Live link: http://velour.se/collection/women/tops/eloise Update: turns out that the first like I posted did not crash. But the following does: http://velour.se/collection/women/outer...

How to trigger sound whenever a user clicks an element

How can I play an mp3 or wav sound using the jquery click event? i want to add click sound not any track or song ...