jquery

How to add variable to server-side binding

i have javascript code that looks like this: $('#lnkPopup').click(function() { var id = $(this).attr('rel'); var msgCount = '<%= Model.ElementAt('+id+').MailCount %>'; }); <%= Model.ElementAt('+id+').MailCount %> doesn't work. so how do i add a javascript variable to a serverside query this? ...

What is a good yui replacement for jquery.live

jQuery.live Added in jQuery 1.3: Binds a handler to an event (like click) for all current - and future - matched element. Can also bind custom events. http://docs.jquery.com/Events/live Is there a good YUI replacement which can do this? ...

Getting data returned from a jquery ajax call

I am trying to get the data return from a function called by a jquery ajax call. My function is located in a a php file and it looks liket his valid_user() { $id = $_POST('id'); if($id == 'hello'){ return true; } else{ return false; } } and here is my ajax call $.ajax({ type: "POST", url...

Jquery attempting to hide element when clicking on a child

I am trying to hide an element when an image with the ID of 'close' is clicked. $('#close').click(function() { $('#ordercell').hide('slide'); }); Should be all I need, from what I can tell, but nothing is happening when I click. $(document).keyup(function(event) { if (event.keyCode ==27) { $('#ordercell').hide('slide'...

window.toString.call is undefined in IE8

When you run: window.toString.call("") everything's fine in FF/CH but in IE8 you get a script error. Investigating a bit more it turned out, that window.toString.call is undefined in IE8? You can also run this one: window.toString instanceof Function; // false alert(window.toString); // function toString() { // [native code] // ...

Sending $.getJSON to external server

I was told that $.getJSON is the best way to send data to and from external servers. I probably wasted 7 hours of my time trying to use JQUERY's Ajax to do so just to find out that no browsers allow that type of method. I would like to send the data using the Jquery getJSON and I am using cakephp as my receiving end (i.e. My external se...

how to reset the control values inside the modal pop up using javscript or Jquery

<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BehaviorID="popup" TargetControlID="cmdTrigger" PopupControlID="pnlPopup" BackgroundCssClass="modalBackground" OkControlID="btnOk" > </cc1:ModalPopupExtender> <asp:Panel ID="pnlPopup" runat="server" CssClass="modalpopup" Style="display: non...

jQuery superfish menu :cursor issue

I am implementing the superfish menu and have noticed that there is a funny behavior with the cursor loosing its default styling (pointer). For example: http://users.tpg.com.au/j%5Fbirch/plugins/superfish/#examples If you rollover the first menu item and move your mouse over the drop down menu, the cursor changes from being a pointer t...

Best practice for function flow in Javascript?

I have what I thought was a relatively easy Ajax/animation that I'm adding to a client site to select between projects for display as images. The flow goes something like this: User clicks on a thumbnail in a project overview (pHome). Using jQuery, ajax load in an XML file with the image, caption and project description data (project1...

JCarousellite: Duplicating items

I'm using JCarousellite to create simple carousels on a Drupal site. In my template file I create the list items by looping through an array. When I try and create a carousel on one of these pages it has the habit of duplicating items in the list. Has anybody experienced this? If so, anybody found a solution? ...

JQuery JSON Plugin toJSON a Custom Object

I am using the JQuery json plugin and trying to convert a custom object to JSON using the toJSON function. Here is the object: function Customer(firstName, lastName, age) { Customer.prototype.firstName = firstName; Customer.prototype.lastName = lastName; Customer.prototype.age = age; } And here is the $.toJSON applied: ...

jquery rollover confusion

Trying to get my rollovers to change src on rollover. This is working ok, though there is a bug. After I have clicked on a thumbnail, the src can sometimes contain the wrong src (the rollover state remains even on mouseout). . To find the bug, click on a few thumbnails and mouseover a few, you should see the rollover src remain for ones ...

Is checkbox checked (inside each() loop)?

Hello, I'm looping through multiple checkboxes with the same class with function each() and inside the loop I need to be able to tell whether the checkbox is checked or not. How to do that? $('.checkbox').each(function() { var is_checked = 'no'; // I need to change the value of the is_checked variable to 'yes' // if the che...

jQuery.scroll "listener" problem

Hey guys, I'am scrolling through a page witch jQuery scrollTo. If the page reaches ssome pixels for exaple y= 300 a div slides in. If i scroll manually i want to slide that div in too. how do i achieve that? I've thought about something like a event listener. jQuery.scroll exists but does'n make a difference between "manual" scrollin...

Does Microsof Ajax library (Asp.Net Ajax) use $ function at all? Do I need to use jQuery.NoConflict() if I use with Jquery libarary?

Does Microsof Ajax library use $ function at all? Do I need to use jQuery.NoConflict() if I use with Jquery libarary? I checked the reference, it looks like Microsof Ajax library use $get function to get the element by Id, so do I need call jQuery.NoConflict() if I want to use it with Jquery library. ...

jquery ajax request cached

when i request something via ajax if the input is the search the content seems to be cached? do i add a random number at the end of my query? /search?input=test to /search?input=test&random=283928392 i think this would solve my problem. right? how do i write this in javascript ...

Any way to avoid using anonymous functions in jQuery?

If I have a chunk of code like this: .hover( function () { hoverState($("#navbar a").index(this),1); }, function () { hoverState($("#navbar a").index(this),-1); }); Is there any way to get rid of the anonymous functions and just say: .hover( hoverState($("#navbar a").index(this),1), hoverState($("#n...

Remove same replicated text with jQuery

Hi. This might be a little bit odd question, but Im trying to figure out function that will remove numbers that are repeating them self. this is my html 1234123<br> 23434<br> 5696<br> 5696<br> 34096756098<br> I need function that will return numbers numbers without those that are duplicate them self 1234123<br> 23434<br> 5696<br> 3...

jquery post to webrick via sinatra only works in IE

When I run my little test app in IE, the log output from webrick shows a return code of 200, and indicates it received a post request: 192.168.0.18 - - [03/Nov/2009 16:17:37] "POST /testpost HTTP/1.1" 200 512 0.0010 Quietspeed.example.com - - [03/Nov/2009:16:17:37 EST] "POST /testpost HTTP/1.1" 200 512 - -> /testpost And the page is up...

Open Datepicker situated inside of Dialog

At the moment I have the dialog defined as : $('#dialogCl').dialog({ autoOpen: false, width:650, height:550 }); And the datepicker defined inside #dialogCl as : $("#c").datepicker({showOn: 'button', buttonImage: 'images/calendar.gif', buttonImageOnly: true}); I need to open the datepicker but it seems it puts th...