javascript

Are there any free Ajax implementation of a HTML editor that can be used in the browser?

What I'm looking for is something similar to this ASP.net Ajax Control. However, I need a solution that uses only free technologies (e.g. PHP, Javascript). ...

What file types/extensions would you allow in for a document management application?

I am working on a kinda document management system. The end users are business class users. I currently check and allow files to be uploaded only if they are one of the followings: "png|jpe?g|gif|xls|doc|docx|csv|ppt|txt|pdf|rtf" my questions are - If I add "xml" into the list? can they cause any security issue? What other document...

a way to tell if options do not fit inside of a select - in IE

In IE6, and possibly 7, if you set the width of an to any value other then auto, if the options inside of that select are wider then the select's width, they get cut off. this is bad. Firefox is smart enough to not do this. Question: How can i tell if the options are being cut off with javascript? How have you dealt with this issue ...

Can I set global fx properties in MooTools?

Is there a way to set some default properties for MooTools effects like duration or transition? That would make it easier to make all those effects like element.tween(); or element.reveal() uniform. ...

how to use blog variable on javascript

I'm using blogger.com. I need to use data:blog.url variable on the javascript. But i don't know how to assign to any javascript variable. How to get blogspot variables on the javascript? ...

Problem using jQuery clone function in form

Those snippes of code that you will check works fine for FF, Chrome, Safari, but seems to be a problem with IE when running jQuery clone function: My template: <form method="post" action="/post/add/"> {{ form.management_form }} <div class='table'> <table class='no_error'> <input id="id_mypost_set-0-title" type="text" ...

Asynchronous JavaScript Question -- Fire an Forget

Hello, I'm trying to improve the performance of a web method in one of our applications. I have got as far as I can get running the web method in a single server, so I thought I would try to split the process so that it runs in multiple servers. At the moment, an xmlhttp request is made to pass an array (quepasatio) with all the objec...

How to parse HTML from JavaScript in Firefox?(2)

Hi, Im trying to parse a HTML result of **XmlHttpRequest** in Firefox. Im expecting to receive the HTML result from XmlHttpRequests *responseText* but when Im calling an alert(responseText) nothing is displayed. Ive followed the example from http://stackoverflow.com/questions/888875/how-to-parse-html-from-javascript-in-firefox but tha...

How can I intercept and modify markdown from the wmd markdown editor before it posts?

I'm starting a Stack Exchange site and I want to be able to intercept the question text before and after the markdown script gets at it. I want to be be able to enter [custom-tag]stuff to be altered[/custom-tag] in the question window, and then have the stuff to be altered removed (as the standard markdown engine won't be able to interp...

Interactive Javascript Bar

Hi all, I'm looking for a way to create an interactive bullet graph, which will allow the user to click anywhere in the graph and set a marker, then calculate some simple values based on where this marker is at. For example, I'd like it to look similar to this: http://www.usrecordings.com/test-lab/bullet-graph.htm Yet, allow the user...

Adding elements to the DOM using appendChild then referring back to the class that created them

How do you go around adding an element to the DOM which still knows which instance of an object created it so that it can refer back to the class later on? Basically the following code should allow you to add one or more photo albums to a page, where Javascript generates all the DOM elements needed. I.e. in the following code example i...

Combining multiple conditions into one in Javascript

How can i shorten this code? I want to return all values except "abc" or "xyz" or "pqr" return this.value != "abc" && this.value != "xyz" && this.value != "pqr"; ...

Collapsing javascript code in visual studio

I’m looking for equivalent functionality to C# regions in javascript C# syntax #region RegionName public static void MyFunction() { [mycode] } #endregion This allows me to “collapse” my code in my .js file with Visual Studio and make it a little more manageable. Anybody got any ideas? ...

What is a good approach to synchronizing JQuery Animations?

As I currently understand $("#someElement").animate() it will execute asynchronously relative to any other JavaScript statements. For instance: $("#anotherElement").css("display", "none"); $("#someElement").animate(); //Setting the CSS display may fire AFTER the animation takes place. If I am correct in my understanding of how ani...

Send an onclick to a dropdown list

Is it possible to show the list of items in a dropdown list when the user presses the up or down arrow keys, when focus is on that dropdown control? I think this would involve sending an onclick to the dropdown list using onkeydown for Keycode 38(arrow up) & 40(arrow down)? But I cannot figure out how to do this. ...

$(document).ready doesn't work in IE

Hello! In my page there is two links, register and login. The important one now is register. When I click it, it loads a .tpl file using jquery load function. In this tpl file I include a new js file with <script> ofcourse, and it works perfectly in safari, ff, opera and chrome, but of course, Why should it be working in IE? So my que...

What’s the trick to get an Element by CSS class with jQuery?

In the DOM I have several Elements which have no ID, but instead an CSS class assigned. Like this: <td class="foobar">...</td> How could I access this element easily with jQuery? ...

Is there an overview of element selection methods in jQuery?

I wonder if there's a good overview with examples that shows all the different ways of accessing html elements with jQuery. ...

AHAH loads the code from the html file, but the code in the block is not executed

I am using AHAH - http://binnyva.blogspot.com. My driver html page contains a table of two cells. The right cell contains a link: <a href="javascript:ahah('index.html','video');">test</a> Index.html: <script src="http://domain.name/flashplayer/flowplayer-3.1.4.min.js"&gt;&lt;/script&gt; <a href="http://domain.name/flashplayer/vide...

How can I get a JSON object from a SQL Server table?

I have a view that I want to be converted into JSON. What is the SQL that I can use to produce on the server the JSON string needed to be returned? ...