jquery

Alternatives to model binding for data submission

I have an ASP.NET MVC2 application that contains a partial view that allows the user to set a variety of properties on a collection of objects. These are currently done using HTML input controls such as the textbox and dropdown list. I am using using out-of-the-box model binding to submit the user-entered values to the server via a form ...

File Upload with progress bar in Asp.Net Mvc/ jQuery?

I am looking for a jQuery plugin for File upload with progress bar for Asp.Net MVC. We are using RadUpload control in an existing Asp.Net WebForm application and it shows the status without using Flash/Silverlight. http://demos.telerik.com/aspnet-ajax/upload/examples/customizingraduploadui/defaultcs.aspx?RadUrid=5154cf7e-2fee-4adc-b0cc...

How can I dynamically name an array in Javascript?

I am using jQuery and JSON to pull data from a database. Each row of the database is a different product and each product has a number of properties associated with it. What I'm trying to do in js, is create a named array for each product containing all of the products properties. I know how to pull the data from JSON. I know how to con...

jQuery: Store additional/extra data/info inside a jQuery object?

Hello, Is it possible and smart to store extra data inside a jQuery object? Right now I have objects that contain some data but these objects also have a visual representation of that data. This works but I have a lot of code to keep them both in sync. For example if you delete an object from the dom I also have to delete the related...

jquery how to get the button that has opened the dialog

Hello, I have a dialog that is opened by many buttons. How can I know which button has opened that dialog? $('#dialog').dialog({ autoOpen: false, buttons: { "Ok": function() { $(this).dialog("close"); }, "Cancel": function() { $(this).dialog("close"); } }, open: function(event, ui) { //HERE ::...

Overlapping with Fusion Chart

While I drag an element (DIV or SPAN or any ), over the FusionChart control, the draggable element disappears. Sometimes the elements comes under the FusionChart. I need to drag the element over the Fusion Chart control. Here I am using Drag and Drop using jQuery. And i am dragging a text. What is the solution ? ...

How to get rid of "undefined" text when jqGrid is initially loaded

I have a jqGrid on a page and whenever I load the page the jqGrid at first shows "undefined" and then loads the data about a half a second later(Depending on network latency). My question is how do I get this to say something like "loading" or something other than "undefined"? I notice the jqGrid examples don't have this problem and do s...

get the value of input type file , and alert if empty

how to alert if input type file is empty !? this is my jquery code but i didnt know how to get the value $('.upload').live("click",function() { var imgVal = $('#uploadImage').val(); if(imgVal=='') { alert("empty input file"); } return false; }); <input type="file" name="image" id="uploadImage" size="30" ...

Highlighting Menu Using jQuery - Does Not Work on POST

I'm having an issue regarding some jQuery I am using to highlight a menu item that has been selected by a user. Here is my code (within the Site.Master): <script type="text/javascript"> $(function () { $('#horizontalmenu ul li a').live('click', function () { $('#horizontalmenu ul li').removeClass('current'); ...

Trigger a specific input button in a form from another forms input buttons

I want to trigger a specific input button in a form from another forms input buttons. As if someone clicked on that button not just submit the form as in the answer in this thread. This is the one I want triggered. <td width="135" align="right"><input border="0" type="image" id="btnRecalculate" name="btnRecalculate" src="v/vspfiles/tem...

Using Valums AjaxUpload with a CFC in ColdFusion 8

I was looking for an elegant way to upload images AJAX style. I'm new to all this mind you, and I couldn't find anything really simple and clear to teach me how to do this with a CFC and jQuery. There are some GREAT things out there from Ray Camden and others using Valum's AjaxUpload plug-ing (found here)but it was mostly using a CFM to ...

Error using jQuery uploadify with IE

Testing in IE 8 i get this error: Object doesn't support this property or method I'm using the latest release of uploadify. It occurs in a custom javascript file I've included in the head section of my page. Here's the code: $(function () { $('#fileupload').uploadify({ // <--IE points to this line: Object doe...

Form is missing elements on submit after ajax td replace.

I have a school district drop down with an onchange event tied to it. When it changes, then I do an ajax call to get a list of schools that are in that district. The html on the ajax page has checkboxes for each school so someone could be assigned to multiple schools under a single district. The ajax works fine and I modify the html of a...

Set value to Symfony custom select_month_tag item

I am using the select_month_tag and select_day_tag in a new Symfony 1.0 project (I know, out of date, but it's what we're using). In any case, when using the tag I know I can set the default first item in the select object to a custom item by using 'include_custom'=>'My Custom Value'. However, by default, Symfony does not give this fir...

Using jQuery, how do I add elements to a jQuery object that's yet to be created?

Perhaps I am doing this wrong and suggestions on how to improve my code are appreciated. My situation is this: I have a toolbar with different elements that are populated by a callback. I do not want to use the show() or hide() commands, I prefer to use detach, but I think there should be a nice way to deal with it. Here's my code: entr...

Custom HTTP Verb with jQuery.ajax()

Is it possible to use a custom HTTP VERB, like MERGE, with jQuery.ajax()? I'm interacting with an OData API, which expects a MERGE verb when posting updates to records. The problem I'm having is that when I use "MERGE" in the ajax() request, it doesn't send data to the server. It just sends a MERGE request with no data, so the OData ser...

jquery nested accordion problem

Hi there, First question ever asked at stackoverflow. So, problem is: Two accordion declarations on document.ready (jquery 1.4.2 and jquery ui 1.8.2): $(document).ready(function () { $("#accordion").accordion({ header: 'h3' }); $("#accordion2").accordion({ header: 'h4' }...

Adding custom tag buttons to jwysiwyg?

How can I add a button to jwysiwyg that will add an HTML tag to the selected text? I tried this, based on the documentation: $('#wysiwyg').wysiwyg({ controls: { tt: { visible: true, tags: ['tt'], css: { class: 'tt', className: 'tt' } } } }) ... And it adds the button, all right, but then the button doesn't seem to actu...

How to print to pdf using php with a canvas element

I'm trying to make an on-the-fly PDF generator using PHP, but I'm having one problem so far in that the pages I am trying to generate as a PDF have a bar graph generated by flot using a canvas. Does anyone have experience with this or know how to get canvas to print to pdf? I'm also open to the idea of simply having my client load a p...

hide scrollbar while still able to scroll with mouse/keyboard

Hello, I want to know if it is possible to hide the scrollbar, while scrolling is still enabled with mouse/keyboard. I tried to use CSS: overflow: hidden; The effect is, scrollbar disabled AND scrolling disabled. ...