javascript

Compiling Javascript with Netbeans

I have experience using Netbeans with Java but am new to using it with Javascript. I know how to open javascript files within a Java Project but is there a way to open javascript in a "javascript project" where I might be able to "compile" the code and see possible errors. Is this possible or am I asking too much? ...

Get each Attribute of element in loop function

I have a HTML DIV element: <div class="obj" height="this is attr 1" rel="this is att2" width="this is att3"></div> I've a new Variable: attArray: var attArray = new Array(); I want to get step by step each att in div.obj into attArray. How do I do it? attArray[0] = "this is attr1" attArray[1] = "this is attr2" attArray[2] = "this ...

How to call a JavaScript function multiple times in a loop on page reload with ASP.NET

Hi, I'm using the local database functionality in Chrome and Safari and what I do when I want to save this to a remote database is to create a hidden textfield and then using JSON to stringify each row. In the code behind I then parse each JSON object and insert it into the list. What I want to do now is to delete these rows from the loc...

How to delete a client side file using PHP?

I have a PHP app and I need to delete a client-side file. How can I achieve that? I'm new to PHP. Hope someone can help me. Thanks. ...

'this' is undefined in JavaScript class methods

I'm new to JavaScript. New as far as all I've really done with it is tweaked existing code and wrote small bits of jQuery. Now I'm attempting to write a "class" with attributes and methods, but I'm having trouble with the methods. My code: function Request(destination, stay_open) { this.state = "ready"; this.xhr = null; th...

JavaScript error - Message: Expected ':'

Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C) Timestamp: Fri, 22 Oct 2010 15:34:50 UTC Message: Expected ':' Line: 1 Char: 255 Code: 0 What could be the possible ca...

Solution for optimizing web menu bar

I'm working with a product that has a web-based interface. The functionality is huge and is divided into modules. Access to each module is via a drop down menu available on all pages. Each menu item has at least 2 levels of drill downs (vertically) Problem: Too many top level menu items Solution 1: Group Elements (Logically) so that ...

Microsoft Office Word in a web browser

I want to have a Microsoft office word inside a web browser so that i can get the control to format the text and specify proper indentation. I don't want a client side to save the document. It should be the same as http://www.asp.net/ajax/ajaxcontroltoolkit/samples/htmleditor/htmleditor.aspx but i want an additonal component i.e RULER to...

jquery: get selected checkboxes, put in array, delimit the array and output to dynamic html button

Hi, I want to have a web button that is generated dynamically depending on which checkboxes a user selects, without needing to reload the page. I guess jQuery is the way to do this but I am a complete noob with jQuery/JavaScript (trying to learn on the fly, which isn't easy). Ultimately, I think it s/b a 2-step process: (1) as the user...

Logarithmic bar chart using Protovis

var vis = new pv.Panel().canvas('grphLangSpeakers').height(langCount*(barWidth+barGap)).width(canvasWidth) .add(pv.Bar) .data(popCountArray) .bottom(0).width(function(d){ return d}) .height(barWidth) .top(function() {return this.index * (barGap+barWidth)}); vis.render(); I'm using above code to generate a Bar Chart...

How to bring the selected div on top of all other div's

Hi, I have a bunch of divs on the screen. What I want to do is, when I select any div, I want its zIndex to be always higher than all other divs. In my application, i will need to do this repeatedly whenever I select a div, put it on top of others. Is this possible using Javascript? ...

jquery: this.not (':animated') && that.is (':visible') not following the rules, syntax problem? only few lines of code.

when i click on #button, it's stilling doing the 'do something', even though .wrapper is animating and .wrapper span is not visible. so it's not following the rules. what's wrong? $('#button').click(function(){ if( $('.wrapper').not(':animated') && $('.wrapper span').is(':visible') ) { //do something } }) ...

Page refreshes automatically onClick

hello i have a webpage that refreshes automatically when user clicks the "Calculate button" which calls a javascript function. There is a onLoad event in the body tag. I also use a bit of jquery. http://gist.github.com/644498 ...

Django - Replicating the admin list_display

What's the easiest method to get list_display functionality in my main website (outside of the admin pages). I have a group of elements I'd like to select and perform an action. Any ideas? ...

document.getElementById('dvFile').innerHTML += txt;

document.getElementById('dvFile').innerHTML += txt; is not working internet explorer 7 ...

Custom validator error text through javascript ?

I want to set ASP.net custom validator error parameter text through client side javascript. How can access it via sender, args parameters in my function? ...

Dynamic css on a parent window in Internet Explorer

Hello, I like to add a dynamic css file to a Parent window. I build this code for it: function LoadJSCSSFile(filePath,fileType,parentBOO){ //- var fileRef; // Get the file reference //- //Set external JavaScript/CSS file switch(fileType){ case "js": fileRef = document.createElement('s...

Internet Explorer empty div link

I want to make an empty div react to click. HTML <div id="closeButton"></div> CSS #closeButton { height:100px; position:absolute; right:0; top:0; width:100px; z-index:1000; border:1px solid blue; } Javascript $('#closeButton').click(function() { alert("yo"); }); This works perfectly in Firefox, but not in Internet Explore...

How to find Dynamic control in Java Script created using asp.net

Hi all , I have created dynamic controls in ASP.NET as following .. first i have created checkbox as CheckBox chkDynamic = new CheckBox(); Then TextBox txtDynamic = new TextBox(); txtDynamic.ID = "txtDynamic"; and these controls added in tablecell added in tableRow added in Table added in aspPanel(Only panel created at design pag...

jQuery function is fired twice in IE...?

I have a function that fires when the scroll bar hits the bottom. For some reason now, IE is firing the event twice. It wasn't doing it before. I don't have a duplicate function, and not have the JS declared twice. It's fine in Opera, FF, Chrome. I don't know why it's doing so in IE. Oh how I hate M$ and this troublesome browser. jQuer...