javascript

Still confused about JavaScript Expressions and Statements

I found this PDF here and in it the author describes an expression as any valid set of literals, variables, operators, function calls and expressions that evaluate to a single value i.e. 3 + 7 3 + 7 + 10 + "" "Dr." + " " + "Pepper" That all seems fine to me. An a statement is any set of declarations, method and function calls and expr...

YUI editor with SYNTAX HIGHLIGHTING

Are there any examples of using the YUI Editor to allow user to submit code snippets etc, like may be used in a bulletin board?. I am talking specifically, about an example that allows a user to apply syntax highlighting to sections of the submitted code, so that it is rendered (for example) as C++, PHP, Python code snippet. The SO Edit...

putting another page in div tag ?

hi i have following code for inserting another page into div An XHTML 1.0 Strict standard template </style> <script type="text/javascript"> function ajaxFunction(id, url){ var xmlHttp; try {// Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch (e) {// Internet Explorer ...

How to Play video file from my own application in jsp(File is in my own server Mysql database.)

Can any one help me,About how to play video file in jsp application.Where the video file exist in my own mysql databse (BLOB format).Can any one suggest how to play thoes video file in jap page(streaming). 1.is there any API to play video file like. you tube Embed code.or viemo player.. 2.is there any server side configuration settings...

How do I open the html page content with ms word

How do I open the html page content with ms word [javascript code] ...

Internationalization in Javascript

I'm wondering how to deal internationalization in javascript. I Googled but I'm not getting convincing answers for: Does Javascript have native support for Internationalization? What is i18n in javascript? How to deal with calendar, currency, date, etc? I've already read http://stackoverflow.com/questions/934175/internationalizatio...

[JavaScript, Canvas] Create a buffer and work on it

Is it possible to create a buffer of arbitrary size and work on that just like on a canvas element? I would like to create a graphic (> 10'000 x 10'000 pixel) and use methods like drawImage() on that. After everything is done a part should be copied over to the canvas element. createImageData() can make a buffer but there's no way to us...

jQuery - redirect after ajax call

Hi, I have the following code, however im having a problem getting window.location to work $('.test_container a').click(function() { $.ajax({ url: $(link).attr('href'), type: 'GET', dataType: 'json', beforeSend: function() { $('#lightbox').show(); }, ...

Remove the last "/n" from a textarea

How to remove the last "/n" from a textarea? ...

Any method to bypass Cross Domain issue? (for personal use only)

Hi, there I want to know if there any method to bypass the cross domain issue? It's only for personal use. what I want to do is just extract some data from my page(under control) and fill them into a external site's form (included into my page with iframe) other wise I have to copy & past them manually, that's painful. I tried many me...

What is the idiomatic way of performing an "integer " conversion/typecast in javascript?

Another question asked about the meaning of the code snippet a >>> 0 in Javascript. It turns out that it is a clever way of ensuring that a variable is a unsigned 32-bit integer. This is pretty neat, but I don't like it for two reasons. The intent of the expression is not clear, at least not to me. It does not work for negative nu...

how to change div background image in mouse over ?

I have 7 thumbnail image menus.when user points(mouseover) to a particular thumbnail, I want to change the background-image of <div> to the regarding image of that thumbnail. thumbnail images menu are in a diff div ...

Listing folders in folders - then creating arrays in JS for each of the folders - ASP.NET VB

First of all, i'm a Graphic designer so please ignore if this programming question seems stupid ... I know this question could've been split into two or three smaller questions but since I'm really new to coding VB.NET it would've killed me trying to put together the stuff ... Directory Structure: I have a directory structure as follows...

Dynamic area painting.

I have such drawing (It can be in a vector format): It is necessary for me to place it on a site and dynamically to paint it. The user chooses colour (of walls and roof)and both the wall and a roof on a picture change the colour (according to a choice of the user). The set of colours is not limited. What technology to use for the ...

calling Javascript at page load

I have a Javascript. I want to call only at page load. I dont want to call at postbacks.. (Asp.net 3,5) ...

Javascipt exception handling

Hi, Is there any way I could catch any uncaught exception in javascript? I mean, all my "dangerous" code are in try-catch blocks. But what about exceptions that I don't handle explicitly? I'm using jQuery, my main javascript file starts with : $(document).ready(function(){}) here I bind some events to some DOM elements. I can use t...

internet explorer and dynamic lists from javascript

I have a page that requires user input then it will execute some javascript and populate fields on the page. Part of this includes calling a perl script that will run and get data from another page check that against the input from the user. The number of items that the perl script will return could be anywhere from zero to ten or even m...

IE6 Flickering Issue Using Superfish Menu with BgIFrame

Hi, Just wondering of anyone knows of any fix to stop the flickering of the superfish menu that expands out over an iframe using IE6 as I am unsure of how to fix or if there is in actual fact, a fix for it. When I have a vertical menu that extends out to the right with menu options over an iframe, the menu flickers on every menu branch...

How do I find the instance to which a method belongs?

Hi! // minified base class code (if the uncompressed code is needed, I'll post it) function Class(){}Class.prototype.construct=function(){};Class.extend=function(c){var a=function(){arguments[0]!==Class&&this.construct.apply(this,arguments)},d=new this(Class),f=this.prototype;for(var e in c){var b=c[e];if(b instanceof Function)b.$=f;d[e...

how to export a html page content to MS word {javascript, ajax, jquery code}

how to export a html page content to ms word {javascript, ajax, jquery code} ...