javascript

How to access the client registry using JavaScript?

Hai , How to set Key and Value in the client registry using javascript. I Just want to keep the user profiles in the registry. When a user visit the page from a particular system , automatically connect to the system preferred database.For that I want to keep the connection string in the windows registry. Please tell with code snipp...

Is it possible to use jsp variable value to initialize JQUERY variable?

I have some questions which are as follows: How can I use the JSP variable/array in JQUERY code? Here what ever the JQUERY code we have is stored in separate .js file and that file is included in the JSP file. Actually I want to initialize the JQUERY array with the JSP variable. So please guide me to achieve this task. ...

how to visualize a directed graph on webpage?

I want to visualize a directed graph on a web page. Are there any Javascript or Flash solution for this? free :) ...

How can I prevent one div from overlapping another on resize?

Here's an example: http://la.truxmap.com/truckpage?id=coolhaus When I make the browser window narrower from the right hand side, the recent tweets div will go underneath the container div. i want to make it so that the recent tweets div can go no further left than the right hand border of the container div. Ive been trying to figure ...

jQuery Single File Upload using HTML Input within a Dialog Boxes

Is there a simple way to upload a single file through HTML input type file with JQuery UI's dialog box using $.post? Hope this makes sense... ...

Javascipt select a sentence in textarea

I'm thinking if there is a way to use javascript to pick up ANY ONE sentence from a textarea simply by clicking any position within that sentence. I'm thinking along the line of - first, get current cursor position (which I know how) - second, somehow locate the position of the previous fullstop and the next fullstop (how?) - take what...

AIR: Can I use remote JS files in a local sandbox?

I need a local sandbox to load IMG content using "file:/" scheme. I want to reuse JS classes from my web-based app. Q: Is it possible to download remote JS files and load into an AIR app running in a local sandbox? NOTE: I'm not talking about a sandbox bridge here, I'll use that to manage local FS access. But here, I'm just talking ab...

Tooltips problem, making this javascript work with my smarty foreach loop, help pelase!

I am using an example of tooltips from http://www.dynamicdrive.com/dynamicindex5/stickytooltip.htm on www.euroworker.no/order I have this code here to work with, but it just doesn't seem to work correctly, I've tried everything I can think of (not a lot of things) Here's the code. {foreach from=$cart.cartItems item="item" name="c...

How to get ViewData in Script in MVC?

Hi, I want to execute a function on loading the partial view. I have my partial view as follows. I am trying to call the function from script. But I think I can not use ViewData in my script. I don;t know proper way to use viewdata in script. Is there any way to access the viewdata inside script. <%@ Control Language="C#" Inherits="Syst...

Search dir using wildcard string, return filename, and loop.

Hello all, I'm having some problems, and looking for some help. I'm trying to create a photo gallery in javascript, that will be able to 'update' it's self automatically. I need to be able to search a directory, and grab a file with a specific prefix. I need to output the followng HTML code: <li><a href="images/resize_FILENAME.ext"...

Combine hover and click functions (jQuery) ?

Can hover and click functions be combined into one, so for example: click: $('#target').click(function() { // common operation }); hover: $('#target').hover(function () { // common operation }); can they be combined into one function? Thanks! ...

Bind event to a div appearing

Can I create an event so I can execute some javascript whenever an element with a specific ID becomes visible or appears on the page? The element comes from a remote resource (so isn't in MY html code but appears on page load) and I'd like some code to run when it appears (and only if it appears, it may not appear every load). Thanks! ...

Javascript html5 database transaction problem in loops

I'm hittig my head on this and i will be glad for any help. I need to store in a database a context (a list of string ids) for another page. I open a page with a list of artworks and this page save into the database those artowrks ids. When i click on an artwork i open its webpage but i can access the database to know the context and ref...

How far did DevExpress get with Javascript refactoring?

Over a year ago, I remember watching one of DevExpress evangelists previewing or at least promoting rich Javascript refactoring (beyond just limited intellisense) within the Visual Studio shell, I recall part of CodeRush/DevExpress product line. I was excited. On checking today (lmgtfy) I can find only very very limited reference to it...

Get uri LocalPath in jquery/JS?

simple problem with a simple question. I have a string, in C# i can put it through a uri and access LocalPath How do i get LocalPath in jquery or javascript? ( LocalPath: "/asas") {http://z.com/asas?sadfdsgfg} AbsolutePath: "/asas" AbsoluteUri: "http://z.com/asas?sadfdsgfg" Authority: "z.com" DnsSafeHost: "z.com" Fragment: "" Host:...

Bug in Safari: options.length = 0; not working as expected in Safari 4

This is not a real question, but rather an answer to save some others the hassle of tracking this nasty bug down. I wasted hours finding this out. When using options.length = 0; to reset all options of a select element in safari, you can get mixed results depending on wether you have the Web Inspector open or not. If the web inspector i...

How to run setInterval() on multiple canvases simultaneously?

I have a page which has several <canvas> elements. I am passing the canvas ID and an array of data to a function which then grabs the canvas info and passes the data onto a draw() function which in turn processes the given data and draws the results onto the canvas. So far, so good. Example data arrays; $(function() { setup($("#ca...

Adding data dynamically to a html page

In a htmlpage using jquery or javascript how can the following be achieved? User types in a question in a textarea and press on enter button ,then the same question should be displayed dynamically in the page below the textarea and the user can enter as many questions. And when the user is done the page is submitted through a submit ...

regular expression for indian vehicle number in javascript and php

I need a regular expression in Javascript, as well as in PHP, for Indian vehicle NUMBER. Here is the conditions list: (x)(y)(z)(m)(a)(b)(c) 1. (x) contains only alphabets of length 2. 2. (y) may be - or single space ' '. 3. (z) contains only numbers of length 2. 4. (m) may be or , or single space ' '. 5. (a) must be one or two alph...

Rotate point in rectangle

I have a point in a rectangle that I need to rotate an arbitrary degree and find the x y of the point. How can I do this using javascript. Below the x,y would be something like 1,3 and after I pass 90 into the method it will return 3,1. |-------------| | * | | | | | |-------------| _____ | *| | ...