jquery

jQuery UI dialog - unable to remove buttons.

How do I remove the buttons in a jquery dialog? Per example, I tried re-calling .dialog with the correct new options, but the dialog seems unaffected. $('.selector').dialog('option', 'buttons', {} ); does not work, and nor does it work if actual new button strings and functions are declared. Thoughts? ...

Prevent New Request While fetching previous request in jQuery

hi , i want to how can i prevent new ajax request while browser is fetching previous request ! i create a system contain a table of data like this : col1 | col2 | col3 data1| data2| data3 when user mouse over data fields I'm used Ajax to retrieve more information about data on mouse over event but if user rapidly move his/her curso...

Retrieve static data from database vs. file system

I am about to start a project using ASP.NET MVC. As part of the project, we need to display some data to the user. The data consists of an object graph that consists of 35 days per line. Each day can be a work day or off day. If it is a work day, there could be additional information associated with the work day. So basically, we have an...

Emulate a file upload click in jQuery

I have an <img ... /> tag that I have bound a click event to in jQuery. When it is clicked I'd like to have it emulate the click of a button on the file upload to open the file system browse pop-up. I've tried these things within the click function and had no success: ... $(".hiddenUploadBtn").click(); ... ... $(".hiddenUploadBtn").sel...

Given a form normally filled out by hand, how can I print out information on that form programatically?

I have a PDF document that represents a print form that is normally filled out by hand. I want to to programatically populate certain text fields in the document (it is not a PDF form, just a plain PDF document) and fill it out with data specific to each user of the site. I want the end form to look like it was passed through a typew...

how to get a value of parent id with jquery

Hello, This is the html i am using <tr> <td>No.</td> <td id="2" class="editable">data1</td> <td id="2" class="editable">data2</td> <td>Usage Left</td> </tr> <!-- Multiple rows with different ids --> and this is my javascript $(function(){ $('.editable').editable({onSubmit:Update}); function Update(){ var id = ...

JQuery slideToggle() current show/hide state property?

What is the easiest way to programmatically find the current toggle state of a DOM element when using the slideToggle() function in jquery 1.3.2? I expected there to be a property for this, but I can't seem to find one. Directly checking the CSS display or height seems like a hack, but maybe that's what one is expected to do. ...

How do you mimic the UI behaviors of YouTube's watch-action-area using jQuery Ajax?

When watching a YouTube video, a user can click "Share" or "Playlists" and a panel containing relevant FORM elements will appear below it. I would really like to find a simple jQuery example that shows how to implement a behavior very much like it -- just the UI behavior -- complete with the "close" option. ...

Submitting a Rails form with jQuery and Ajax

EDIT: Figured it out so asking a related question. here's my Javascript jQuery.ajaxSetup({ 'beforeSend': function(xhr) { xhr.setRequestHeader("Accept", "text/javascript") } }) jQuery.fn.submitWithAjax = function() { this.submit(function() { $.post(this.action, $(this).serialize(), null, "script"); r...

How to access parent.document elements using JQuery in firefox?

For example: $(elementid,top.document).attr(attributeName) or $(elementid,parent.document).attr(attributeName) works in IE or Chrome but doesn't work in Firefox. Does anyone know what the firefox equivalence is? Thanks! ...

JQuery. Simple drop down selection menu behavior question.

Hello, I have a simple html option/select (dropdown) menu. I want to use JQuery to redirect links when an option is selected. I have a "go" button in noscript tags in case javascript is disabled, but in the case that the user has javascript..I would like the redirection to happen automatically on-click. Could somebody please guide me ...

Javascript centering a div on the page

Hey, For javascript I use the jQuery framework but can easily integrate any javascript functions into it. The problem I have is I have a div that fade's in when I click a link. How can I get it to align in the center of the page and stay even when scrolling. Below is an example of what I currently have implemented: HTML code: <div i...

jQuery drag drop slower for more DIV items

Hi there, I have got a hierarchichal tags (with parent child relationship) in my page and it will account to 500 - 4500 (can even grow). When i bound the draggable and droppable for all i saw very bad performance in IE7 and IE6. The custom helper wont move smoothly and was very very slow. Based on some other post i have made the dro...

how to hide input of type radio in html

I am trying to hide all the tags in html that are <input type=radio> I had this css input{display: none} However, this is hiding even buttons because they are <input type=button> is there a way to hide just intput of type radio? I can use jquery if need be but if it can be done via js or better yet just CSS then I'll prefer that......

How to get TextArea contents without error in IE?

I am using jQuery, and I get the contents of a TextArea as follows: // get the SQL from the text area at the top: //sql = $("#sql").val(); //sql = $("#sql").text(); sql = $("#sql").attr("value"); <textarea id="sql" rows="9" cols="99"></textarea> This works fine in all browsers except IE I have tried several ways, but nothing works i...

solr sanitizing query

I am using solr with ruby on rails. It's all working well, I just need to know if there's any existing code to sanitize user input, like a query starting with ? or * ...

Mouse position using jQuery outside of events

I need to get a hold of the absolute mouse position / coordinates (X and Y) using (preferably) jQuery like in this tutorial but outside of any JavaScript event. Thank you. ...

[jQuery] Update URL on AJAX call?

Right now the biggest issue I'm having with using AJAX is the fact that if I use AJAX on a page, go to another page, then use the browser's back button to go back anything that was changed with AJAX is gone. I've thought about using the jQuery Addresss plugin to solve that problem but I don't like how it only amends the URL with "#whate...

how do I access a bit of the JSON with jQuery?

Hi everybody, I think this is a simple issue I just haven't worked with JSON like this before. Very simply, I have a JSON object: fc_json = { "product_count": 1, "total_price": 199.95, "total_weight": 1, "session_id": "26e8og4ldmlunj84uqf04l8l25", "custom_fields":{ "affiliateID":"25" }, "messages":{ "errors":[], ...

list expander (css problem)

here is the last site I work on.... http://www.nettoyants-ecolo-lemieux.com/ in ie6 when you click on the LAURENTIDES link (first on the right) the colum jump under the first even if it is flot.... in firefos.. it fine... Anybody have a clue how to fix that thanks in advance ...