Hi all,
I'm posting the following to an asp.net [Webmethod] using jquery via the $.ajax method. I've trapped the data being sent over the wire.
{number:01502,numberTypeId:2,companyId:531}
I've break pointed inside the [Webmethod] and the number is being returned as 1502 even though the parameter type is string, I'm guessing this has s...
I know how to get elements with a particular attribute:
$("#para [attr_all]")
But how can I get the elements WITHOUT a particular attribute?
I try
$("#para :not([attr_all])")
But it doesn't work.
What is the correct way to do this?
Let me give an example.
$("#para [optional]") <--- give me the fname elem...
I found the following code somewhere, but I am not understanding the code properly.
ArticleVote.submitVote('no');return false;
Is ArticleVote a class and submitVote() a function of that class?
Or what does the above code mean? And is there any concept of classes and objects in jQuery or in traditional JavaScript? How to create them?...
How to I hide and show HTML elements using JQuery without any special effects?
...
Hi,
I am using Cakephp and JQuery in my application.
I have created the form using
<?php
echo $form->create('Result',array('action'=>"submit/$formid"));
foreach ($viewfields as $r):
echo $form->input($r['Attribute']['label'], array('id'=>$r['Attribute']['id'],'name'=>$r['Attribute']['label'],'type'=>'text'));
endforeach;
e...
I am using a Jquery time delayed fader like below, but need to reinitialize it based upon events in the code, ie knock the timer back to zero. How do I do this? I've tried just calling fader() again.
function fader(){
$(ajdiv).delay(10000, function(){$(ajdiv).fadeOut()});
}
jQuery.fn.delay = function(time,func){ //run a delayed funct...
Hi friends,
I have created a page, in that - after loading a content the jquery is not working properly.
Problem :
Initially i have a div "content" which having some text
by clicking a button some content will load into the div "content" from div "temp" using $("#content").html($("#temp").html())
After loading this content the functi...
I have the following code, the elements are added to the page, but unusually the click event never fires. Any ideas?
function ToggleData(e){
var parentRow = $(this).parent().parent();
var rowData = $(':nth-child(2)',parentRow);
var html = $("<input type='text' id='amendedval' value='" + $.trim(rowData.text()) +"'/>");
//Add the upda...
Does anyone have the special sauce for following a jQuery Form ajax post to a controller method forcing a refresh to a PartialView existing on the same page? Does that involve bringing partial HTML back and appending or can I simply somehow cause that PartialView to refresh magically?
Thanks in advance.
Doug
Here is my RenderPartial w...
I have a case where i want to submit a form and get the response from this submit, because based on this response "at least submit complete response" i will make some other logic.
What makes my case is different that this form is on a domain and i am submitting it to another domain name so can't use ajax submit due to cross script secur...
I was wondering if there is a JavaScript based HTML Form builder, similar to what you can do with Zend_Form_Html or with the ExtJS Forms but based on JQuery?
There are several form related plugins but you still have to code every form manually. The idea is, that I usually only want to edit/add single entities from my Domain Model (e.g. i...
I have been trying to find out why the following lines of code do not work:
$('#add-cloud > select').change(function() {
var selected = parseInt($('#add-cloud select option:selected').val());
$("#cloud-calculator table tr:eq(selected)").css("color", "red");
});
If I change :eq(selected) to :eq(4) for example - works fine. How do...
Hi,
I'm building a basic forum where each post contains a name, a message and a date.
The forum is written in PHP and updates with AJAX to load new posts on the fly.
When new posts come in, I would like the old posts to ease down nicely (much like facebook does today when you have new updates) and to make room for the new posts.
Can any...
Is there any way to remove the submitHandler or invalidHandler once they are set? If I submit my form and cancel out of my confirmation modal window, my other buttons are inheriting those handlers and not doing what they are suppose to do.
I've tried unbinding the form submit at various places. As well as trying to redefine the validat...
Hello, I have a HTML table like this:
<table border="1">
<tbody>
<tr>
<td><a href="#" class="delete">DELETE ROW</a>COL 1</td>
<td><a href="#" class="delete">DELETE COL</a>COL 2</td>
<td><a href="#" class="delete">DELETE COL</a>COL 3</td>
<td><a href="#" class="delete">DELETE CO...
I grabbed this code form JCarousel and just trying to understand these lines below. I'm new to jQuery and not that great at JavaScript so I am not sure what is jQuery and which is JavaScript below
this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent, this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarouse...
var A=function(){
};
$.extend(A.prototype, {
init:function(){
alert('A init');
}
});
var B=function(){
};
$.extend(B.prototype,A.prototype,{
init:function(){
alert('B init');
}
});
var p=new A();
p.init();
var x=new B();
x.init();
is the above the best way to create class and inheritance in jQuery? In B's init how do I invok...
is the following writing images? If so, where is it placing it in the DOM?
for(var j = 0; j < portfolio_itemList[i-1].url.length; j++) {
$('<img>').attr('src', portfolio_itemList[i-1].url[j]);
}
Don't you need to specify a function to tell it to write the image? I am just trying to figure out what that line is d...
the text input only allows three words separated by spaces, and if it exceeds 3, the user can't input anymore, is this possible using jQuery?
I can use keyup event to listen, but how do I stop user from typing in more tokens without using disabled.
This is sort of similar to the native maxlength property for the text input in html except...
I am calling an ASP.NET MVC action
public JsonResult GetPatient(string patientID)
{
...
from JavaScript using jQuery. The following call works
$.getJSON(
'/Services/GetPatient',
{ patientID: "1" },
function(jsonData) {
alert(jsonData);
});
whereas this one does not.
$.ajax({
type: 'POST',
url: '/Services/GetPatient',
data:...