jquery

Very Advanced Javascript WYSIWYG editor

I need a solution where a user could enter the URL of a web page in my system. The page would load, and then the user could click a certain section that he wants to change. So basically what I need is, a way to display a web page inside my app (could possibly be done with frames but I'd prefer not to have a horizontal scroll bar), and th...

Preloading images with jQuery

I'm looking for a quick and easy way to preload images with JavaScript. I'm using jQuery if that's important. I saw this here (http://nettuts.com...): function complexLoad(config, fileNames) { for (var x = 0; x < fileNames.length; x++) { $("<img>").attr({ id: fileNames[x], src: config.imgDir + fileNames[x] + config.im...

json and how to work with it

say I have the following json object; {'fname':'john', 'lname':'Locke'} and the following text boxes <input type="text" name="txtFirstName" value="" /> <input type="text" name="txtLastName" value="" /> how do I go ahead and assign these textboxes the values in the json object with jquery? ...

Are asp.net AJAX page methods very secure?

We're currentlly thinking about secureity in our applications. Our preferred method of getting data from the back end is to use jQuery AJAX functions to directly access .aspx pages with page methods on them (without using a scriptmanager), as described brilliantly by Dave Ward here... http://encosia.com/2008/05/29/using-jquery-to-direc...

Is a DOM Text Node guaranteed to not be interpreted as HTML?

Does anyone know whether a DOM Node of type Text is guaranteed not be interpreted as HTML by the browser? More details follow. Background I'm building a simple web comment system for a friend, and I've been thinking about XSS attacks. I don't think filtering or escaping HTML tags is a very elegant solution--it's too easy to come up w...

jQuery time picker

I know there are a few plugins out there but I was wondering if anybody here had a preference for any particular one. I'm looking to fill a text input with a time that the user can choose in 15 minute intervals. ...

Calling a jQuery function with JavaScript

Dear all I am using JQuery and javascript, I need to Call the JQuery function inside my Javascript. My jQuery: function display(id){ $.ajax({ type:'POST', url: 'ajax.php', data:'id='+id , success: function(data){ $("#response").html(data);...

JQuery is waiting for images to load before executing document.ready

Update: This bug has been confirmed by at least two others. Even if you dont read my full post - if you're reading this and using JQuery 1.3.1 then stop using it if you're relying on any handlers that you want to execute when the DOM is complete but before the page's images have loaded. Update2: Thanks to Tom (user id 20!) for posting ...

Extracting list data in jQuery

Dear all I am using jQuery, I have little doubt of how to Extract list data effectively? My List having <li class="add"><a href="#">Data1</a></li> <li class="add"><a href="#">Data2</a> </li> ... My JQuery has $(".add").click(function(e){ e.preventDefault(); // Here is to get the Value of Data1 and data2 .. ...

How to check null objects in jQuery

I am using jQuery, I want to check existence of an element in my page. I have done following code, but its not working? if ($("#btext" + i) != null){ //alert($("#btext" + i).text()); $("#btext" + i).text("Branch " + i); } Please tell me what will be the right code? Thanks ...

How to find number of elements when adding and deleting elemnts dynamically using jQuery?

Hi, I'm working on a web application (with ASP.NET 2.0 (C#) and jQuery) In my application we have an interface using which our employees are able to enter records of a comany. We provided the interface with basic fields, Company Name, Contact Person, phone, etc. Now as you know some companies have thier branches, some have few (1 to 10...

Array functions in jQuery

Hi, I am using jQuery in my web-app I want to use arrays, but I am not able to find out functions for arrays (add, remove or append elements in array) in jquery, Can anyone share with me any link related to jQuery array functions which will explain the jquery array functions. Thanks ...

How to do this in jQuery

I have the following code: var tempIdx = document.getElementById('cityBuild').selectedIndex; var tempBuilding = document.getElementById('cityBuild').options[tempIdx].value; // Do stuff with tempBuilding I spent some time trying to do it in jQuery under the assumption it'd be easier, it wasn't. I tried what was given at this site but ...

In jQuery, what's the best way of formatting a number to 2 decimal places?

This is what I have right now: $("#number").val(parseFloat($("#number").val()).toFixed(2)); It looks messy to me. I don't think I'm chaining the functions correctly. Do I have to call it for each textbox, or can I create a separate function? ...

Catch exceptions in jQuery

Hello, I have the following code: <script type="text/javascript"> $(document).ready(function() { $("#Save").click(function() { $.post("url", { "data": "data" }, function(data) { alert(data); }); }); }); </script> I'm testing this script, an...

JQuery nested accordion menu problem

I have Nested Accordion menu The Logic is simple I have 2 menu 1a & 1b Onclicking 1a i will get the dataof 1a and two submenu 2a,2b Onclick of 2a ,2b i will get the data of respectively The problem,now is at a time one data should visible! In mycase after pressing 1b the 2b will not hide the data. How to do effectively...

jQuery - moving sortable item to connectWith sortable causes intermittent refresh of all sortables

Have two connected sortable lists inside a div. Need to be able to reorder items in each list, and also drag items from top list to bottom list within the same 'portlet' div (but not drag them to another div. This is working (sort of) but seems to be randomly resorting lists on drop - back to the original order (depending on browser, thi...

JQuery timeout not execute

Hi All, i'have a js client with JQuery, this js call a page (GET HTTP) and set timeout. The aim of timeout is: "do something if the server not responds". If i use Apache web server for manage a page, the timeout perform. If i use IIS 6.0 the timeout is "skipped" and the page attempt (anyway) the server response. This is the script: //c...

Select all contents of textbox when it receives focus (JavaScript or jQuery)

What is a JavaScript or jQuery solution that will select all of the contents of a textbox when the textbox receives focus? ...

Can you install Visual Studio 2008 Pro and Team System side-by-side?

Hi guys I have a couple of question for you.. Can I install on the same machine visual studio 2008 Professional and Team System ? the reason is because with Team System already installed I receive an error when I work with ajax and jquery: Error 1 Error updating JScript IntelliSense: Client-side script IntelliSense information was n...