javascript

jqplot Highlighter for different line graphs

I have a series of line graphs in a jqplot chart. What i want to do is turn off highlighting for all the graphs except one graph for which i want the Highlighting to happen. How can i do this. ...

Parent element selection problem?

My HTML is something like this <div id="mydiv" class="common"> <input type="text" id="text1" value="" /> <input type="text" id="text2" value="" /> </div> I am assigning a function on the onclick event of the textbox like this $(document).ready(function() { $(".common input").click(function() { //////// Wh...

Possible to change background-color onClick, then automatically change back a second later?

Noob here - I'm working on a simple Javascript calculator, and I'm using lists (li) for buttons. I want the li background-color to change onClick, but then automatically change back half a second later. So basically I want the button click to flash the new color, not toggle it. Is this possible? Edit: This is what I have in my header...

Gecko/Firefox support for HTML5 Notifications

Hi Folks, I'm wondering if there is any build-in support for the HTML5 Notification feature in Gecko browsers so far? Maybe some hidden developer thingy ? I'm aware of WebKits window.webkitNotifications which works great, so, is there a Firefox implementation ? update After searching and reading some w3c HTML5 specs, I'm maybe a litt...

How to start creating iAds

I'd like to learn how to create iAds. I already installed Xcode and the iAd Js. In which environment to I make iAd Bundles? In Xcode? Is there any guide on how to do this? ...

JavaScript not working with Chrome & Xampp!

Hi, I've been trying for a couple hours now to figure out why JavaScript wouldn't work. The code works, but here it is anyway. <script type="text/javascript"> function change(text) { document.f1.ta.value="Hi!"; } </script> <form name="f1"> <input type="textarea" id="ta"/> <input type="button" action='change("Hi!")'/> </form> When I cl...

Losing Textbox value on postback

In a page I have a link; clicking on it opens a dialog and sets a textbox value for that dialog. However, once I click on submit in that dialog, the textbox value is null. Link: <a href="#" onclick="javascript:expand('https://me.yahoo.com'); jQuery('#openiddialog').dialog('open'); return false;"> <img id="yahoo" class="spacehw" src="/...

Making editable header text, won't work!

I have a header message that is brought in from another file (message.txt), and I'm making a text box that you can edit. (I will add the part where it makes it permanent later on.) It is changing to nothing. (E: "This is the header!" to "") This is the code.. <script type="text/javascript"> function change(text) { //document.forms["f1...

Libraries and pseudocode for physical Dashboard/Status board

OK, so I bought a 46" screen for the office yesterday, and with the imminent risk of being accused for setting up an "elaborate World Cup procrastination scheme", I'd better show my colleagues what it's meant for ;) Looking at my simple sketch, and at these great projects from which I was inspired, I would like to get some input on the ...

Conditional Redirection

<a href="/delete/<?php echo $prod_name; ?>" onClick="dropItem()">delete</a> Now is it true that only if the function dropItem return true will the page be redirected to the url given in the href attribute? If not then can anyone suggest any method to implement this kind of thing. i.e only when the java script returns true the page re...

jQuery slideToggle jump on close

Hi, I'm trying to slideToggle a in a table with jQuery and it works in FF, OP, CHrome. Only IE (6,7,8) is giving me problems. It slides down perfectly down and up, but after the slide up animation is finished. The hidden pops up in full height and then closes. So I guess it must be somwhere inbetween when it switches from a minimal h...

Ball Bouncing effect in Unity 3d

hii How to bring a ball bouncing effect on different surfaces like wood, water,mud sand, and metal. In unity, i tried it by using bouncy material.In all surfaces the ball bouncing effect is same. I dont know how to differentiate the surfaces ...

How to handle (® ´ © ¿ ¡ ° À ) special characters in javascript?

Hi: I need to to develop a javascript function to not allow special character (® ´ © ¿ ¡ ° À ) from the string. The problem is IE8 not recognize the special characters in the string and returning as -1 when using indexOf() method. What is the correct way to handle these special characters? ...

how can i search a lots of .js and .php files for a specific phrase?

Windows has a go at it but only gets a few when i seach a directory. Is there an IDE or similar that allows for searching within the files of an entire directory? for example, if I need to make sure no files require to a redundant class (old_class.php) I'd like to search for 'old_class.php' or alternatively if anyone knows a...

Is block style really this important?

I just watched a video of Douglas Crockford's presentation about his 2009 book JavaScript: The Good Parts. In the video, he explains that the following block is dangerous because it produces silent errors: return { ok: false }; And that it should actually be written like this (emphasising that although seemingly identical the beh...

Javascript error in Setting focus to a textbox inside a lightbox(Overlay) window.

Hi All, I have a textbox, a button and a "AdvancedSearch" link on my aspx page. On page load, the focus is set to the textbox. On click of the "AdvancedSearch" link, a lightbox(overlay) window will be opened. I want to set focus to a textbox present within this lightbox window. I am using javascript to achieve this. The code looks somew...

Is hardware accelerated CSS3 in Safari 4 & 5 broken, or my CSS and JS?

Hi all, I've created a somewhat silly site that shows you the expected weather forecast for any city in the World. On webkit based browsers, when the weather is sunny a sun with CSS3 animated rotated sunbeams appears. This works fine on Chrome. An example (sunny, at the moment) page is: http://willitraintoday.co.uk/iceland/reykjavik/ ...

Updating div after full page refresh following AJAX request

Hi, I have an AJAX controller action which returns JSON. The returned JSON is handled via jQuery and contains a message displayed in an update div. The JSON also contains a flag which indicates a change in state. If this is true the entire page needs to be reloaded from a different url. This is currently performed in the jQuery using wi...

How to hide URL from users when submitting this form?

I have a form with many many fields... When submitting these fields, I use the POST method which hides the actual variables passed along to the PHP page. However, I can't get rid of the complete link. Changing from GET to POST did make all the form fields invisible in the URL, but this part is still visible: mydomain.com/bin/query# ...

A brief question about JavaScript or AJAX

I have been finding ways around this for a long time but think it's time I addressed it. If I have a page that has a dropdown menu, is there anyway I can select a value which will subsequently load other values further down. Can this be done without a page reload? I will give you an example. Say I was making some tools for an admin pan...