javascript

Download a file using Javascript

There's this Excel file I want users to be able to download from my server. There must be an easy way to initiate the download of the file after a click on the "Download" button... but I have no clue how to make that happen. I have this so far: (VBscript and ASP) <head> <script type="text/javascript" src="overzicht.js"></script> </hea...

how to check status of checkboxes in gridview columns on click of button

Hi,I have used checkbox column in gridview. I want to check status of that checkboxes. On click of a button it should be checked that if any checkbox is checked or not. If none checkbox is checked then it should display alert message that check checkbox first. I need it urgently. Can anyone help me please? Thanks in advance. ...

Javascript AJAX function not loading

Hello, I had a realtivley simple ajax application, which I have broken up to be more modular. The code is at the link below, and what I have mainly done is add the GetRecordSet function and allowed fetchcompelte to take a variable for which layer to put data in. It should work fine in thery. When I put alert()s in, the code seems to exe...

how to display xml in javascript?

As the question says, it just escaped my memory how to display xml in javascript, I want to display some source xml within an div on a page, that sits next to the processed result of the xml in another div. Can't remember if there was an equivalent to javascript's escape to convert entities on the client Note: the xml files are served...

detecting true border, padding and margin from Javascript

Is there a way to detect the true border, padding and margin of elements from Javascript code? If you look at the following code: <html> <head> <style> <!-- .some_class { padding-left: 2px; border: 2px solid green; } --> </style> <script> <!-- function showDetails() { ...

How can I add column resizing to a MooTools sortable table?

I want a table similar to this one, but where the user can adjust the height of the table as well as sort it. How can I do this? ...

javascript function not working

i have the following javascript code: http://www.nomorepasting.com/getpaste.php?pasteid=22561 in which the function makewindows does not seem to be working. it does actuall create a window, however the html either contains what is quotes, or if I change it to child1.document.write(json_encode($row2["ARTICLE_DESC"])); creats a blank...

json_encode and mysql unicode problem

i have the following javascript code: http://www.nomorepasting.com/getpaste.php?pasteid=22561 Which works fine(the makewindows function has been changed to show it is a php variable), however the html contains unicode characters, and will only be assigned characters leading up to the first unicode character. If I make a small test file...

javascript style.width not working in firefox with transitional doctype

I have a script that animates a small DIV popping up on the page. It all works fine in IE, and in FF if I remove the DOCTYPE, but when the DOCTYPE is XHTML/Transitional, in Firefox, the width does not change. this.container.style.visibility = "visible"; alert("this.container.style.width before = " + this.container.style.width) this.con...

Using XTemplate with SimpleStore in Ext

I am currently adding some functionality to some old code. There used to be a template which took a flat array of items and spat out some HTML, now the data is coming from a simple store which reads some JSON.. var allwords = [ ['abacteriano', 'abacteriano'], ['abacterial', 'abacteriano'], ['abciximab', 'abciximab'], etc.. ...

Strange caching of .js file in firefox/tomcat/eclipse

I'm developing .jsp using eclipse and tomcat. My .jsp outputs html to pull in some javascript from a .js file. The jsp outputs the code which hooks up the function mapTool to the mousedown event. imfMapFunctions5101.js contains the mapTool(e) function. The changes I make to the .js file do not take affect when I run in firefox, alt...

Locating an element in a 'Facebox' box.

Heres my link: http://tinyurl.com/6j727e If you click on the link in test.php, it opens in a modal box which is using the jquery 'facebox' script. I'm trying to act upon a click event in this box, and if you view source of test.php you'll see where I'm trying to loacte the link within the modal box. $('#facebox .hero-link').click(al...

How do I get jQuery to select elements with a . (period) in their ID?

Given the following classes and controller action method: public School { public Int32 ID { get; set; } publig String Name { get; set; } public Address Address { get; set; } } public class Address { public string Street1 { get; set; } public string City { get; set; } public String ZipCode { get; set; } public String State...

How to know if a page is currently being read by the user with Javascript?

I'm making a webpage with dynamic content that enters the view with AJAX polling. The page JS occasionally downloads updated information and renders it on the page while the user is reading other information. This sort of thing is costly to bandwidth and processing time. I would like to have the polling pause when the page is not bein...

How to disable mouseout events triggered by child elements?

Let me describe the problem in details: I want to show an absolute positioned div when hovering over an element. That's really simple with jQuery and works just fine. But when the mouse goes over one of the child elements, it triggers the mouseout event of the containing div. How do I keep javascript from triggering the mouseout event o...

TinyMCE - Pasting from word

I'm trying to configure TinyMCE so that it accepts pasting from Microsoft Word and cleans it up in an expected HTML hierarchy. Most of our editorial staff use a single line break to denote a line break and a double return to indicate a paragraph. However, MS Word's output puts the next line in a separate paragraph (unless you shift-ent...

Best source code formatter for Javascript?

I've been digging through Stack Overflow as well as a number of Google searches, and I cannot find a satisfactory code formatter for Javascript. I have found several related tools, such as syntax highlighters and pretty-printers, but I am looking for a tool that I can ideally create a wrapper for in Eclipse and simply run from the menu ...

jQuery: Creating a circular slider

You may have seen Javascript sliders before: http://dev.jquery.com/view/tags/ui/1.5b2/demos/ui.slider.html What I'm envisioning is a circular slider. It would consist of a draggable button at one point on the circle -- and that button can be dragged anywhere along the ring. The value depends on what position the button is at (think of ...

Newbie Javascript : appending to array

OK. How do I append to an array in Javascript? Update : actually a.push(b) does work. Realize that my previous problem was b not having a value. Ok, I answered myself, but might as well leave this here on SO to help other newbies. ...

Dynamically creating keys in javascript associative array.

Simple, quick, question. How can I create dynamically create keys in javascript associative arrays? All the doc I've found so far is to update keys that are already created: arr['key'] = val; I have a string like this " name = oscar " And I want to endup with something like this: { name: 'whatever' } That is I split the string...