javascript

Is there a working md5 plugin or equivalent encryption plugin for jQuery 1.3.2?

I'm storing my passwords on a server, and, using nothing but HTML/JavaScript, I need to be able to take an input password, compute the hash, then compare against what's in my database via Ajax. As I'm using CouchDB, there's actually no server code, which is where I'd normally do such a calculation. Any kind of one way encryption woul...

.NET Libraries to work with JSON

Hi, We are currently writing our ASP.NET pages using c# and .NET 2.0 framework and we are about 4 months out from upgrading to .NET 3.5 framework. Meanwhile we have a very client-side JS heavy page to push out in 2 months. We are currently looking at JayRock to handle our client-to-server service methods invoking with JSON data. One of...

Evaluate in Jquery

Just wondering if its possible to convert the following to an IF statement in Javascript: $('.Nav table tr:has(table.navheader) + tr:has(table.navitem)').addClass('linksbelow'); Example: IF $('.Nav table tr:has(table.navheader) + tr:has(table.navitem)').addClass('linksbelow'); = **TRUE** ( $('.Nav table .navheader').addClass('linksbe...

Format <textarea>

function text_window() { var xmlDoc; if (window.XMLHttpRequest) { xmlDoc=new window.XMLHttpRequest(); xmlDoc.open("GET","cd_catalog.xml",false); xmlDoc.send(""); xmlDoc=xmlDoc.responseXML; } // IE 5 and IE 6 else if (ActiveXObject("Microsoft.XMLDOM")) { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async=false; ...

can the name of a input tag be changed with javascript ?

I want to know if its possible to change the name of the input tag with javascript or jquery, for example in this code : <input type="radio" name="some_name" value=""> I want to change the some_name value when user select this radio button. the reason what i want to do this is described here : http://stackoverflow.com/questions/13247...

Is $(document).ready() also CSS ready?

I've got a script executing on $(document).ready() that's supposed to vertically align block element in my layout. 90% of the time, it works without issue. However, for that extra 10% one of two things happens: There's an obvious lag in the time it takes to do the centering, and the block elements jump into position. This could simply ...

javascript WTF, phantom function call

I'm trying to have 'help' tooltips which appear when you click on labels of certain class, and go away when you click away. Nothing appears. I can set breakpoints in firebug and see the 'loading' tooltip, and then when the ajax returns the tooltip updates correctly, then removeTooltip gets called phantomly (stack trace just says F() F(...

Can javascript listen for "onDomChange" on every Dom elements?

My question is somewhat weird, but can i add events for any DOM elements(div), like 'onHtmlChange', to be notified when that div has changed their content? ...

How might I calculate the sum of radio button values using jQuery?

I am trying to create a form with many groups containing many radio buttons. When the user selects a button, I would like to calculate the sum of each selected radio button value and show this sum to the user. I have found a plugin for jQuery which will do the calculation, this plugin use the name attribute of the buttons to calculate. ...

Should I use template or return full code in jquery AJAX?

I am currently working on a project that lets users post comments with jquery and ajax. So far it is using Json and retunring several items, username, comment text, user photo url, comment ID number and stuff like that, I then need to use some sort of template to make all this data go into the correct div's before adding it all to the s...

Accessing a frame within a frame

Ok, here is the situation. I have a site that I subscribe to that lets you add your own code, etc. They have a forum editor that I am unable to skin to match my site, so I'd like to just change the colors of the inner most frame (doc3 in the example below). Here is the basic setup... yes, all documents are from within the same domain bu...

Automatic jQuery Carousel triggering a FancyBox

Hello, I'm a web designer working on a project. I have an idea that would require jQuery. Since my experience with jQuery is fairly basic, I thought I would ask here what might be the best option for what I need. I have a section on the home page of the project. I would like to have a "wall" of images that would be equally spaced. When ...

Calling javascript after dom is finished

We use an outside system to serve ads on our site. Currently in our header files, we have some js which uses jquery to insert the data to our ad holder which is a div that appears on every page, i.e. $("#adSpot").prepend('put my ad here'); Our third party ad system just started using Google Ad Server another system to serve ads so no...

Unobtrusive JavaScript - Safe Attributes?

I'm working on separating JavaScript code from my HTML. I currently have code that looks like this: <div onclick="return do_something_with('100566');" class="clickable">Click Me!</div> I'd like to swap the onclick to an attribute containing just the parameter I'm passing to the method. I'm using jQuery for this with the following ty...

How can I tell if an element is being dragged using jQuery?

How can I check if an element is being hovered over and/or clicked on and/or dragged? I need this info so I can stop infinite loops for the duration of the drag. ...

Is there such a thing as too many $(document).ready handlers (IE)?

My dev environment is LAMP-based (Drupal); there are several JS (jQuery) files that are served up to provide various bits of functionality. Until recently, things worked fine (well, IE6 was hideous but at least it worked). However, recently, one of my JS files has started to refuse to execute at all in IE6 and IE7. If the file contain...

Profiling jQuery, how do I make my app more snappy?

I have some calls to jQuery functions like 14,000 times... what the hell? I don't have that many functions, really just simple stuff like appending and removing DOM elements, why do some of my event handlers call functions so many times? Plus to compound my issues, Firebug's profiler just show's the min'd functions names... and even whe...

SharePoint TextField ClientID changes?

I'm trying to use some javascript on a page layout, and I'm encountering a strange issue where the ClientID of a Sharepoint.WebControls.TextField seems to change between OnLoad and the page being displayed. In the OnLoad event, TextField3.ClientID resolves to "ctl00_PlaceHolderMain_TextField3", but if look to see why my js doesn't work,...

why doesn't this jQuery code work in IE?

The following code is used so when clicking 'enter' when focused in an input field within a form, it disables the standard submit button functionality. Rather the javascript builds a new form and sends a post request to another page. I am using this so that I can achieve a "form within a form" functionality. The input field has its ow...

Dynamic including javascript with jquery

Hello people! I'm facing a problem using IE here. I need to insert a form on distinct web pages in distinct servers and domains. I'm doing this through a javascript include like this: <script type="text/javascript" src="http://www.sisgol.com.br/teste/write_js.php?content=form_content"&gt;&lt;/script&gt; <div id="form_hypescience"> </div...