Hi all,
Is there any provisions in rails that would allow all AJAX POST requests from the site to pass without an authenticity_token?
I have a Jquery POST ajax call that calls a controller method, but I did not put any authenticity code in it and yet the call succeeds.
My ApplicationController does have 'request_forgery_protection' an...
i have used a Moadlpopup ajax control in my project.when the popup is generated then the background item got inactive,but the scroll bar is active so, i want to disable the scroll bar too.but in this condition scrollbar is not going to be inactive how can i do inactive my scroll bar also.
...
I am building a Drupal website and want to have a facebook like box which create a content namely quotation in my facebook. How can I do this in drupal.. Below the box I want to display other quotations...
...
Why is it that the following script works clientside by removing the relievant html entity:
$(".ui-delete").click(function() {
$.ajax({
url: 'delete.aspx',
type: 'POST',
data: { strWidgetID:$(this).parents(".widget").attr("id") },
error: function() { alert('Error'); },
success: function() { a...
When you use jquery UI dialog, all works well, except for one thing.
When the browser is resized, the dialog just stays in it's initial position which can be really annoying.
You can test it out on:
http://jqueryui.com/demos/dialog/
Click on the "modal dialog" example and resize your browser.
I'd love to be able to let dialogs auto-ce...
hi everyone,
i have successfully added input element into div, which looks like this :
$(document).ready(function() {
$('#jumlah').change(function() {
var jum = $('#jumlah').val();
for(i=1;i<=jum; i++){
$('#jawaban').append('<label>Jawaban Soal ' + i + ' : </label><input type="text" name="jawab'+i+'" id="jawab[]" size="2" maxl...
How to check, is file exist on current site?
Like:
if ('http://site.com/girlfirend.png' exist) {
// do something
}
Maybe I can use .get? But how to check its status (ok or 404)?
Thanks.
...
Hi,
I use this code to override the window.alert function.
The function replaces breaks by \r\n.
It works fine in Firefox, but ofcourse not in IE.
Im getting the error: Property or method not supported.
(function() {
var proxied = window.alert;
window.alert = function(txt) {
txt = txt.replace(/<br>/g, "\r\n");
return proxie...
Instead of using @require (that is GM specific) or injecting a <script> element (e.g. for pre-0.8 GMs & other browsers), I'd like to use the jQuery object that the target page already loads and uses.
Is that kind of situation feasible and how to get it working? I've tried just using the $ or jQuery but it won't work. I've also tried the...
I can't believe it, but this is really happening. I ran out of available quote symbols using jquery and javascript native functions together. Can somebody help? Maybe there is yet another symbol?
var t=setTimeout('$("#popupChange").html('<img src="http://servername/pdf/picture/genericThrobber.gif" />');',2000);
EDIT: Firebug messages ...
I have jQuery UI Datepicker on the top right edge of my layout.
By default, it opens aligned to the left edge of its text box.
Thus, it falls out of the layout:
How to make it open aligned to the right border of its text box?
...
Hi There,
I have a standard UL as follows:
<ul>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
</ul>
I am trying to find a quick & efficient way to calculate the combined with of all the LI tags. Currently I have:
var width = ...
Hi how should i iterate array of variables and reassign value to each variable. E.g in jQuery
function test(param1, param2) {
$.each([param1, param2], function (i, v) {
//check if all the input params have value, else assign the default value to it
if (!v)
v = default_value; //this is wrong, can't use v, which is ...
This function everytime gives "false", even if image_url exists
// some .each {
var item = $('.item', this);
$.ajax({
url: image_url,
success: function() {
item.html("true");
},
error: function() {
item.html("false");
}
});
// }
Its used to check existance of ...
Hi,
I use h:selectOneRadio tag.
I need to set the cursor focus to first radio field.
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h:form id="focusForm" >
<h:selectOneRadio id="testRadioId" value="">
...
Hi,
I was wondering whether there's a way of using multiple selectors in jQuery and setting different values for them IN ONE CALL.
E.g.:
$(selector1, selector2, selector3, ...).css({left:[532, 112, 453, ...]});
Thanks in advance
Edited: Just to be clear you can only call .css once. Is it possible?
Edited again to clarify: I'm aski...
Hi,
I'm using jqgrid to display a list of sites and I want to do some server side validation when a site is added or edited. (Form editing rather than inline. Validation needs to be server side for various reasons I won't go into.)
I thought the best way would be to check the data via an ajax request when the beforeSubmit event is trig...
I am trying to use the text attribute as a selector, but I can't quite grasp the behaviour, would really appreciate if someone could explain. For example given <span class="span_class"><a class="a_class">text</a></span>, $('a.a_class').text() gives "text" as expected. However $('a.a_class[text]') wouldn't match any elements, and neither ...
I'm writing a jQuery plugin and I would like my code to take advantage of the jQuery UI show(effect, [options], [speed], [callback]) and hide(effect, [options], [speed], [callback]) functions, which allow you to show and hide elements with a nice animation.
However, I'd also like my plugin to degrade gracefully if jQuery UI isn't availa...
Hi, I really need help with this one! this works perfectly in firefox and apart from google chrome not getting the textarea content perfect there too.
What the below code does is simply when a user see's a post that they want to comment on, they simply enter data into the textarea next to the post nd click submit. Once submitted it adds...