jquery

Can i get more variables instead of string in jquery $ajax?

I have this script: $.ajax({ url: 'submit_to_db.php', type: 'POST', data: 'name=' + name + '&email=' + email + '&comments=' + comments, success: function(result) { $('#response').remove(); $('#container').append('<p id="response">' + result + '</p>'); $('#loading').fadeOut(500, function() { $(this).remov...

Calling ASP.NET server side method via JQuery

Hi, I'm trying to call a server side method from client side via jQuery, my code is as follows: Server side: using System.Web.Services; [WebMethod()] //[ScriptMethod()] public static void SendMessage(string subject, string message, string messageId, string pupilId) { //send message } Client side: $(...

How to implement "confirmation" dialog in Jquery UI dialog?

I am try to use JQuery UI Dialog to replace the ugly javascript:alert() box. In my scenario, I have a list of items, and next to each individual of them, I would have a "delete" button for each of them. the psuedo html setup will be something follows: <ul> <li>ITEM <a href="url/to/remove"> <span>$itemId</span> <li>ITEM ...

How to customize this already custom jQuery sort solution?

Hi, i found the following solution to add sorting capabilities to jQuery (ref: jQuery sort()). I've altered the solution to sort strings of unknown length. It works nicely, however as you might notice from the function name: it sorts acscending :-). jQuery.fn.sort = function() { return this.pushStack( [].sort.apply( this, argumen...

Retrieve Values From the Controller in JQuery

Hi, I m new to Jquery..How to retrieve the values from my controller and compare them with some String inside JQuery..Please suggest me.. $(".select"+increment).change(function () { if("here i need the value from my controller " =='String') { $("<label id=labelstr"+stringinc+" >"+labe...

How do I highlight the Html.ValidationMessage's on a AJAX Post?

I have a form which I post back via jQuery AJAX. In my controller it checks for errors in the ModelState and returns these errors in a ContentResult and the user sees the errors in an updated DIV. How can I get the little * next to the fields when there are errors? Thanks ...

jQuery datepicker, onSelect won't work

Hi, I can't get onSelect working on my jQuery datepicker. Heres my code: <script type="text/javascript"> $(function() { $('.date-pick').datePicker( { onSelect: function(date) { alert(date) }, selectWeek: true, inline: true, startDate: '01/01/2000', firstDay: 1, }); })...

prevent page refresh by submit a post action from a normal clickevent

Hello, my question is Can I prevent a page refresh from this code As you can see, I submit a post action from a normal click_event, wich I need because live does not support submit events. jQuery('.verwijder').live('click', function() { t=$(this); t.parents(".paneltbnote").animate({ opacity: 'hide' }, "slow",function(){ ...

jQuery - Reload table

I'm trying to reload a table which was also generated by PHP. The table has an ID: #bookmarks After the user pressed a button, the table should reload the content + the data they have just added. I'm a bit confused because I don't know how to send all of the data from a PHP result. Thanks, James ...

jQuery preventing postback on button click

Hi, How can I attach a click event to a button and prevent postback? The code I have doesn't seem to be working. $('#btnNext').click(function() { return false; }); ...

JQuery window width not correct in Chrome

I have created a plugin which i have cut down to the bare bones of a plugin (i.e. no functionality, just the structure) to debug this issue and it still exists. It deals with resizing divs and bases this on the document's width. The problem is that the documents reported width is reduced by 17px from its actual width and thus doesnt si...

ASP.NET,jQuery UI Dialog showing in page for 1-2 seconds

I have an ASP.NET page where i will check whether the user has logged in to the system (by checking the session value) in the page load and if not logged in,it will show a jQueryUI dialog for login. My ASPX page contains these script in the head tag <style type="text/css"> body { font-size: 62.5%; } label, input { display:block; }...

datepicker.iso8601Week offset

Hi, I'm using datepicker.iso8601Week() to calculate the week from a selected date (in a jQuery UI datepicker). According to iso8601Week, a week goes from Tuesday-Monday, and I need it to go from Monday-Sunday. How can this be accomplished? ...

asp.net generating onclick event automatically for button

Hi, ASP.NET seems to be generating its own onclick event for any buttons that are generated. Looks like this javascript:__doPostBack( This is preventing jQuery from working correctly. Does anyone know how to stop asp.net engine from doing this? Many thanks ...

How to bind jQuery resizable with an image?

I would like to know how to make resizable image with jQuery on the fly. It's something like an image has resizable border and we can drag that border with mouse in order to become smaller or bigger of the image. When I use resizable, only background continent become bigger but image is still the same size. Thanks in advance for your pre...

jQuery and ASP.NET Control issue

If I have a custom ASP.NET control that renders as an html control with an ID, I'm trying to add an attribute to the input control with jQuery. However, I'm running into some issues: First, my jQuery is not able to select it. I have so far: $(document).ready(function() { $(client id of the input control).attr('onclick', function (...

getting attribute using jQuery in IE

I have simple button: <button type="button" id="somebutton" value="start">blah</button> in jQuery, on the bind('click, function(){.... I have this: $(this).attr("value") of course what this does is gets the value of an attribute, which in this particular case is: "start". OK, this works in firefox, I get correct value of "start". ...

Problems with JQuery selectors and "is"

I'm having difficulty understanding why a particular selector isn't working for me. Admittedly I'm a bit of a JQuery newbie. This correctly selects the first div.editbox on the page and colors it yellow: $('div.editbox:first').css("background-color","yellow"); However, this if ... is construct makes the highlighted border appear for ...

How do I set the jQuery UI Slider value programatically and fire events?

I have a slider defined like so: $("#slider").slider({ orientation: "vertical", range: "min", min: 0, max: totalRows, value: totalRows, slide: function(e, ui) { scrollTheTable(ui.value, totalRows, visibleRows, $table); } }); When using the slider, the function ass...

Adding metadata parser to a table header

Hello, this is an ongoing project and I'm just about done. I've been developing a custom table sorter based on the tablesorter plugin for jQueryt. It's just about done, thankfully. My last question is this, I have a table header as follows: <th class="blue_bg"><a rel = "Header" href="#" title="Sort column in decending order" class=""...