jquery

Jquery ajax call pass GridView DataKey

I need to pass a GridView DataKey (Primary key) as parameter in an ajax call JSON with jquery. However,i dont't to expose my primary key column in source code HTML.I've already tried to hide the TD (first column) of the table,but it doenst hide in source code. Here is the Jquery code: $(function(){ $("tr").each(function(){//hid...

JQuery Sortable that scrolls

Hello, I have two jquery sortables that connect to each other (code below). $('#da_favourites_sortable').sortable({ connectWith: '#da_available_sortable', handle: 'img.da_icon_handle', revert: true }); $('#da_available_sortable').sortable({ connectWith: '#da_favourites_sortable', handle: 'img.da_icon_handle'...

CSS for docking/sliding panel on a web page

Hi, I would like to display any validation error messages on a web form similar to compilation error messages in visual studio that slides up from the bottom when there are errors. the error message panel should overlay on top of the form without taking extra space and can be closed if required. how to achieve this with the help of CSS...

tinyMCE not working in FF

I am trying to run the examples for tinyMCE editors. The examples work in IE and Chrome but do nothing in FF. I get an error in firebug saying the tinymce is not a function. I looked on their support page, don't see anyone else having the issue. I have not altered their code or embedded it into any of my own. Just trying to run their exa...

overflow: hidden on the left side too?

could one use overflow:hidden for both sides? cause i want the row to be centered. EDIT: ive got a row of link elements. i want it to be like: http://jqueryfordesigners.com/coda-popup-bubbles/ the row will stick out both to the left and right. not just on the right side. with other words: i want to center a very long row within a div ...

Rails/jquery passing a variable(IDs) collected in jQuery to a rails controller/action

Hi everybody, I am new to AJAX and jQuery so please excuse me if this is kind of basic: I implemented the great jgrid by 2dconcepts (http://www.2dconcept.com/jquery-grid-rails-plugin). Now I would like to select the data in my table with the checkbox, - get the product ids (that works fine I see the alert from the 'handleSelection') ...

IE/jquery compatibility, dynamically populating a select field

Hi, Not sure where to even start on this one... I have a function that takes a select input field ID and populates it with an array of options. function populateSelect(selectId, options){ options = options.split(';'); selectId.find('option').remove().end(); $.each(options, function(i, option){ option = option.split...

How to prevent $.getScript from loading the same file?

I am trying to load a file.js dynamically with $.getScript. I have several select options to load different script on each click. I just want to call it once and if possible remove it from the dom on clicking another option, but firebug says loading the same script again and again on the next subsequent clicks. Having tried several solut...

Automatically resize jQuery UI dialog to the width of the content loaded by ajax

I'm having a lot of trouble finding specific information and examples on this. I've got a number of jQuery UI dialogs in my application attached to divs that are loaded with .ajax() calls. They all use the same setup call: $(".mydialog").dialog({ autoOpen: false, resizable: false, modal: true }); I just wa...

Limit number of characters

I am appending a variable from an input to a li. I want to trim the P <p class="layer' + count + '"> '+ Xia2 +'</p> text to a number of 15 characters and not trim the SPAN, witch uses the same Xia2 variabile. I can probably create 2 variabiles for this... How can this be done? I've tried several ways trying the $(this).val(text.substr(0...

synchronous AJAX post from unload event: how to ensure user sees most up-to-date information from DB on next page load

When a user requests to edit an entry in our CMS we 'lock' it so that nobody else can edit it simultaneously, we release the lock when they submit their changes. However we need to handle the case where the user leaves the page through other links... my first attempt is to use jQuery to fire a synchronous $.ajax() call on $(window).unlo...

Jquery DataTables Plugin

Hello Everyone , JQuery noob here ... I have a Question regarding the DataTables Plugin.DataTables link. The Plugin claims that: A common use case for this is when you are displaying live information which could be periodically updated Being a newbie, I cannot figure out how to initialize the Table using Ajax, so that the ta...

Pagination problem needing assistance

Hey, I'm trying to add a button that when clicked will grab data from the mysql database and display it with a pagination. However, I can't seem to get it to work properly. The first main page looks like this: pagination.php: <?php include('config.php'); $per_page = 3; //Calculating no of pages $sql = "select * from explore"; $result ...

Question about jQuery Selectors

Hi, i want to select all h1 tags except myclass with jQuery. For example i want select < h1> but i don't want to select < h1 class="myclass"> Thanks ...

Jquery: fade menu out when clicking on anything EXCEPT the menu itself, short piece of code.

.saf_search is a button, when it's clicked, the menu .lisearch fades in, when you click anywhere on the page EXCEPT for on the menu .lisearch, then it should fade out(that's how it's SUPPOSED to work) Does anyone know why this isn't working? It fades in, and the first time i click anywhere on the page it fades out, but the second time i ...

Escaping jQuery data being sent via POST

I'm using jQuery.ajax to extract form data from a page, and send it to my database (via another PHP page). The form information is collected by: var X=$('#div1').val(); var Y=$('#div2').val(); This is used to build the POST string, i.e. var data='varx='+X+'&vary='+Y; Obviously this is problematic if an ampersand character is used....

Multiple javascript frameworks in one webpage conflict

<link rel="stylesheet" type="text/css" href="css/accordion_glam.css"> <script type="text/javascript" src="jquery-latest.txt"></script> <script type="text/javascript"> $(document).ready(function(){ $("a.switch_thumb").toggle(function(){ $(this).addClass("swap"); $("ul.display").fadeOut("fast", function() { $(this).fadeIn(...

Getting Rails out of the way?

I have a legacy app that was built entirely in jQuery and HTML. Does a lot AJAX calls and so forth. I needed an authentication framework for it, so I wrapped it in a Rails app. Rails -> does the authentication jQuery/HTML -> all the rest The problem is that the jQuery stuff doesn't seem to work anymore. All my regular AJAX calls...

jQuery Css Class not set Corectly

I'm trying to implement a starring system akin gmail, being able to mark an item important by clicking on a graphic. if($starred == 1){ $starred = '<img class="starred" id="row_'.$trouble_ticket_id.'" src="images/icons/silk/award_star_gold_3.png" alt="Star">'; } else{ $starred = '<img class="unstarred" id="row_'....

jqGrid - Table not being populated by data from json request

Hi, I am trying to get a grid displayed using jqGrid. Everything seems to work fine. The table is being render, but all the cells are empty. All the other infos are on the table (page number, total pages, number of rows). When trying to change page, the json data is being retrieved without any problem. Here is a snip of my code: <scri...