From what I've seen ModelState.IsValid is only calculated by the MVC frame work on a full postback, is that true?
I have a jquery postback like so:
var url = "/path/to/controller/myaction";
var id = $("#Id").val();
var somedata = $("#somedata").val(); // repeated for every textbox
$.post(url, { id: id, somedata: somedata },
function (...
I want to make an "Open File" button to import txt files contents into a textarea.
How can I read the file contents without uploading it to the server?
I want to use javascript (with jquery lib) and I want to do it without refreshing the page.
...
I need to reload the current tab in jquery ui (loaded with ajax).
I'm doing this:
function reloadtab(){
$('#tabs').tabs('load', $('#tabs').tabs('option', 'selected'));
}
Before you begin wondering:
$('#tabs').tabs('option', 'selected');
returns 3.
When I call reloadtab() I get no error, it simply doesn't work.
Why does th...
Must be really dumb today - sorry in advance; anyhow have this unordered list
<ul>
<li><div class="openuserform" >Info</div> <div class="userform"></div></li>
<li><div class="openuserform" >Appearence</div> <div class="userform"></div></li>
<li><div class="openuserform" >Pages</div> <div class="userform"></div></li>
<li><div class="open...
Hi,
I'm trying to have a comment input field that will show the submit button on a dynamically created form when you click on the input field.
Similar to how facebook comments work. When you click on the input field the submit button appears and when you click off it disappears.
All the comment input id's are comment_1 etc and the subm...
I created a WebMethod in the code-behind file of my page as such:
[System.Web.Services.WebMethod()]
public static string Test()
{
return "TEST";
}
I created the following HTML page to test it out:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"/></script...
I am using jquery with asp.net mvc.... Is my data option valid or am i missing some thing...
$.ajax({
type:"POST",
url: "Materials/GetRecords",
data: "{'currentPage':1,'pageSize':5}",
Any suggestion....
EDIT:
I am calling a function from a view page,
<asp:Content ID="Content2" ContentPlaceHolderI...
I user jquery.ajax call to controller of asp.net mvc... I would like to show a loading indicator.. I tried this but that doesn't seem to work...
<div class="loading" style="padding-left:5px; margin-bottom:5px;display:none;">
Loading... 
</div>
and my jquery ajax call looks like this,
function getMaterials(currentPage) {
...
Hi, I have a problem where if a form submission (set up to submit via AJAX) fails validation, the next time the form is submitted, it doubles the number of post requests - which is definitely not what I want to happen. I'm using the jQuery ValidationEngine plugin to submit forms and bind validation messages to my fields. This is my code ...
I'm trying to bind Fancy box links so that when the new links are created it will still work. I've seen a few other question on here but not really answered. This is what I'm trying to do.
jQuery("a#[id^='domore_']").fancybox({
'autoDimensions' : false,
'width' : 'auto',
'height' : 'auto'
});
This works fine but whe...
Scenario: I am using jQuery to lazy load some html and change the relative href attributes of all the anchors to absolute links.
The loading function adds the html in all browsers.
The url rewrite function works on the original DOM in all browsers.
But
In IE7, IE8 I can't run that same function on the new lazy loaded html in the DOM...
Hello,
I think this is a simple one.
I have a Codeigniter function which takes the inputs from a form and inserts them into a database. I want to Ajaxify the process. At the moment the first line of the function gets the id field from the form - I need to change this to get the id field from the Ajax post (which references a hidden ...
I have a webpage with two radiobuttons and a dropdownlist as follows:
<div class="sectionheader">Course
<div class="dropdown"><%=Html.DropDownList("CourseSelection", Model.CourseList, new { @class = "dropdown" })%> </div>
<div class="radiobuttons"><label><%=Html.RadioButton("CourseType", "Advanced", false )%> Advanced <...
Hi All,
Is it possible to have 2 ajax forms on the same page? If so, is it common?
Just curious,
rodchar
...
Hi All,
Is it possible to post, say like a value in a textbox, to 2 different ajax forms that are on the same page? It doesn't have to be at the same time?
What I'm trying to do is this: I have a search page that searches for customers and displays them on a paged grid. Users can specify up to 5 parameters (5 textboxes) to narrow the s...
$.ajax({
type: 'GET',
url: "string.txt",
cache: false,
success: function(str){
alert("Data is: "+ str);
}
});
In this example, string.txt is sent to the cache (\Temporary Internet Files)
How do I ensure that the file is not sent. I do not want copy to be sent.
Only a read from the server. Am I missing an option?
...
Hi All,
I'm using jquery's $.post and was wondering if I can use this to get a FileResult back? Not having any success yet? The content is coming back in the callback but not as a file download?
Thanks,
rodchar
...
I have two blocks of text
Text Block 1 - Currently displayed on the page:
"Ahd Hd ahaSdjdajs dadjs jasd adskadskl1lksad klasd klasd dsa Ahd Hd ahaSdjdajs dadjs jasd adskadskl1lksad klasd klasd dsa Ahd Hd ahaSdjdajs dadjs jasd adskadskl1lksad klasd klasd dsa Ahd Hd ahaSdjdajs dadjs jasd adskadskl1lksad klasd klasd dsa"
But now Block 1 o...
to show my problem in a couple examples...
THIS WORKS
$.post("SomePage.aspx", { name : "value" },
function (data) {
alert(data);
}, "text");
THIS DOESN'T WORK
$.post("SomePage.aspx", { name : "value" },
function (data) {
window.open("http://www.google.com");
}, "text");
In the ...
OK, not entirely related to programming, so I'm sorry. But I'd like to know about this:
So I've got a webapp. There's one column where a list of results are fetched from the database. When you click one, jQuery fetches the information associated with that result and puts it into the second column - all without a refresh and using Ajax.
...