I am using ASP.NET MVC for developing a web site. I am using jquery for AJAX functionality. In the action methods, I want to return some error to signal that the input is not correct or that the action could not be performed. In such error cases, I expect the jquery ajax error handler to be called and I can take appropriate action in the...
I'm still figuring out a few of the finer points around unit testing my ASP.Net MVC2 application using NUnit.
On the whole, testing my ActionResults, models, respositories and the like is straight-forward, but I've not had to test Ajax methods before and I'd like some guidance on how I should best go about it.
Thanks in advance.
...
Hello,
I want to increment the value of i . The "for" loop does not work.
$("a[href$='.xls']").appendTo(".xl1").attr('id','xl'+i);
I search all excel files and places them in a container and increment the value of their id.
Thanks
Jean
...
Once again I am faced with a great problem! :)
So, here is the stuff:
on the client side, I have a link. By clicking on it, jQuery makes a request to
the server, gets response as HTML content, then popups UI dialog with that content.
Here is the code of the request-function:
function preview(){
$.ajax({
url: "/api/builder...
I am dealing with some generated spans and I would like to find which one of them does not contain any text.
The markup is:
<span id="layer6">
<span class="drag col"> Some text</span>
<span class="drag col"> More text</span>
<span class="drag col"> </span>
<span class="drag col"> I also have text</span>
</span>
I ...
I am trying to use the iPod drilldown menu from the filamentgroup as a widget.
http://www.filamentgroup.com/lab/jquery_ipod_style_and_flyout_menus/
They have I designed as a dropdown menu.
But I actually need only the iPod drilldown menu part. As a "filemanageing widget".
How can this be made possible?
...
Hello,
I have div in which I have added 5 files, using appendTo, Now I want to get the src of all these files. How do I go about getting it using jQuery. can I use .get()?
Thanks
Jean
[edit]
<div id="some">
<img src="jquery_book.jpg"><a href="jquery.pdf">JQuery Book</a>
</div>
I need src and href.
...
Hi All,
I have a requirement to supply values from 2 select boxes to an Action Method. I'd like to know if there's a way to automatically extract all of the attributes from the selected options from each select box into a data object that I can pass to the server with my $.get?
Ideally, I could use a function like this:
http://plugin...
I have an input field where the user enters an id#. I am using Ajax to check the database for that user's id# and afterwards populate the other input fields with that person's information from the database.
I am trying to run a series of validation statements after the information is inserted via Ajax into the input fields, but I can't ...
CAn anyone tell me is it is possible to display the files in computer using a tree view in php? It should be fast enough to display either in jQuery or anyother method that gives speed.
...
Ok, I'm making a couple of JQuery versions of the AJAXToolkit controls (we were having issues with the toolkit), and want to have a common version of the scripts they require on the page.
To do this, I was intending to have a JQueryControlManager control, and use it to insert scripts dynamically, preferably only scripts that are needed ...
Hi,
I am trying to filter/search a database with ajax
$.ajax({
type: "POST",
url: "filterSearch.php",
queryString: qry,
success: function(data){
alert( "Data Saved: " + data );
$('#searchResult').html(data); // Fill the search results box
}
});
Now in filterSearch.php i have the following test codes
if(iss...
This is CSS that I'm using on this href:
a.menu:link, a.menu:visited
{
width:160px; border-bottom:1px solid #CCC; float:left;
font-family:Tahoma, Arial, Helvetica, sans-serif;
font-size:12px; background-color: #FFF;
height:21px; display:block; text-decoration:none; color:#999999;
padding:5px 0px 0px 10px
}
a.menu:ho...
This question is related to the this.
I'm using the following to extract the attributes & values from the select elements on my page:
var valuesArray = $("select").map(function()
{
return $.getAttributes($(this).find(":selected"));
});
var arr = new Array();
$.each(valuesArray, function()
{
arr.push($(this)[0]); // this filter...
I have the following nav:
<div id="nav">
<div id="subnav">
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
</div>
</div>
The following jQuery:
$('#subNav:not(:has(a))').css('background','none');
So #subNav's background is 'none' when its empty.
I also want to set $nav background to 'none' at this point, some kind of and?...
Hi,
I am using jquery to disable validation controls in aspx page on load and than on button press I want to enable them. I have coded the below mentioned script for this. but there is an issue. Both functions (enabling and disabling validation controls) are fired on page load.
Please guide me on this.
thanks
<script type="text/javas...
I've got a JQGrid that needs to scroll. It works fine in Firefox, but in IE6, the grid stays stationary while the rest of the content scrolls underneath it.
What might be a complicating factor is that the grid is inside tabs, inside a dialog.
I've googled all over the place, but I can't find a solution for this problem, so I turn to St...
I'm using the jQuery dataTables plugin to upgrade HTML tables.
The 1st column of the dataTable contains the row's primary key and is hidden. The only way I could succesfully accomplish this was to add either the CSS style "display: none;" or "visibility: collapsed;"
When the table is upgraded to a dataTable, the "aoColumns" for the 1st...
In the below code:
var id=obj.setid({{info}});
I get an error saying illegal character and {{info}} has the following string:
"Website® is registered "
How do I handle this error in javascript?
Thanks..
Edit:
setid looks like this
setid: function (id)
{
var obj = $(this) ;
...
hello,
plz guide me how I can enable or disable asp.net validation controls using jQuery from client side. It is required to do so that valdiations can be done on button press.
thanks
...