jquery

SOLVED: Modal dialogs from within a tabbed UI (Improved example)

(I have tightened up my original example) I'm trying to invoke modal dialogs from within a tabbed UI, and I'm confused about the behavior I'm seeing. The first time I display the UI, my dialog behaves as expected, I can pull the data out of the fields, everything's wonderful. tabtest2.html: <html xmlns="http://www.w3.org/1999/xhtml" xm...

jquery event capture

i have some images loaded viad load method, something like this: <ul> <li><img src="1" alt="" /></li> <li><img src="2" alt="" /></li> </ul> on mouseover i want to append a div inside that <li> with a greater z-index than the img so that div comes "in front" of the image(like a bar with links for image editing).On mouseout i want...

keydown on checkbox doesn't bubble in FF, but it does in IE. How to solve?

Using jQuery, I bind keydown globally like this: $(document).bind('keydown', function(e) { alert('keydown fired'); }); When I press a key having focused a text input field, the alert shows just fine. But when I focus a checkbox and then press a key, it does not fire. Not even with the keypress event. Why do these events not bubble up ...

jQuery Binding Woes

I have a function: function foo() { console.log('i run!'); } And a binding to a button: $(function() { $('#myButton').click(foo); }); I am almost positive that the console should not show 'i run!' until the button is clicked. I have no other #myButtons on the page (I have forple checked this), and yet foo continues to run when ...

Force Javascript function call to wait until previous one is finished

I have a simple Javascript function: makeRequest(); It does a bunch of stuff and places a bunch of content into the DOM. I make a few calls like so: makeRequest('food'); makeRequest('shopping'); However, they both fire so quickly that they are stepping on each other's toes. Ultimately I need it to have the functionality of. make...

Telerik MVC Extension conflicts with JqGrid?

I am trying to use Telerik MVC extension with jQGrid in a ASP.NET MVC application. But I found they cannot nicely play each other, meaning I cannot have them working together in one View. No sure why? I guess it is because the place for js files. JqGrid needs to put the js library in Head, but Telerik requires before end of Body tag, bas...

creating an element and setting its attribute with jQuery

Hello all, I'm trying to create an <ol> element with jQuery and set its class and id attributes. Is there any way to do this all at once? None of my ideas have worked so far, I'm still very new to jQuery... ...

jquery star rating plugin and jquery click function

I'm using the jquery star rating plugin: http://www.fyneworks.com/jquery/star-rating/ I might get some html code like this: <form name="api-disable"> <input type="radio" class="star {split:2}" name="api-readonly-test" value="1"/> <input type="radio" class="star {split:2}" name="api-readonly-test" value="2"/> <input type="radio" c...

stop the title showing up on hover with jquery?

I basically am storing some data in the title attribute of some divs that I probably shouldn't be. Anyways I have done it now and when I hover over these elements this information pops up in the browsers handy default tooltip. e.g <div title="blah blah blah">something</div> Is there a method to stop this tooltip title functionality f...

Dynamic tabs with JQuery UI

I am creating a web application and I want to use the Tabs widget to replicate the tab functionality you find in most web browsers. I want the user to be able: to move (sort) the tabs around, create tabs dynamically, close tabs dynamically. The problem I find is that to close a tab you need to have its index and when considering the fac...

Setting boundary limits for a draggable object...

I have two elements: 1) a parent of fixed height, overflow:hidden 2) its child, of larger fixed height. <style type="text/css"> .myList {list-style:none; margin:0px; padding:1px;} .myList li{ height:50px; margin:4px; padding:2px;} .dragPanel {height:230px; border:solid; overflow:hidden;} </style> <div class="dragPanel">...

Restricting text box inputs to a given regexp using jQuery

Consider the following text box: <input type="text" name="quantity" id="quantity_field" /> Using jQuery I want to restrict the set of valid inputs into quantity_field by the following regexp: <script> var quantityRegexp = "^(0|[1-9]+[0-9]*)$"; </script> More specifically I want to make the browser discard any characters entered ...

Why does my COMET control throw a javascript error when IE8 closes?

I've written a COMET/Reverse Ajax table control in ASP.NET. The javascript part uses jQuery (1.3.2). It seems to be working OK, apart from when closing the browser in IE (8). In this case it throws a "Microsoft JScript runtime error: Object doesn't support this property or method". It's only when IE is closed that I get the error. Firefo...

what should be kept in mind while writing secured ajax code using jquery for jsp

i am currently working on a web application project for payroll. this site is public. i want to use jquery + ajax to implement certain functionality with server side lang as jsp. what are the guidelines helpful in writing a mature,secured code. ...

Image uploader in ajax or Jquery

Hello I want to upload image with the help of ajax or jQuery without page refreshing. I have lot of images in my web page and when i will click any of them then it will show in image box. Please help me for this problem i get lot of solution for simple uploading code but i need this. ...

Create a new element on the fly

I have a img element. When the user hovers over it, I want to create a new div near the mouse with the same image inside the div - something like a preview. I do not want to use a existing plug-in. Is there a simple way to achieve it? ...

Change values in form submitted and the JQuery serialize function

Hello all, Please look at the following code. When the form gets submitted, is it actually submitting the values I have entered i.e. val(50) or at the point it serialzies does it just get data from the form on the actual html page? // stop all forms from submitting and submit the real (hidden) form#order $('form:not(#order)').submit(fu...

Stop onClick from firing twice using jQuery

I am using jQuery.post to perform an action when a user clicks an external link. I've attached an onClick event to the link: <a id="lib-geo57" onClick="javascript:dConvert('lib-geo','57');" The event fires, however this action should only be performed once. To avoid a second firing, I thought of removing the onClick attribute: functi...

Download file when user clicks dialog button

I have a dialog box open when a user clicks on a url. In that dialog box, I have two buttons, "OK" (which closes the dialog box) and "download file" (which, I would like to have the file I just created via PHP be downloaded when clicked). How can I achieve that functionality with the "download file" button? I tried $.get but that only r...

jqgrid pass value throught url for ASP.NET MVC Controller

I have a jqGrid script like that: jQuery(document).ready(function() { var startDate = $("#startDate").Val(); jQuery("#sandgrid").jqGrid({ url: "/Deposit/Search?startDate='" + startDate + "'", datatype: 'json', mtype: 'GET', height: 255, width: 700, colNames: ['Index', 'Name', 'Code'], colModel: [ {...