javascript

Creating Chart using javascript

I need to create chart using javascript. should be look like as in link below (click play to see chart sample): Please suggest me which control should i use/purchase, which allows me to create chart in such style shown in link. chart data will be in xml format and i am asp.net developer thanks ...

Tear down a closure in JavaScript

is there a way to tear down a closure in JavaScript to determine what the function is and what the scope is? Or, maybe more succinctly, is there a way to serialize a closure in JavaScript? edit What I am wondering if I am given a function declared as follows: var o = {}; var f = function() { return o; } Is there a way to look at ju...

How does the back button work on beautyoftheweb.com?

I've been looking for some javascript hooks for the back button in the browser. But they only seem to support back/forward between hashed url's. That is, you can only navigate from www.mysite.com#page1 and www.mysite.com#page2, if you click back, and the url becomes something without a hash, they all fail. Like this one: http://www.asual...

Redirect is not working in IE.

Hi, I have built a cakephp app that needs the user to login or register(for new users), when he tries to download the file. And I use to javascript to redirect users to login page, and once they login I want users directed back to the download page they were on. I am using $this->redirect($this->referer()); works fine in chrome and...

How do I add another sibling element in e4x?

If I want to create: <foo> <bar>example1</bar> <bar>example2</bar> </foo> using e4x, and I already have: foo.bar = <bar>example1</bar> How do I add the additional bar tag? ...

detecting keydown event with jquery in asp.net

Hi, In my project there is a button search which seems to be the default button to trigger when enter key has been pressed. How can i detect a keydown event with jquery for a login button? Its an asp.net project. ...

After I've validated if some $_POST variables are correct, I want my window to close. How do I do this with JQuery?

<?php if($_POST["some_variable"]){ echo "this window should be closing now"; } ?> How would I call the JQuery code to close the window, and what would the function be? The window was opened with a code resembling the following... $('.new_window').each(function(){ $(this).click(function(){ var center ...

setting a proxy into a link or address?

if you use a html web page localy for work and need to proxy only one web page is it possable in the address bar or link line to set the proxy, or by calling the autoproxyscriptd in the html prior inthe link ? if so how? ...

Javascript reference by value/by reference problem

I'm creating a jQuery plugin to do paging and encountered the following problem. When I click on a page link created by the plugin below, it will always give we the value of the last index passed into the value i at the last iterator of the code below. If there are 4 pages, I will always get 4 if I press link 1, 2, 3 or 4. It seems that...

I am able to draw the box but I am not able to remove it! (Canvas)

Hi, I have asked this question before and it seemed that the code I was using was pretty confusing. So this is a virtually dumed down version of the same code. I draw a square on the canvas using the add function. Like wise I should be able to remove the item from the canvas using the remove function! Alas it doesn't seem to happen so....

Prototype JS, help detecting form elementm change

Hi, I am not family familiar with prototype but have been tasked to make some changes to a color picker. I have made the majority of the changes without too much issue. What I need to do though is listen for the forms input. Can anyone advise on how this is done? I found this but I don't understand how to implement it: http://api.pro...

make serverside strings safe for use in clientside scripts

i need to show the server exception in client browser, but it seems there are some illegal characters inside the exp.Message which makes the client script to raise "unterminated string literal" error. any idea to make strings such as exp.Message safe for client scripts? catch (Exception exp) { string __script = string.Form...

Using Javascript to display weights

I have a javascript function that changes a user preference, if they want weights to be metric or in imperial. On my page I print out the weight, IE: This is some description: This product weights <b>200 KG</b> Blah blah I need to make it so that Javascript changes the weight measurement for all weights on the page, and am not sure...

How to disable the hyperlinks in a div

How can I disable all hyperlinks in a div element? I don't want any active links in my div(editable). Please help me. Thanks in advance ...

Javascript OOP best practices?

I'm sick of seeing dozens of different ways of doing object oriented programming in Javascript. Can anyone just tell me which technique I should use considering I want to work on a large scale project and I want my code to be future proof? ...

How to capture mouse click with javascript when the mouse has moved between mousedown and mouseup

Hi, I am building a website with a scrolling javascript time line, using code from this tutorial. There is a demo to go with the tutorial here. My problem is as follows: if the user clicks on the timeline to drag it, and they happen to click on a link, then when the mouse button is released, the browser interprets that as a click on ...

Jquery Error: $("[data-weight]") is null

Stripped a ton of stuff to make it more readable, it throws an error on the line: $('[data-weight]').each(function() { Saying that it is null <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" > <head id="ctl00_mainHead"> ...

What is "info_dialog" Method in Visual Studio 2010 Javascript AutoComplete?

When editing javascript in VS2010, the dropdown autocomplete list shows a method called info_dialog - i dont have this method in any of my javascript and cant seem to find out where it comes from or what it does? Does anyone know? Thanks a lot! ...

Execute bumpbox from flash?

I have searched alot on google with no luck. I want a flv film to play in a bumpbox window when a button is pushed in a flash banner. Does anybody know how? I tried looking for some support on artvipers own site but no luck either. Artviper - bumpbox (This is my first post, so please be gentle :)) ...

How to get feedback from customer?

HI, Anyone provide me the best way to get the feedback from user and I decided the to get feedback when the user closes the browser by using onbeforeunload event which is considered to be unethical. Please anyone provide me suggestion? ...