jquery

help needed retrieving json data with jquery

There is not a single clear example that explains how to pull json data as simple as possible. I have a valid json and I need to retrieve it with jquery my json output is as: { "title": "blog entries", "items" : [ { "title": "Can Members of the Diaspora Work Effectively at th", "date": "8/4/2009 ...

jQuery Bind event firing the event

I'm calling the first function below to bind the second function to the onClick event. The strange thing is that calling the first function results in firing the second function. The LinkName parameter in the first function is a name of a table td element - probably not relevant. function EnableExpand(LinkName, i) { $(LinkName).ad...

Having trouble using jquery and firebug

I'm trying to use the jquery csv plugin to load a csv file into an array. However, firebug is not very happy with it. Firebug keeps saying "not well-formed" when processing the csv file. The csv file looks like this: "PC0003","Windows XP Professional","2006/01/05" "PC0002","Windows XP Professional","2006/01/10" "PC0001","Windows XP Pr...

Country/State Dynamic Drop Down List

If you go to http://profile.microsoft.com and edit your personal information, you will select your country. When a country is selected the city and/or state information changes based on what is expected for that country. Does anyone have any examples on how to accomplish this? Is there any service (free service) that provides this inform...

Remove DOM Element Error

Using this code, I need to remove the generated new element. It is not working. No JS errors are appearing in firebug. $('.popular-list li a').live("click",function() //this will apply to all anchor tags { var stuff = $(this).text(); var hasDuplicate = false; $('#f...

Retrieving index of Jquery Tabs

Hello I am trying to get index of current selected tab. Alert(ui.index) returns "undefined". Any idea why? thanks <script> $(document).ready(function(){ var $tabs = $("#apttabs > ul").tabs(); $tabs.bind('tabsselect', function(event, ui) { alert(ui.index); }); }); </script> <div id="apttabs"> <ul> <li><a href=...

jQuery/PHP and multilingual confirm/alert boxes

Just when I was about to post this question, I came up with an easy solution kind-of-a solution. The problem was that I needed confirmation messages in multiple languages, depending on the selected language by the user. Since I always grab certain information from the HTML, I was trying to do it that way, but got stuck around this point...

Running a function on multiple elements using Jquery

Hey, I've got some code that I'd like to run on every single checkbox on my page within a table, but I'm not sure of the best way to do this? I've tried something like this but it didn't work :( $(document).ready(function() { function whatever (elem) { var $elem = elem; $elem.val('test'); } $('table tr td :check...

Question about jQuery performance and DOM: why is one method faster than the other?

I was looking at some jQuery performance tips and ran across this one that caught my interest. Check out the following page snippet: <html> <head> </head> <body> <select id ="myList"> </select> <div id ="myList2"> </div> <script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/...

How to add some custom CSS for the last child only if visible with Jquery?

Hi Guys, I am allowing users to make parts of a list hidden/visible etc. Now here is my list: Basic list, but the very end list item has some custom CSS "border-bottom: none" - just to make it a bit more nicer looking. <ul> <li class="item">Item</li> <li class="widget">widget</li> <li class="item">Item</li> <...

$.extend documentation clarification

Following jQuery does not change the value of defaults or options. The returned value is same as empty. empty has been changed and populated with merged data. All is good. var empty = {} var defaults = { validate: false, limit: 5, name: "foo" }; var options = { validate: true, name: "bar" }; $.extend(empty, defaults, options); Howe...

IE6 jquery unable to update select tag options w/ .append

<html> <head> <title></title> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script language="JavaScript" type="text/javascript"> function getcsa(){ $.get("getcsas.php",{},function(xml){ $(xml).find('csa').each(function(){ var csa = $(this); var vzid = $(csa).find('vzid').text(); var fir...

jquery - pass text on the page into a dialog

i want to have a link and have it call a javascript function but i want to pass the text of the link into the function. i am trying to create a dialog that displays the name on the original link. would jquery be helpful here? ...

how do you populate a textarea with jquery and linebreaks?

Hi there, I know how to populate a textarea, but how to populate it so that it maintains the line breaks? e.g html <div id="previous_purchases">blah blah blah<br />blah blah</div> jquery $('#previous_purchases').click(function(){ var what = $(this).text(); $('#purchased').text(what); }); All the blah's ju...

dynamic table where i can click on link and grab contextual information

i am generated a table dynamically which looks like this: Name Action ==== ======= Adam Delete Joe Delete Bill Delete I want "Delete" to be a link that pops up a confirmation popup that says: "Are you sure you want to delete "Adam"? (Yes, No) NOTE that "adam" is contextual and needs to be retrieved from the ro...

JQuery closest() help

So I have several containers with this markup on a page: <div class="box w400"> <div class="box-header"> <span class="expand-collapse">expand/collapse</span> <h3>Heading</h3> </div> <div class="box-content"> <p>Some content here...</p> ...

What are the arguments against using a JavaScript Framework for a Web site development company?

Our company builds websites and web applications. We are a small firm and our team of developers are always building the javascript functions from scratch or copying from other websites built by us. Every time I bring to the table the word standardization and using a JS framework like JQuery, Prototype or any other, I am told Framework...

calling controller action from javascript

i have a link that calls into a javascript to give a confirmation: $("a.delete").click(function() { var name = $(this).parent().prev('td').prev('td').text(); jConfirm('Are you sure you want to delete the following member:' + name, 'Member Delete', function(r) { }); }); i want, if the user clicks yes to call a controller ac...

How to make Incoming Links appear as a drop-down in Sharepoint wiki?

The incoming links feature of the Sharepoint wiki is cool, but it's a hassle having to go to another page to see the list. Is it possible to replace the Incoming Links hyperlink with a drop-down menu showing the links on the same page? ...

Asp.net Mvc: Jquery post array + anti forgery token

Hello, how do I post an array to an action on my controler with the anti forgery token. This is my Jquery postdata: var postData = { '__RequestVerificationToken': $('input[name=__RequestVerificationToken]').val(), 'productIds': IDs }; this is my Jquery post: $.post("MyProducts/DeleteProduct" , postData, function(data) { }); This i...