jquery

Accessing created DOM elements

Hi, I have code to create another "row" (div with inputs) on a button click. I am creating new input elements and everything works fine, however, I can't find a way to access these new elements. Example: I have element <input type='text' id='name_1' name="name_1" /> I then create element <input type='text' id='name_2' name="name_2" /...

jQuery JSONP problem in IE6

I've encountered a problem when retrieving a JSONP response from a server in a different domain using IE6. When I make the same AJAX call using JSONP to a server in the same domain as the web page, all goes well in all browsers (including IE6). However, when I make calls between domains (XSS) using JSONP, Internet Explorer 6 locks up. ...

Passing in parameter from html element with jQuery.

I'm working with jQuery for the first time and need some help. I have html that looks like the following: <div id='comment-8' class='comment'> <p>Blah blah</p> <div class='tools'></div> </div> <div id='comment-9' class='comment'> <p>Blah blah something else</p> <div class='tools'></div> </div> I'm trying to use jQuery...

JQuery TypeWatch Functionality in Delphi

TypeWatch is a JQuery plugin that monitors the time between key strokes in a text input box. It allows for features like refreshing of search results as a user types their search terms, as demonstrated in the 'Users' page in Stack Overflow. If you are typing in the name of a user you wish to seach for and pause typing for half a se...

jQuery - running a function on a new image

I'm a jQuery novice, so the answer to this may be quite simple: I have an image, and I would like to do several things with it. When a user clicks on a 'Zoom' icon, I'm running the 'imagetool' plugin (http://code.google.com/p/jquery-imagetool/) to load a larger version of the image. The plugin creates a new div around the image and allo...

How can I get jQuery to perform a synchronous, rather than asynchronous, AJAX request?

Hello. I have a javascript widget witch provides standard extension points. One of them is the beforecreate function. It should return false to prevent an item from being created. I've added an AJAX call into this function using jQuery: beforecreate: function(node,targetNode,type,to) { jQuery.get('http://example.com/catalog/create/'...

jQuery & Prototype Conflict

Hi, I am using the jQuery AutoComplete plugin in an html page where I also have an accordion menu which uses prototype. They both work perfectly separately but when I tried to implement both components in a single page I get an error that I have not been able to understand. uncaught exception: [Exception... "Component returned failure...

Comet and jQuery

I've done some research into server push with javascript and have found the general consensus to be that what I'm looking for lies in the "Comet" design pattern. Are there any good implementations of this pattern built on top of jQuery? If not, are there any good implementations of this pattern at all? And regardless of the answer to tho...

In jQuery Form, 'success' is being called before 'beforeSubmit' is finished

I'm using the jQuery Form plugin to upload an image. I've assigned a fade animation to happen the beforeSubmit callback, but as I'm running locally, it doesn't have time to finish before the success function is called. I am using a callback function in my fade(); call to make sure that one fade completes, before the next one begins, bu...

Can JQuery.Validate plugin prevent submission of an Ajax form

I am using the JQuery form plugin (http://malsup.com/jquery/form/) to handle the ajax submission of a form. I also have JQuery.Validate (http://docs.jquery.com/Plugins/Validation) plugged in for my client side validation. What I am seeing is that the validation fails when I expect it to however it does not stop the form from submitting....

PHP: close a connection early

I'm attempting to do an AJAX call (via JQuery) that will initiate a fairly long process. I'd like the script to simply send a response indicating that the process has started, but JQuery won't return the response until the PHP script is done running. I've tried this with a "close" header (below), and also with output buffering; neither ...

How would I raise an event (jQuery or standalone Javascript) when a popup window is closed?

I want to raise an event when a popup window is closed, or preferably, just before closing. I'm storing the popup window object as an object, but I don't know of any way to bind to the close event, or an event just before the window is closed. var popupWindow = window.open("/popup.aspx", "popupWindow", "height=550,width=780"); Is ther...

jQuery override form submit not working when submit called by javascript on a element

I've got a page with a normal form with a submit button and some jQuery which binds to the form submit event and overrides it with e.preventDefault() and runs an AJAX command. This works fine when the submit button is clicked but when a link with onclick='document.formName.submit();' is clicked, the event is not caught by the AJAX form s...

How do I inject a form value with jQuery?

I am working with jQuery Form and ASP.NET MVC. Preview 5 of ASP.NET MVC has an Extension Method on HttpRequest called "IsAjaxMvcRequest" that detects if the POST was an Ajax request. This Extension Method basically "sniffs" for a form value called "__MVCASYNCPOST" and (basically) returns true if it sees this element. What I want to do i...

jQuery jWYSIWYG inside jquery.ui.tab

So I managed to get a page with Ajax ui.tab and in one of the tab I put jWYSIWYG textarea plugin. Unfortunately, I can only see normal textarea. However, accessing the page directly (ie. not using the ajax tab) works. What happened? p/s: I'm new to jQuery / JavaScript / AJAX / CSS (if that even matter) ...

ASP.NET MVC and...YUI? jQuery? Other

After the last project I've done using WebForms, I've decided to pass on using that framework in the future. It's great for getting your basic features out there...not so great when you have more complex UI logic. I'm looking at ASP.NET MVC, and like what I see so far. Of course the issue is that you lose the server side controls when y...

jQuery get textarea text

Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were able to make a 'console' on my webpage (as in, you press the ` key like you do in FPS games etc), and then have it ajax itself back to the ser...

Change the value of a text box to its current order in a sortable tab

Edit: I have solved this by myself. See my answer below I have set up a nice sortable table with jQuery and it is quite nice. But now i want to extend it. Each table row has a text box, and i want i am after is to, every time a row is dropped, the text boxes update to reflect the order of the text boxes. E.g. The text box up the top a...

jQuery - Triggering Events from Clicking on a Link Issue

I'd like to trigger an event when a link is clicked both by clicking on it normally or by opening it in a new tab (e.g., middle click, ctrl + click, etc) I've tried the following so far: $('a').click(myfunc) Doesn't capture middle clicks. $('a').mousedown(myfunc) works, but it seems to be preventing the link from being followed even ...

Is Silverlight the 'same' as jQuery?

Could Silverlight be used for the same things as jQuery, or are they intended for different things? For example, vb.net could be used for the same stuff as C# while C# is intended for different things than what JavaScript is. Is Silverlight and jQuery like vb.net and C#, or more like C# and JavaScript? ...