javascript

What are IE8 add-ons useful for web developer?

Does IE 8 have any other good add-ons/extensions/plugins other than "Developer toolbar", which is useful for web developer/designer/tester? ...

JS or any other language hook on loading resources in a HTML page

What I am trying to accomplish: HTTP GET the contents of a site (say google.com) Then have some sort of hook or filter that will catch all resources that this page tries to load (for instance the CSS files, all JavaScript files, all images, all iframes, etc) The first thing that comes in mind is to parse the downloaded page/code and ...

text selection AND bubbling

this is the problem: I'm using javascript and JQuery (not UI) to drag nested objects in my web page. to disable the text selecting I have to return FALSE from the mousedown handler, but this disable also the event bubbling. But I need event bubbling... What can I do?? thanks ...

sIFR: dynamically inserting umlaut causes trouble

Hi, let me state cleary at the beginning that I know about the embedding issue in flash. So, to the point. If sIFR replaces an umlaut (ä,ö,ü) which is hard coded in the HTML file everythings works fine. But when I want to insert it dynamically it is not displayed. I played around with charset options to specifiy the javascript file i'm...

Dynamically name a JSON property

I've been trying to create a dynamically named JSON property but I keep hitting on errors. Honestly I don't know if this is possible to achieve with Javascript. Anyway here is my problem. Let's suppose I'm creating a JSON object like the following code: var DTO = { 'NewObject' : GetFormData() }; var DTO = { 'UpdateObject' : Get...

if response: 1 then window.parent

Hello. I am using this script to insert comment to the database: var http = createObject(); var nocache = 0; function insert() { document.getElementById('insert_response').innerHTML = "To Sek .. " var fID= encodeURI(document.getElementById('fID').value); var kommentar= encodeURI(document.getElementById('kommentar').value); nocache = Mat...

How to activate two JavaScript functions in parallel?

Anyone can tell me how to activate two (or more) JavaScript AJAX functions in parallel? ...

returning this on function.

can anybody tell me what's the point if any for a javascript function like this: function f() { return this; } Note: I am trying to improve my javascript skills and found that looking at other people's code is very good. I bumped into the above one and could not work out its point. ...

How to display running counter in Javascript?

I have a table cell that contains a numerical value. When changing the value, I want to create an effect where the counter moves up (or down) in 100 steps until reaching the new value. I've tried something like the following (with the help of jQuery): function update(element,newValue) { var oldValue = parseFloat($(element).text()...

Issue related to Datepicker

Hi, I have one scenario I need to create one text box row dynamically with date picker.The text box name should be same while creating new row. Whenever I am doing this I am get into trouble . I could not execute and get the result.Without date picker I can able to create new row with multi text boxes. when I am adding text box, it is...

Django Javascript form validation

Hi, I'd like to add js validation to my forms, and that validation should be done without requests to my server. So, say, I open a page with form, make some errors and js code show me (without single request to the server) that, say, this field is required, this field is too short, this field should be a number etc. The main idea - DR...

Lightbox not Working

I downloaded & followed the instruction on how to set up the Lightbox effect from here but it is not working view please help me. in the Head section: <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src=...

Javascript: How to truly reload a site with an anchor tag?

Take this code snippet for example: window.location.href = 'mysite.htm#images'; Already being on the site mysite.htm and triggering the reload thru location.href won't reload the page but jump to the anchor named within the URL. I need a mechanism to truly reload the page. Any ideas? PS: I tried location's other methods but none of ...

How to get the innerHtml, including the tag, using jQuery?

Sorry, if the title is too obscure ;D. Actually the problem is, lets say i am this code. <span id="spanIDxx" style="blah-blah"> <tag1>code here </tag2> sample text <tag2>code here </tag2> html aass hhddll sample text </span> Now if i will use the code. jQuery("#spanIDxx").html(); then it will return just the innerHTML e...

jQuery form submitting in firefox

Hello all. Please, help me with one problem. I have this code, for submitting form via anchor. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title></title> <script src="js/jquery-1.3.2.min.js" typ...

Execute JavaScript function from object

Hi all, Is it possible to execute function this way: this.values(value); not this.values[value](); this.values[value].call(); If so, how? Or any other methods? Thank you. Here is my code: write: function(value) { this.values = { "red": function() { /* do something */ }, "orange": function() { /* do something */ }, ...

Web-based Music and Sound synthesis - Survey

My question is threefold What cool web-based examples have you seen that generate music dynamically by the user? Either based on samples with an interesting interface, by sound synthesis or similar methods. Example: http://acko.net/blog/javascript-audio-synthesis-with-html-5 Has any serious web-based dynamical sound synthesis been done...

using 'this' and ':not' together in jquery

Hi. I have this line of code $(this).append("<b></b>") and I want to add a :Not condition to it. The best I could reach until now is $(this:not('.someClassName')).append("<b></b>") but of course it's not working. What can I do? Cheers. ...

Images disabled on populating data

function a() { var r1 = '<div id="title_t" style="display:inline;font-size:150%;color:white;" > </div><div name="btbar" id="bottom_bar" style="position: absolute; margin-left: auto;margin-right:auto;;">' ; r1 = r1 + '&nbsp&nbsp<img src="first.png" " />'; r1 = r1 + '&nbsp&nbsp<img src="prev.png" />'; r1= r1 + '<label id="c...

Javascript/PHP and timezones

Hi, I'd like to be able to guess the user's timezone offset and whether or not daylight savings is being applied. Currently, the most definitive code that I've found for this is here: http://www.michaelapproved.com/articles/daylight-saving-time-dst-detect/ So this gives me the offset along with the DST indicator. Now, I want to use ...