jquery

jquery multiple plugins on same form

Can someone look at this code. I am using two plugins in the form. One to validate form fields and other to style form fields. Form validation validates form if I am comment out form styling code. ( // $('.ul').jqf1(); ) I want both of the plugins work together. <link href="css/jqf1.css" rel="stylesheet" type="text/css" /> <script src=...

ASP.NET MVC 2 Ajax form submit, error: returns error with no information?

Hi All, i have a partial view with a form in it. It is strongly typed. I am using ajax in a view with the partial view in it to submit the form. It's basically a form that creates a new DB item and i can see that the controller action is working and being called. my ajax submit looks like this: $(document).ready(function () { v...

looping through dynamically created controls in jquery

I'm trying to use the following loop to loop through dynamically created controls on my web form: for(x = 0; x <= count; x++) { Stmt += $("#DDLColumns" + x).val(); switch($("#DDLConditional" + x).val()) { case "is equal": Stmt += " = "; break; ...

Access control's dynamic data after postback

So I have a cascading dropdown of sorts, but using List Boxes. When an item is selected in the first ListBox, the second ListBox is populated with items based on the first selection (this is done using a jQuery AJAX call). Here's what I got: $('#<%= lbEvents.ClientID %>').change(function() { var selectedValues = $('#<%= lbEvents.Cli...

How to insert a click function inside of a plugin call?

Inside of fullCalendar(), a jQuery plugin, I can get the value of view.visStart. Outside of the function view.visStart is not available. How can I either get view.visStart out (and is this bad because it is Global?) or how do I insert a click function within the plugin call? thanks. $('#calendar').fullCalendar({ events: "js/events.j...

Keyboard accessible web dropdown menus?

Is there a way to build keyboard accessible dropdown menus on web sites? Our current web application has standard hover menus, but this really slows down our data entry clerks (who are accustomed to desktop apps where there's a keyboard accessible menu and no need to use a mouse). We figured out how to show the menu with a keyboard s...

How to know if return data is Json or String in jQuery and PHP?

Hi, I want to check in client side(jQuery) whether return data from a PHP function is Json object or String to assign different function. ...

json and jquery autocomplete - need help to understand what is wrong?

hello, i have this form: <form action="" method="get" style="margin-left: 2em"> <input id="companies" type="text" name="company" value="" size="40" /> <button type="submit" class="button-search">Search</button> </form> my json comes from this http://localhost:8080/;companies?name=aba and returns a valid json like: {"name":...

Moving divs + array with text in jquery, problem in IE

Hello, Please see the following website (http://www.intra-interieur.be/www) in Firefox, chrome, safari, .. It works fine. Then, open it in IE (7 or 8, doesn't matter). It doesn't really work :-). You can view the source of whatever you want, but here are the important things. I think the array with text that is being replaced is causin...

jQuery - Form Validation blur

I'm curious what the best method of web 2.0 form validation is... I'm looking into: http://docs.jquery.com/Plugins/validation And the claim to fame here is that it doesn't bother the user until he submits the form. However, that's what I want to happen. I don't want the user going through the entire form before he's informed that his e...

Expanding and Shrinking div with jQuery

I need this div to enlarge when hovered and shrink back to default when the mouse is away from the div. I did this: $('.box').live('hover', function() { if($(this).height() == 145 && $(this).width() == 100) { $(this).animate({ height: '+=30px', width: '+=30px' }, 500) $('.image img').animate({ height: '+=30px', ...

Jquery dialog stop closing when error occured?

I am using the jQuery Dialog in ASP.NET. I have it working fine with the exception of when I click the OK button in the dialog and if an error occurred I want to show the error in the label. By the time the dialog closing event is fired it is too late. How do I still show the dialog if an error has occurred. I don't want to close the dia...

jQuery Twitter-style sign in form

I'm trying to build a sign-in form similar to Twitter, but I have one problem. When "Sign In" is clicked, the form appears. And when "Sign In" is clicked again, the form goes away. This fine, but I would like the form to go away also when the user clicks outside the form. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E...

jQuery - the good parts?

I have embarked on a mission to start using jQuery and JavaScript properly. I'm sad to say that historically I have fallen into the class of developer that makes a lot of really terrible mistakes with jQuery (polluting the global namespace, not caching jQuery selectors, and much more fun stuff - some of which I'm sure I have yet to disco...

jQuery: slow 'Webkit' performance - function .hover

Hey. I'm trying to get this script to work smoothly in webkit (Safari, Chrome, newest versions). It runs absolutely fine in Firefox. This code is called in the document.ready function: $('#noScript').remove(); $("#content div.wrapper, #top div.wrapper").hide().stop().fadeIn({duration: 2000, queue: true }); $('#social a') .children('s...

Using Groupon API with jquery

SO I am using GROUPON API to grab their deals, I am also using jquery's get to get a json response. This is my jquery $.get('http://api.groupon.com/v2/deals.json', { division_id:'boston', client_id:'mykey', }, function(deal...

jquery and attr, undefind

Hi, Whats wrong with my code? Why does .atrr() show empty? Thanks $(document).ready(function(){ $('#push').click(function(){ alert($('#push2').attr('href').val); }); }); HTML: <div id="push">PUSH</div> <a id="push2" href="http://www.google.com"&gt;PUSH Google</a> ...

Embeding web service method to the .ascx(user control)

It didn't work and i think it won't but i wanted to ask you(last chance). I have a simple ascx file. It has one select element which retrieves sub categories when it is selected (over web service). I want to write my web method in ascx.cs file instead of to write in other asmx file. ASCX.CS file protected void public Page_Load(....){...

jQuery erratic triggering on simple animation

Hi I have an image around 150px wide by 300px deep. When I roll over it I want a little image to pop up on top. When I roll off the bigger image I want the smaller one to disappear. It all works, except that if you mouseover the triggering image where the new image pops up then it appears to go into some kind of loop or behave erratic...

Building a selector with literals and variables?

I have a variable whose value is the same as an ID on the page. When I do this: var foo = 'value'; $('#' + foo).thing(); it doesn't work. But this does work: var foo = 'value'; var bar = '#' + foo; //'#value'; $(bar).thing(); How can I build that selector in a single line? Creating extra single-use variables seems wasteful. ...