javascript

how to get newline from server through ajax as javascript and execute it in client?

i am getting reply from server as xyz.innerHTML='blah blah'; in blah blah i want to send newline and it should be displayed as new line in html. what i have to do? please help. ...

Why does this JavaScript destroys my layout in Internet Explorer?

I'm using a small CMS for a small site (http://www.ovlu.li/cms/). There I include a JavaScript on the first site to open an image in a popup: <script type="text/javascript"> function pop(file) { helpwindow = window.open(file, "Vaterland", "width=600, height=796", "directories=no", "toolbar=no", "location=no", "status=no", "menubar=no",...

Javascript function question

I searched but couldn't find an answer to this seemingly easy question, so... Suppose I have a loop in which I need to set callbacks. My callback function looks like this: function callback(var1) { // code } Now my loop is something like this: for( //condition) { var x = something_different_each_time; document.getElementById('fo...

escape exactly what in javascript

Hi all, Being a newbie in javascript I came to a situation where I need more information on escaping characters in a string. Basically I know that in order to escape " I need to replace it with \" but what I don't know is for which characters I need to escape a particular string for. Is there a list of these "characters to escape"? or...

bing maps get all pushpins

How can I get all pushpins added to javascript bing map ? ...

Localization and JQuery/JavaScript

Hi, I'm working on different language packs for my web app. Some of the output is generated by the JavaScript/JQuery and I can't use .aspx.resx resource files within the JavaScript. What options do I have in order to localize output produced by the client? Thanky you ...

Source code annotation tool

I'm looking for a tool with which I can annotate source code. I have some 3rd party source code (JavaScript) I need to understand and I don't want to change it (add inline comments) so that line numbers can stay intact (for communication with others), I can avoid accidentally changing something and my annotations stand out compare...

Captcha Decoded

Hi, I have seen some captchas being decode using javascript, php, etc. How do they do it? For example, very popular megaupload site's captcha has also been decoded. ...

Formvalidator from the iframe.

Hello I have a following formvalidatior function in my document. function formValidator(formid) { var form = cic.$(formid); if(!form) return (''); var errors = []; var len = form.elements.length; for(var elementIdx = 0; elementIdx < len; elementIdx++) { var element = form.elements[elementIdx]; if(!element && !e...

how to use a specific font folder in my web site ?

Hi All, I have font folder of volta regular with license but i dont know how to use it in web site. Coz i dont want to replace it while user's machine don't have that font please tell me any solution to sort out this problem, Did have to upload it on server ? Thanks Mayur ...

what can be used instead if captcha is insecure ?

as far as i read from here, the fact that captchas are not 100% secure.what can be used instead of capcha?,as a programmer what do you think? how to solve this issue? Edit: thanks for all answers. ...

managing html rich text selections

Hi, I am writing a component for a web app which will display some html, and let me capture and manipulate the selection boundaries (of the text selected by the user). I have done this successfully (for Mozilla) with a simple div element using window.getSelection(). However, the browser selection API is different for IE. If I were to ...

Enable submit button javascript ( asp page )

Good morning. By default, and i don't know why, when the page ends the rendering, i get the submit button disabled. <input type="submit" class="buttonColor" disabled="disabled" id="MyMatrix_ctl10_Form_btnSubmit" value="Enviar" name="MyMatrix$ctl10$Form$btnSubmit"> I need some way to enable it, or else i can't submit the form. How can...

jquery document level onmousedown gets called before element's click handlers

Hi, I am using jquery 1.3.2. I am registering two handlers as follows: $(document).onmousedown(dochandler) $('#element').click(elemhandler) When I click on #element both the handlers get called. And surprisingly dochandlers gets called before elemhandler. I have tried changing the orders of above handler registration, but no use. B...

javascript: why to "sign-prefix" a variable?

hello, i'm currently looking at a little 3rd-party javascript library and i see a lot of "sign-prefixed" variables in it: function_call(+value); i know, that you can swap the sign, if you prefix a variable with '-', but why to prefix something with a '+' -- it doesn't do anything to the value, no? thanks in advance! ...

how to convert &#(no); embedded in a string to a string with corresponding character in javascript?

how to convert &#(no); embedded in a string to a string with corresponding character in javascript? ...

JQuery : What is the difference between "var test" and "var $test"

what is the difference between these statements? I know that "var $test" declares a jquery variable, but what is the difference of a jquery variable with a general javascript variable ? ...

Detect inline/block type of a DOM element

Hi, How to detect whether a DOM element is block or inline with javascript? For example, is there a function/property which returns 'inline' for a '<a>' tag (or 'block' for a '<p>' tag)? Thank you. ...

Auto include javascript file if not already included

I have an external javascript file that relies on the presence of another file. How can I, using JavaScript (or jQuery) automatically include this file if it is not already included (I can test based on the presence of a known function in this external file) Edit: It now includes the file but writes over everything completey! I have tr...

Secure, customizeable, open-source chat engine on PHP/JavaScript for all popular browsers

Please recommend Secure, customizeable, open-source chat on PHP/JavaScript for all popular browsers. ...