javascript

How to make javascript for font sizes fully language dependent?

Hello All I have a multilanguage webiste English and Arabic. The javascript for the fontsizes is included in the theme not in the .css. Both language have different fontsize 16 and 12. When switching from English to Arabic the English letters such as ( dates and stuff like that ) are shown way too big. And when switching from English t...

javascript to get rows count

hi how to get with javascript the rows count of a html table having id and name. thanks ...

Disallow typing of few of characters e.g.'<', '>' in all input textboxes using jquery

How do I achieve this:- When user types character like 'abcd' and then '>'(an invalid character for my application), I want to set the text back to 'abcd'. Better if we can cancel the input itself as we do in winforms application. This should happen when user is typing and not on a click of button. I want this to be applied on all text ...

How to get the start and end points of selection in text area?

i want to get the cursor start and end position of a selected range in a text-field or text-area. i tried lot of functions in various forums. but when the last character of the selection is a new line character JavaScript ignore it in IE6. any one having idea ? ...

How to fix javascript and raphaeljs memory leak?

Hello all, I have the following code using RapahelJs running in IE. This code cause a memory leak and I don't know what is wrong. Does anybody can help me and give some advices in the usage of raphaeljs and memory leaks. for (i=0; i<2000; i++) { var r = paper.rect(100, 100, 30, 30); r.remove(); r = null; } Thanks in advan...

JavaScript based diff utility

I'm looking for a diff equivalent written in JavaScript that only returns/prints relevant lines. I don't want both full text displayed next to each other with the differences highlighted, but just want the actual differences (plus some buffer lines to know where the difference is), similar to the output from the linux diff utility. Does...

how to access a web control inside a userControl from aspx page

i have 2 textbox controls inside a usercontrol TextBoxUC.ascx i have a page.aspx that contains the usercontrol. how can i get a reference to each textbox using javascript from page.aspx? ...

Shift + / Key combination not getting detected by javascript in Firefox on Mac OSX

This javascript code always returns zero for " Shift + / " key combination on Firefox 3.6.3 on OSX 10.5.8 But it returns the expected value 191 on Chrome on OSX/mac GetKeyCode = function(e) { var code = 0; if (!e) { e = window.event } if (e.keyCode) { code = e.keyCode; ...

Hide or display a button according to row count of a table

Hi, i have a HTML table and a button send. First of all the send button must have this style: style.display="none". But if the table has at least one row the button should be displayed (block/inline); I still have no idea how to relate between the table and the button. I try to use JavaScript but i should think about a function and I ...

Fancybox Auto Close, but remain user control

Hi, i've searched through the forum yet i can't find the solution. i'm refering to this thread to do the auto close function: http://groups.google.com/group/fancybox/browse_thread/thread/d09438b7... I did follow JFK's solution which works just right: 'onComplete': function() { $("#fancybox-wrap, #fancybox-overlay").delay(3000).f...

How to Add Horizontal line in Javascript

I would like to add a horizontal seperating line on a dynamic populated table. How do I do this? Below is a snippet. function addNewRow() { $('#displayTable tr:last').after('<tr><td style="font-size:smaller;" class="dataField1"></td><td style="font-size:smaller;" class="dataField2"></td><td style="font-size:smaller;" class="d...

Any good debugger for HTML5 Javascript postMessage API?

Is there any good tool out there that allows developers to correctly debug messages sent between windows with postMessage? Or maybe a plugin for Firebug? Thanks! ...

Site works perfect in Mozilla but not in IE. Is my js file not compatible with IE

I'm working on a site written in PHP/MySQL. We have a form to reserve time on a calendar and it works great in Mozilla and stores the reservation to our database, but in IE you fill out the form and when you click the "Reserve" button to submit it and nothing happens. All I can think of is that my javascript is not working with IE. I hav...

Form Bot Countermeasure Testing

I am a web developer for a web site that is occassionally plagued by form bots. Recently I received an error notification of a problem with the form submission that should be impossible for a human user. You cannot submit the form without JavaScript enabled but the server side script received a form field value that the JavaScript valida...

jQuery retrieve parameter from function call

$(document).ready(function(){ $('#cumulative-returns').graph({ width: 400, height: 180, graphtype: 'bar' }); }); I have a binded a function on click to #cumulative-returns and I want to be able to get the graphtype value like.. $('#cumulative-returns').click(function() { al...

How to convert string to XML object in JavaScript?

Hi, I am aware of this question already existing, but it has given me no luck. I have an application which loads a physicial XML document via the following method: jQuery.ajax( { type: "GET", url: fileName, dataType: "xml", success: function(data) { etc... I parse the XML and convert it into a string whic...

Getting references to local variables created during eval() in JavaScript

In the scenario below, how can I get references to the variables declared during eval() if I do not know their names? function test() { eval("var myVariable = 5"); var locals = magic() // TODO What should we do here? alert(locals["myVariable"]); // returns myVariable } Just a note: JavaScript being evaluated comes from a trusted...

jquery draggable not moving up after bottom off goes off of screen

I have made a draggable div with a handle using jquery. When the box goes off the bottom of the screen and then you drag up, the mouse moves but the box does not making the box stick to the mouse causing issue. ...

Will I be able to embed google maps on a website that has markers without the API key?

Will I be able to embed google maps on a website that has markers without the API key? thanks ...

Is JavaScript supported in an email message?

Is JavaScript supported in an email message? ...