javascript

Reset Java Applet on page reload

I need to quit firefox and restart it in order for the applet to be refreshed... its anoying since i'm still programming it an the class files changes... am i missing some codes which makes it unable to refresh the applet and still take the one from the cache??? So I have a .jar applet in my website, a simulation game that spawns army w...

jquery slideUp() and slideDown() problems

Hello, I am inexperienced with jquery, and I'm having some trouble with the slideUp() and slideDown() animations. I have been working on a vCard design similar to Tim Van Damme's site. here is the link to the design: link. When you click on the portfolio or work button, the text or image appears first before the div finishes sliding do...

Notifications/Alarms in Windows Sidebar Gadgets

I need to include some kind of notifications in a sidebar gadget, preferably systray popups or sound notifications, so that they can't be missed/overlooked. Is there any existing JavaScript lib or ActiveX that you could recommend? ...

Passing additional arguments into the OnClick event handler of a LinkButton using Javascript

Hi! I have a ASP.NET Website, where, in a GridView item template, automatically populated by a LinqDataSource, there is a LinkButton defined as follows: <asp:LinkButton ID="RemoveLinkButton" runat="server" CommandName="Remove" CommandArgument='<%# DataBinder.GetPropertyValue(GetDataItem(), "Id")%>' ...

Javascript setters/getters

var author = { firstname: 'Martin', lastname: 'Hansen' } function settersGetters(propStr) { for (var i = 0; i < propStr.length; i++) { author['_'+ propStr[i]] = null; author.__defineGetter__(propStr[i], function() { return author['_'+ propStr[i]]; }); author.__defineSetter__(propStr[i], function(val) ...

Help needed in Javascript + Image + HREF

Hi <a href="#"><img src="logo.gif" onClick="alert('hi')"/></a> In the above code, I am appending a javascript onclick method to the image tag. When I click the image once and I press back, it should go back to the page it came from. Instead its staying on the same page. Is there any way I can avoid that? (probably set something else ...

How can I have a mouseover/in one off check?

Hi all, How can I test if a mouse is within a given div? I know how to use events to do something when it occurs but is it possible to check it on pageload only? What I want to do is smething like: if(mouse is in specified div) { check = true; } else { check = false; } Thanks, Denis ...

how to set a polyline on google maps every time when i click twice(make two markers) on maps,

this is my code : thanks <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width,minim...

jCarousel not showing next button correctly in Safari

Hi, Im having a little problem with jCarousel ( http://sorgalla.com/projects/jcarousel/ ). Everything works fine in Firefox and IE, however in Safari the carousel displays but the next button is inactive when there are actually more elements. Firefox and IE show the next button as active. Is there a common fix for this or a known bug ...

Using jquery, what is the simplest function to post some json data and process a returned json response?

When users click on an element in my webpage, I would like to call a javascript function that reads the values of a few text boxes on the page, wraps their contents as json where the keys are the ids for the text boxes and the values are the contents of each text box, and then posts the resulting json to a url. I would then like the sa...

ASP.net hiding panel using javascript

Hi, I have a radioButtonList with 2 items in it. A radiobutton with a "Yes" value and a radionButton with a "No" value. Below that I have a panel which I want made visible when "Yes" radioButton is selected and hidden when "No" is selected. I had originally implemented this using the AutoPostBack attribute but I want to do it in Javasc...

Kill unload function in JS?

Hello! Is there a way to kill the unload function with javascript(jquery)? I am looking for something like this: window.onbeforeunload = function(){ confirm("Close?") } or in jquery: $(window).unload(function() { confirm("close?") }); Now, on window unload I get my confirm alert but it will continue in any case. Clicking c...

JavaScript Object Question

What I want to do with the fs object is to add multiple "items" to the fs.items property. How can I do this? You can see my attempt below, obviously this does not work. I am a beginner, go easy on me :) Thanks... var fs = { name:'test', items:[] }; fs.items = { name:'item1', value:1 }; fs.items = { name:'item2', ...

jSon objects count

I have a string st returned from a web service. I convert the string to an object, how can i count the no. of arrays inside it? (for this case its 2) var st = "{[{"Name": "fake", "Address": "add"]},[{"Name": "fake", "Address": "add"}]}"; var json = eval(st); json.length is always returning 1 ...

Keeping Track of Dependent Third-party Library Releases

I am building a web application that is dependent upon several third-party libraries. What is a good strategy for making sure that you're always using the most fully patched versions? A simple method would be to keep the versions written down and visit the websites at regular intervals, but I am looking for some way to get the informat...

Javascript permission denied - different port

Hi, I have a rails app running on port 3000. The page in question has an iframe and I need to resize it depending on the height of the content loaded in the iframe. <iframe id="ifrm_col3" name="ifrm_col3" frameborder="0" src="<%=invite_path(@invite.alias)%>" onload="util.resize_iframe('ifrm_col3');"></iframe> The resize function ...

Javascript/CSS/PHP Hoverbox with various locations on mouseover

Hi, I'm trying to get various locations to appear on a image with mouseovers. So basically I have an image and when you hover over a link nearby a hoverbox appears at the location specified in CSS on the image. However I'm trying to get it to happen with multiple links without creating code for each CSS box. I have something like 50 li...

problem with updating mysql tables via AJAX

i have a 5 stars rating system, on javascript!!! bau i want to update mysql table, when clicking on stars!!! can somebody tell me how can i update the table!!! thanks. . . ...

PHP, javascript, single quote problems with IE when passing variable from ajax post to javascript function

Hi! I have been trying to get this to work for a while, and I suspect there's an easy solution that I just can't find. My head feels like jelly and I would really appreciate any help. My main page.php makes a .post() to backend.php and fetches a list of cities which it echoes in the form of: <li onclick="script('$data');">$data</li> ...

DateJS parsing mystery

I'm using DateJS to parse user-inputted dates, and getting some strange results. Date.parse("15 Jan 2010") returns Fri Jan 15 00:00:00 EST 2010 (right) Date.parse("15-Apr-2010") returns Thu Apr 15 00:00:00 EDT 2010 (right) Date.parse("15 Apr 2010") returns Thu Apr 1 00:00:00 EDT 2010 (wrong) As far as I can tell, the d MMM yyyy input...