jquery

JQuery ajax call to httpget webmethod (c#) not working

I am trying to get an ajax get to a webmethod in code behind. The problem is I keep getting the error "parserror" from the JQuery onfail method. If I change the GET to a POST everything works fine. Please see my code below. Ajax Call <script type="text/javascript"> var id = "li1234"; function AjaxGet() { ...

How to prompt browser to display open/save dialog box using jquery?

How to prompt browser to display open/save dialog box using jquery? ...

Javascript function in external file is undefined when declared in a certain way

myfunc() runs successfully when called from within the same js file. but it is undefined (Firebug) when called from an HTML page: JS file: $(function() { myfunc() { alert('inside myfunc'); } alert('outside myfunc'); myfunc(); //this successfully runs myfunc() }); HTML: <script> $(function() { myfunc(); //...

jQuery compression leads to errors

Hi, could someone please explain when I have a jquery script which runs fine with no errors and then compress and upload it then returns errors? Much appreciated. EDIT The only error im getting using jsLint is: Error: Implied global: $ 3,25,27,28,31,32,34,35,36,38,45,46,47,49,50,61,63,64,65,67,71,75,79,83,87,91,94,95,96,98,101,102,10...

How to overwrite language labels in TinyMCE

I'd like to change language labels used in TinyMCE. E.g. "Überschrift 2" -> "Überschrift". Im using the jQuery plugins version of TinyMCE. Is there a way to overwrite those labels without editing the label files? ...

how to get the back data from a django view using ajax..

my ajax is : $('#save').click(function(){ $.post("http://127.0.0.1:8080/sss", function(data){ alert(data); }); }) and the django view is : def sss(request): return HttpResponse('ddddddddddd') how to get some data from the view 'sss' thanks ...

Autogrowing TinyMCE

Is there a way to have autogrowing TinyMCE editors? I want the height of the editor to depent on the content and to grow while typing. I tried some solutions I found while googling, but none of them worked. I'm using the jQuery version of TinyMCE ...

jquery this and other elements

OK, going rond in circles again - I'm sure the answer will be obvious. Just not to me :) I can't seem to specify this as one target amongst a few targets for a function: $(this, "elem1, elem2").doStuff() I just want to doStuff() to a pair of elements, one of which is this. I can only get it to work if I explicitly name the elements, ...

Highlighting dates between two selected dates jQuery UI Datepicker

I have one datepicker with numberOfMonths set to 2. Arrival Date and Departure Date are determined using this logic (within onSelect): if ((count % 2)==0) { depart = $("#datepicker-1").datepicker('getDate'); if (arriv > depart) { temp=arriv; arriv=depart; depart=temp; } $("#check-in").val($.datepicker.formatDate("D...

how to call postback link of another element in jQuery on some other event?

Hi This is kind of peculiar requirement.. I am using asp.net and jQuery together I have a link button as follows <asp:LinkButton ID="displayBtn" runat="server" OnClick="displayBtn_Click" Text="Display Content"></asp:LinkButton> I will hide this link button using style="dipsly:none;" and want to call the postback called by clic...

.before method adds unexpected close tags

I have a table in my markup on which I want to add some divs before and efter like this: <div class="widebox"> <div class="widebox-header">Opret/rediger bruger</div> <div class="widebox-middle"> <table id="Table3"></table> </div> <div class="widebox-bottom"></div> </div> I'm trying to do this with jQuery, like this: $('#Table3').befo...

jquery 2 fades complete at the same time

Hello again, just another quick one: I am noticing differences with fadeOut dependant on whether this is a target. Here's my structure. I have rows of data on my page, and each row has two icons. One is an update icon for that row, one is a delete icon for that row. When a user clicks the update icon for a particular row, I want both t...

doctype syntax error

Do you see any problem with this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; I'm in ASP.net and I'm using pikachoose jquery slideshow. It works fine in IE and was working in Firefox. However, somehow it's now stopped working in firefox and firebug is giv...

Toggle button and Toggle visibility

I'm using this jQuery to hide a DIV: $("#slider").click(function() { $(".help").slideToggle(); $("#wrapper").animate({ opacity: 1.0 },200).slideToggle(200, function() { $("#slider a").text($(this).is(':visible') ? "Hide" : "Show"); }); }); Instead of altering the text show I want to display a graphic, I want the grpahi...

Using object's method as callback function for $.post

Hello, $.Comment = function() { this.alertme = "Alert!"; } $.Comment.prototype.send = function() { var self = this; $.post( self.url, { 'somedata' : self.somedata }, function(data, self) { self.callback(data); } ); } $.Comment.prototype.callback = function(data) { alert(this.alertme); } W...

Web based weekly planner

Hello I'm looking to implement a web based weekly planner where a user can set when they will be unavailable to work. The state of the week will be saved as a 'varbinary' with a length of 168 which will represent every hour of everyday of a week. The database only needs to store the value of one week as the times unavailable to work wil...

Jquery addClass on radio box checked.

I checked all the topics, but i simply don't know why my script does not work :( <script type="text/javascript"> $('input[name=pic]').click(function() { $(this).closest('ul').find(".green").removeClass("green"); if($(this).is(':checked')) { $(this).closest('ul').find("li").addClass('green'); } }); </scri...

upload a image and insert directly into CKEditor

I'd like to create the same kind of function tumblr has for uploading images and then inserting them directly into the WYSIWYG editor. I was planning on using uploadify to upload the image, then I am not sure of the method for inserting into the CKEditor. Has anyone done anything similar or know of a plugin that could do this? Ideally ...

jQuery fade in background colour

Hi, I'm trying to fade in the background colour of a table row, and can't get it right. The fade-in will happen when a button is clicked. I tried something like: $("#row_2").fadeIn('slow').css('background', 'gold') And although this will apply the colour to the table row, it won't fade in, but apply it at once. I'm sure this is a s...

How to get anchor text/href on click using jquery?

Consider i have an anchor which looks like this <div class="res"> <a href="~/Resumes/Resumes1271354404687.docx"> ~/Resumes/Resumes1271354404687.docx </a> </div> NOTE: There wont be any id or class for the anchor... I want to get either href/text in jquery onclick of that anchor ... ...