javascript

PDF time sheet using FormCalc or JavaScript to calculate hours worked

I'm trying to create a timesheet that will calculate the hours an employee worked. There is 4 In columns and 4 Out columns that I need to total the hours (see below). In 0830 Out 1200 In 1300 Out 1700 In ------ Out ----- Needs to total 7.5 hours worked If I use (OUTA1[0]-INA1[0])/100+(OUTA1[1]-INA1[1])/100+(OUTA1[2]-INA1[2])/100 I get...

Using Javascript to change URL based on option selected in dropdown.

I cannot seem to get this to work. Any thoughts? <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Select Video Test</title> <script type="text/javascript"> function selectVideo(){ var urlString = "http://www.mycookingsite.com/"; var selectedV...

javascript light box effect

Hello everyone, I have a problem with javascript code. I copied the code for the "light box" (just without the black background) off the internet. It works in Firefox, Safari and it does not work in IE for some reasons. You can see this problem on my portfolio website on the second page at svetlana-konetskaia.com/final. Could you pleas...

javascript and asp.net web user controls

I have a web user control that generates the following html on the client. I want to reference a specific RadioButton control using JavaScript. I am not sure how to do this as the RadioButton ID is generated by asp.net. For example I give the RadioButton ID = 1_RadioButton asp.net generates an ID = ctl00_ContentPlaceHolder1_Mate...

Is there a dojo or a Jquery just for Firefox add on development?

Started working on Firefox add ons, which is done with JavaScript and XUL, and I find myself sorely wanting to use Dojo or someother kind of JavaScript like library, but I can't find one that exists. So I was thinking of starting a library by porting Dojo over to a Firefox add on specific fork. Get rid off the cross browser stuff, use ar...

ASP.NET and Javascript Error

I am upgrading a project from ASP.NET 1.1 to ASP.NET 2.0. In my aspx page, I have a hidden field, like this: <input type="hidden" name="__TabControlAction" /> And I have the following javascript function: function __tabStripPostBack(key) { var theform; if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) { theform =...

js/jquery/html: getting a div from an iframe

How can I grab a div from an iframe into a JS variable? Doesn't necessarily have to use jQuery. ...

Is there a decent browser-based javascript self-editor?

Is there a decent browser-based javascript self-editor? It is obvious one can make a quick js editor with a page containing a form textarea, some buttons and callbacks. I'm wondering if someone has taken that as a beginning and ran with it. The javascript to be edited could be defined in a global string or it could be a served .js T...

trigger php function request when google maps marker is moved

When a marker is placed, I want to call a php function (in another file) with the latitude and longitude as input and output the result in a div on the page. So whenever the marker is moved, it updates the div with the latest result of the function. I know I'd need javascript to do this but I'm not very familiar with it and any help wou...

Is JS lint available for offline use?

I'd like to use JSLint but am wary of tools that have access to my unfiltered source-code. Is there an offline version or is there another similar tool that does "lint error checking" for JavaScript offline? Edit: One with a GUI / shows you a styled list of errors, instead of command line? ...

How to detect browser's protocol handlers?

I have created a custom URL protocol handler. http:// mailto:// custom:// I have registered a WinForms application to respond accordingly. This all works great. But I would like to be able to gracefully handle the case where the user doesn't have the custom URL protocol handler installed, yet. In order to be able to do this I need ...

Software Development Track vs Web Design Development Track

I'm currently a student. I just finished intermediate c#. Wow. It was interesting, but I've found myself becoming more interested in the javascript and html world as I've started to see the potential for variety with web applications and scripting. My question simply is for your best answer on the benefits or negatives of either track ...

How to detect HTTP status from JavaScript

I want to detect in a script, which could be deployed beyond my control, whether the page was delivered with a HTTP status of 200, 404 or 500 etc. This can't be done, right? ...

jQuery error?? How to get the first "td" in all rows that are visible

I have a table and I am hiding some rows. I want to get the first td in all of the rows that are showing. I have the following statement $("table.SimpleTable tbody tr:visible td:first-child"); this works in FireFox but not in IE any ideas? ...

Is there a way to manipulate code generated by Processing.js via Javascript?

I would like to call some functions or alter some variables after the Processing.js code has been parsed. Right now the only way to do this is to manipulate the source code, and then reload the source into Processing. ...

How to serialize a generic JavaScript object to XML

Does one of the mainstream JavaScript libraries (YUI, jQuery, Dojo) provide a way to serialize a JavaScript object to XML (as text)? ...

How to increment a JavaScript variable using a button press event

Can I create a javascript variable and increment that variable when I press a button (not submit the form). Thanks! ...

Getting a div's background image with jQuery. Is there an inbuilt method to strip out the url() portion?

I am using this code to get the background image of a div. var bgImage = $('#content').css('backgroundImage'); This is returning url%28http://example.com/images/layout/content-trans.png%29 I know you can do element.height() to get an element's height without px appended (parseInt() also works), so I was wondering if there was a simil...

How to get the name of a Mootools class from within

I'd like to get at the variable name of class. var Poop = new Class({ getClassName: function() { return arguments.callee._owner.name; } }); var a = new Poop(); a.getClassName(); //want 'Poop' I'm making that will be implemented into other classes, and I'd like to build a SQL query that uses the class name (pluralized) ...

jQuery css() function changing 'a' property not 'a:hover' property

Hi, I'm having a bit of trouble with the jQuery css() function at the moment. It is changing the css value of the anchor element's border-top-color instead of just the anchor element's border-top-color when hovered. Below is my code. $("#header #headerlist li a:hover").css("border-top-color","rgb(225, 149, 79)"); Any ideas why it cha...