javascript

clicking a button via javascript does not cause a post

hi there! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" > <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"&gt;&lt;/script&gt; <script type="text/javascript" src="http://ajax.goo...

How to serialize entire XML document into JavaScript array?

Hi, I have a html document which loads an XML document using jQuery jQuery.ajax( { type: "GET", url: example.xml, etc... When that XML is loaded I want to serialize the entire XML document into a JavaScript array. How would I do this? ...

Collpasible menu needs all header needs to be closed on initial loading

I have a sidebar with collapsible menu it works fine but all the values come expanded the initial loading time.I want it to be closed on load and toggled thereafter. Here is the jquery used // Sidebar Toggle var fluid = { Toggle : function(){ var default_hide = {"grid": true }; $.each( ["pagesnav", "commentsnav", "users...

what is the purpose of numeric/boolean/string objects as opposed to primitive values?

In javascript you can call a function as a function or as a constructor. For example you can do : myObject = new Number(13); myPrimitiveValue = Number(13); or simply myPrimitiveValue = 13; I understand the difference between the results. Can you explain me under which reasonable circumstances creating a number, a boolean or a strin...

What is a good RPC model for building a AJAX web app using PHP & JS?

I'm new to writing AJAX applications. I plan on using jQuery on the client side while PHP on the server side. I want to use something like XML-RPC to simplify my effort in calling server-side code. Ideally, I wouldn't care whether the transport layer uses XML or JSON or a format more optimized for the wire. If I was writing a console ap...

iPhone like picker control using Javascript\Jquery

I am looking for iPhone-like "picker" control which can be used in the web. Without using any third party control or Flash\silverlight. Only HTML,Style sheet,javascript\jquery etc. are allowed. I will appreciate if anyone helps me. Thanks in advance.... ...

ASP.NET Javascript Clock

Hi, I would like to put a clock on my webpage which should show time and a timer for a particular interval. Could you please suggest me some open source javascript to do that?? I tried unsuccessfully searching web for flash one's. Please help. Thanks, Mahesh ...

which is the best among jquery,moo tool and yui?

Hi Hi among the jquery ,mootool ,yui and glow have crossbrowser compatiblity ...

How to run Javascript code before document is completely loaded (using jQuery)

Hi all, I am sharing a tip with you all.Please add on to this discussion. JQuery helps faster page load than javascript. JQuery functions are fired when the related elements are loaded, instead of complete pageload. This is a common practice to call a javascript function when page is loaded like window.onload = function(){ alert...

How can I change a form's input value with javascript

How can I change a form's input value with javascript depending on witch combobox item is selected. I have a form with some imported values, and there is a field of witch imported value can be changed via a combobox. In my case: print("<input type='hidden' name='issue_array[{$issue["nr"]}][\"supplier\"]' value='{$issue["supplier"]}' />"...

what javascript or how to build this chart/graph?

i come across http://flyspy.com/miles/ and been impress by their chart/graph(the 2 and 3 one, i dont know is this 2 consider chart/graph) anyone know how to build it? or did they use any javacsript script to build it? ...

javascript countdown timer with cookies

I have a countdown timer that will show a target amount to be fundraised like USD1000000 and slowly count backwards to zero over a period of days. I got this snippet: $(function() { var cnt = 75000000; var count = setInterval(function() { if (cnt > 0) { $('#target').html("<s...

Cancel the keydown in HTML.

Hello, How can I cancel the keydown of a specific key on the keyboard, for example(space, enter and arrows) in an HTML page. Thanks ...

Map works, but throws a popup error at load complainig about wrong api key

Ok, I see a lot of people have this problem, but none answer I found either here or at stackoverflow. Problem: Map works super fine! But throws an error at load "This map needs a different api key... sign up at......" Already signed up, already got a key. On some forum post a guy told that in this case map loads twice, once with the wron...

Select link from table using single selector

I wrote selector like this jQuery("td:contains('test')").parent("tr").find("a") I want to click link in table. It works great, however Id like to use it as selenium selector. Selenium supports jQuery selectors, but they have to be one liners, for example selenium.click("jquery=a:contains('test')"); How to convert my selector into ...

How to detect that a point is inside a Polygon using Google Maps ?

Hello, I would like to detect that a google.maps.LatLng is inside a google.maps.Polygon. How can I do that ? Cheers, ...

Reading server-side XML with JavaScript and jQuery

Hello, this is quite a simple question hopefully. Our client currently has a Flash banner ad on their site which they can change the text size, colour, position etc. by editing an XML file. They want to scrap flash and use JavaScript and jQuery. Now, as long as the XML file is at a readable URL I should be able make an AJAX request for...

Help with this code.

Hey guys i need help with this code.The short version is,i have to do match the follwing by using drag and drop in jquery and later i need to show a message whether it is right or wrong. var output = "Wrong"; var old_item; var new_item; var newObjArray = []; $(function () { var $gallery = $('.gallery'), $trash = $('.tra...

comparing two array of strings in javascript

Hi, How to compare two array of strings using javascript ? ...

sessionStorage seems to be working at random.

I have created this piece of code $('#date a').click(function(){ delete sessionStorage.image; delete sessionStorage.type; sessionStorage.type = 'Weakest Link'; sessionStorage.image = '<a class="charlie" href="#date"><img src="images/tea cup 01.jpg" width="50" style="margin-left:-11px !important;margin-bottom:-14px !...