javascript

Is there a way to add filter transitions to an Image control

I am trying to create a slideshow using Javascript and an asp.net image control. I am unable to add filter property to the image control. Any suggestions ? or is it possible to set the filter in javascript? ex: I want to be able to add style="filter:revealTrans(duration=2,transition=23)" to the image in "" control. Thanks ...

Is there a way to get the offset of the selected text within an input box in IE?

In Firefox, you can simply call: myInputTextField.selectionStart or myInputTextField.selectionEnd to get the first and last indices of the selected text in the input box. In IE, I know that you can call document.selection.createRange() to fiddle with the selection a little bit. For the life of me, however, I have not found any value ...

WYSIWYG rich text editor that supports diffs?

My web application is similar to StackOverflow in that different users frequently edit the same blob of text. Currently we only support plain text, and therefore it's easy to show users how the text has changed between edits. I want to support rich text in these fields, but my users are non-technical and therefore markup of any kind is...

WebForm_SaveScrollPositionSubmit is undefined - ASP.NET

I'm upgrading an ASP.NET 1.1 app and have things working but am seeing the Javascript error referenced in the title. From research it appears that ASP.NET is not spitting out the javascript that is used to maintain scroll position between postbacks. I did some googling and have checked the various issues mentioned but can't seem to fin...

robust, mature, extensible (JavaScript) datagrid?

Hello, I'm looking for a nice client-side way of presenting data for a web application that will mostly consist of datagrids. It doesn't have to be JavaScript, but it seems to be the most logical choice, because I like JavaScript. Also, I am not considering Flex. So far I came up with the following (JS only): Ingrid jqGrid ExtJS gri...

JavaScript external file does not show variables

Well I am pretty new at javascript. Problem is when I write stuff , for example a variable or array in an external js file, and embed it with , VStudio 2008 intellisense does not show any of the variables ... is it because I cannot access to variables in one script tag from another? if so How do I use jQuery like stuff? .. I defined an ...

Problem with jquery :not selector

Hello, I'm having an issue trying to NOT select a tablerow with the function: $("tr").click(function(e) { var row = jQuery(this) //rest of code left off }); Basically it finds all tablerows and adds click functionality that will open a edit modal that has a row with textboxes that are populated with info from the tablecells. The pr...

best practices for <embed> javascript code

Hi all, I'm starting a project where I need to display my wife's picture books on her blog. I've got the books' data on a database - couchdb - and I want to write a player she can easily embed in her blog. I've got most of the player written in Html, JavaScript & jQuery. Next, I need to write the html and javascript code to encapsulat...

What is a practical maximum length for HTML id?

The HTML spec says ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). And even though the SGML declaration of HTML 4 uses the value 65536 for NAMELEN, it notes "Avoid fixed limits." But surely browsers, ...

Click on a div to toggle a checkbox inside of it using javascript

Hi. This seems to be a simple problem, but I dont use alot of javascript. I have a div, with a checkbox in it, and would like the whole div to toggle the checkbox. This is what I have so far: <div style="padding: 2em; border: 1px solid" onClick="if (document.getElementById('cb').checked) document.getElementById('cb').checked=false...

How bad is it to put javascript outside of the header?

The question pretty much already says everything. I'm starting to add some features to my weekend project. It's a small app for me and a couple of friends, as we're exchange students it's kinda useful for us. But the thing is the following, I'm doing this in php and structuring everything with includes so i can get the code separated. ...

How to push diffs of data (possibly JSON) to a server?

I am going to be periodically pushing a set of text-based data from a web-page to a server, probably as JSON. For every push, none, some or all of the data may have changed. To reduce the amount of data I have to send over the wire I would want to only send a diff of the changes in each push. Do you know of any pre-made solutions / too...

How do I make an HTML element repaint within a Javascript loop?

I have some Javascript which "animates" a colour change on an HTML element, as follows: var element = document.getElementById("someid"); while (i < 255) { element.style.color = 'rgb(' + i + ',' + i + ',' + i + ')'; i++; slowMeDown(); // This function runs for a few ms to slow the process down } As you can see, this changes...

Is it possible to have jQuery.click trigger on the top element only?

I'm trying to make a site where the user can click on any element to edit it's css. I use the following to add the click function to all lis, divs and uls. $('li,div,ul').click(function () { alert(this.id); }); The problem is if I click on an li element, then I get the alert for that, and any element underneath it. (all the conta...

insert html using javascript

i am trying to insert a chuck of html into a div. i want to see if plain javascript way is faster than using jquery. unfortunately, i forgot how to do it the 'old' way :P var test2 = function(){ var cb = function(html){ var t1 = document.getElementById("test2"); var d = document.createElement("div"); d.id ="o...

Fast Loading web pages

We are planning to develop a new website. Our goal is to load web pages quickly. What are all the techniques we need to follow. Can anyone give me good suggestions, forums links or articles. Our platform is PHP, MySQL, Javascript, and AJAX. ...

Javascript: better way to add dynamic methods?

I'm wondering if there's a better way to add dynamic methods to an existing object. Basically, I am trying to assemble new methods dynamically and then append them to an existing function. This demo code works. builder = function(fn, methods){ //method builder for(p in methods){ method = 'fn.' + p + '=' + methods[p]; eval(method...

How do I scroll the text on my div with limited height?

Hi guys, So I have blocks of paragraphs that doesnt fit on my page, my solution is to have a scrolling method so when the user hovers on the down arrow, it will scroll down the paragraph and reveal more text. So I attached an image of my project, as you can see I have scroll down and scroll up buttons. Here's the HTML file of my pro...

Is there a plugin or extension that allows to use DWR remote calls as a YUI Data Source?

Is there a plugin or extension that allows to use DWR remote calls as a YUI Data Source? ...

problem with form submit

hi , i have a form that works perfectly fine with mozilla and IE but on google chrome there is a slight problem i am using ajax to submit my form that is there is no submit button ,in IE and Mozilla its working fine but in google chrome when i press enter the form submits and the page redirects to the main page( this is another problem ...