javascript

JS Lightbox for pictures which I want to link to the article the picture is from

Hey guys, I'm using WordPress as my CMS and I just downloaded a Lightbox plugin for a photo gallery on one of my pages. It works exactly how I want it to, except for one thing. After clicking on a thumbnail to get the photo enlarged with a lightbox effect, I want to be able to click on a link to take me to the main article where that p...

zoom image using jquery

I am looking for a jQuery image zoom script with functonality as like in this link. Has anyone done this before? I am looking for scripts which supports with ASP.NET. ...

Dynamic Text Box value comparison?

Hi all, I am generating dynamic text boxes in my application. I need to compare the values in each dynamic text boxes when I click the submit button. Can any one please help me by providing some ideas or sample codes to solve this task? The solution might either be in jQuery, Javascript or C# asp.net ...

Control YUI DataTable Record IDs

I have a DataTable in YUI and I want to have the record ID be from my data instead of yui-rec1 ... How do I do that? ...

Javasript hammered performance

Hi There, I just started using datatables (java script) for tabular data, due to js I am able to use functionalities like search, how many rows per page, sorting and pagination. Before using js, I was simply showing data in table(used Ajax for pagination), but unable to use above functionalities (Performance in this case was g...

How to continuously add to a variable on iteration of a for-loop, with jQuery?

I'm trying to increase a number on each iteration of a for loop, in jQuery (1.4.2), by the width of the previous element. I've tried the following: var $lis = $('#bookmarks > li'), liHeight = parseInt($lis.height()), numLis = $lis.length; console.log(numLis); var totalLeft = '0'; console.log(totalLeft); for (i=1; i<numLis; i++) { ...

Losing unicode Char when sending via query string in an AJAX call

Hello all, I'm trying to send some data in an Ajax call to update a record in the server var OrderNotes = $.ajax({ url:'AjaxActions/OrderNotesUpdate.aspx?OrderID=' + OrderID + '&Notes=' + $('#txtNotes').val(), async:false }).responseText; "Notes" are in unicode. When...

Up to date JavaScript book

Possible Duplicate: Best javascript book (for an experienced coder) Hi everyone. I am thinking of learning JavaScript. Can anyone suggest me a good, up to date book. I am not completely new to programming, so an entry level book should also do. I read another question on SO related to this, but however isn't this book outda...

HTML / JAVASCRIPT : Disable HTML in contentEditable=true

Possible Duplicate: HTML / JAVASCRIPT : Disable HTML CONTENT in contentEditable=true I want to know how to disable or control html elements, tags and drag and drop, image resizing and all what comes with contentEditable contentEditable="true" element. Before you ask why: Right click on this page: Control or Command+A go to h...

Javascript security risks?

What are the risks of using Javascript and how to avoid them? ...

HTML5 canvas drawImage with at an angle

I am experimenting with animation in <canvas> and can't work out how to draw an image at an angle. The desired effect is a few images drawn as usual, with one image rotating slowly. (This image is not at the centre of the screen, if that makes any difference). ...

javascript library for state workflow presentation

I would like to know of a good javascript library for workflows, I'm currently using Joint JS, but I need something more visual impressive (users only like that). ...

Javascript Array, find and combine entries with duplicate values

Hi, I have the following dynamically generated array: var myArray = ("0% { left:74px; top:202px; }" , "44% { left:427px; top:122px; }", "0% { font-size:11px; }", "55% { font-size:49px; }" ); There are 2 entries that have the same start value: 0%. How can I find this and combine it together: form: 0% { left:74px; top:202px; }, 0% { ...

JavaScript countdown to MySQL datetime format

I have a date that comes from a MySQL database in the datetime format, something like 2010-09-24 11:30:12. And I need a way to show a countdown of hours:mins to that date. I'm not very familiar with dates in JavaScript so any help would be apreciated. Thanks. ...

Jquery ajax() call fails in IE8

I have the following code for submitting data using ajax from forms of class ajax. this works perfectly in Firefox, Safari and Chrome but fails in IE. ajax: function() { $('form.ajax').live('submit', function() { var form_ajax = $(this); $.ajax({ url: form_ajax.attr('action'), data: form_ajax.s...

input.setAttribute('type', 'checkbox'); IE bug

This problem shows only in ie.all other browser namely ff,chrome,safari,opera works well. It doesn't show chcekbox instead shows a value box... code: <html> <head> <title></title> <style> *{margin:0;padding:0;} ul { padding:10px 10px 0 35px; list-style:none; } li{ display:inline; text-weight:bold; color:#475D7F; ...

getElementsByTagNameNS in (X)HTML documents.

Hi everybody, I have a question on Javascript and DOM; shouldn't the following code retrieve the three foo:bar elements in the body? The alert window displays zero. It doesn't work in any browser I have (not even Chrome Canary). Thank you for helping, have a nice weekend. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:...

JavaScript Google Maps API and web application on IPhone

Hi, I have developed a web application for mobile phones that uses JavaScript Google API. It works fine on any Android phone however on IPhone the map is not "dragable" - I can't move the map (I click on a map and try to move it but it stays the same as if I was trying to move a static image). I found some information pointing out that i...

.replace, unwanted overriding of cufon replace also.

I have this in the js file: vars explained (%id=inject is: @inject) (#%id% is just the wrapper div) $(document).ready(function(){ var injectionKey = /%id=inject%/ig; var injectionStack = $('#%id%').html(); (function($) { var theInjectionPage = $("body"); theInjectionPage.html(theInjectionPage.html().replace(injectionKe...

window.onbeforeunload functionality

When the user click on the OK button before redirecting how to call the delete function and then continue redirecting $(document).ready({ window.onbeforeunload = confirmExit ; }); function confirmExit() { var ele = document.getElementById ("localchanges") ; if (ele.value == "1") return "Changes are not saved. Discard change...