Belong to this article Jquery Partial View
What should i do when i want to submit the value fill from user
and sent it to the ActionResult controller that return the partial view
-- View Code that call the controller (from article)
<script language="JavaScript" type="text/javascript">
$('#centerbody').load('/Custom/CustomAction', function(html) {
$('#centerbody')[0].value = html;
});
</script>
-- Controller Action with no parameter (from article)
public ActionResult CustomAction()
{
return View("_CustomParialView");
}
Thanks for your suggestion
I am using the jQuery UI sortable plugin and I am trying to get 2 alerts
I want the staring position of the element and the finished position of the element.
$(function() {
$("#filterlist ul").sortable({ opacity: 0.6, cursor: 'move', update: function(event, ui) {
alert(ui.item.prevAll().length + 1);
}
});
});
I can get the position of the item after it has been dragged by using:-
ui.item.prevAll().length + 1
What do I use to get the position it started from?
Hallo all.
I got a javascript object with some propeties let's say
function Animal() {
this.id;
this.name;
I need to call id function in a dynamic way to get and set its value: something like this
Animal animal = new Animal();
var propertyName = "id";
animal.+propertyName = "name";
Is there an elegant way to do it? With jQuery?
Kind regards
Massimo
I am working on a site http://tapasya.co.in where i just impemented mootools slideshow.
But I noticed that menubar that i was using stopped working, it was supposed to drop horizontaly but it is not being displayed now. I have used jquery for it. Please see the source of the web page. What can be the problem ? Mootools conflicting with javascript or some other problem
Hi,
I am having the text box and when the text box gets focused then the div should visible at the end of the textbox in jquery
For example :
Username:textbox focused and div should visible at the end of the textbox
ASAP give me the solution,
Thanks in Advance,
Vara Prasad.M
I am using jquery corners javascript library to make the corners of a div rounded. It works fine, But if i specify a body background image/color or grident background color, corners are still white. How can i make these corners transparent?
Hi All,
I am using jquery cycle and jCarouselLite plugin to display images as slide. Images are getting displayed in ie7. but working perfect in ie6.
Code:
$('#slide').cycle({
fx: 'fade',
continuous: true,
speed: 7500,
timeout: 55000,
sync: 1
});
Geetha.
Hello,
Is this the notation to use for Not Equal To in JS, in jquery code
!== OR !=
None of them work
Here is the code I am using
var val = $('#xxx').val();
if (val!='') {
alert("jello");
}
Thanks
Jean
I have a large application and I'm going to enabling short-cut key for it. I'd find 2 JQuery plug-ins (demo plug-in 1 - Demo plug-in 2) that do this for me. you can find both of them in this post in StackOverFlow
My application is a completed one and I'm goining to add some functionality to it so I don't want towrite code again.
So as a short-cut is just catching a key combination, I'm wonder how can I call the server methods which a short-cut key should fire?
So How to use either of these plug-ins, by just calling the methods I'd written before?
Actually How to fire Server methods with Jquery?
You can also find a good article here, by Dave Ward
Update: here is the scenario. When User press CTRL+Del the GridView1_OnDeleteCommand so I have this
protected void grdDocumentRows_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
try
{
DeleteRow(grdDocumentRows.DataKeys[e.Item.ItemIndex].ToString());
clearControls();
cmdSaveTrans.Text = Hajloo.Portal.Common.Constants.Accounting.Documents.InsertClickText;
btnDelete.Visible = false;
grdDocumentRows.EditItemIndex = -1;
BindGrid();
}
catch (Exception ex)
{
Page.AddMessage(GetLocalResourceObject("AProblemAccuredTryAgain").ToString(), MessageControl.TypeEnum.Error);
}
}
private void BindGrid()
{
RefreshPage();
grdDocumentRows.DataSource = ((DataSet)Session[Hajloo.Portal.Common.Constants.Accounting.Session.AccDocument]).Tables[AccDocument.TRANSACTIONS_TABLE];
grdDocumentRows.DataBind();
}
private void RefreshPage()
{
Creditors = (decimal)((AccDocument)Session[Hajloo.Portal.Common.Constants.Accounting.Session.AccDocument]).Tables[AccDocument.ACCDOCUMENT_TABLE].Rows[0][AccDocument.ACCDOCUMENT_CREDITORS_SUM_FIELD];
Debtors = (decimal)((AccDocument)Session[Hajloo.Portal.Common.Constants.Accounting.Session.AccDocument]).Tables[AccDocument.ACCDOCUMENT_TABLE].Rows[0][AccDocument.ACCDOCUMENT_DEBTORS_SUM_FIELD];
if ((Creditors - Debtors) != 0)
labBalance.InnerText = GetLocalResourceObject("Differentiate").ToString() + "?" + (Creditors - Debtors).ToString(Hajloo.Portal.Common.Constants.Common.Documents.CF) + "?";
else
labBalance.InnerText = GetLocalResourceObject("Balance").ToString();
lblSumDebit.Text = Debtors.ToString(Hajloo.Portal.Common.Constants.Common.Documents.CF);
lblSumCredit.Text = Creditors.ToString(Hajloo.Portal.Common.Constants.Common.Documents.CF);
if (grdDocumentRows.EditItemIndex == -1)
clearControls();
}
Th other scenario are the same. How to enable short-cut for these kind of code (using session , NHibernate, etc)
Hi,
When I set my jQuery dialog to model=true, it disables my form elements inside the dialog and I cannot use them, only the buttons.
I have seen examples where the contents of the dialog is declared in the dialog initiation script and then injected. but that is just to bulky for me, I want to be able to create my markup inside the DIV which I turn into a dialog.
Anyone got a solution for me?
I'm trying to adjust a jquery script to my needs and encountered the following lines-
arguments.callee.eabad1be5eed94cb0232f71c2e5ce5 = function() {
_c3();
_c4();
return;
};
what is it?
So I have a script which returns a price for a product. However the price may or may not include trailing zeros so sometimes I might have:
258.22
and other times I might have
258.2
In the later case I need to add the trailing zero with jQuery. How would I go about doing this?
Okay, I am trying (poorly) to successfully make a JSONP call from jQuery on a test page to a WCF web service running locally, as a cross-domain call. I have, at one point or another, either gotten a 1012 URI denied error, gotten a response but in Xml, or just had no response at all. Currently, the way I have it configured it spits back a 1012.
I did not write this web service, so it is entirely possible that I am just missing a configuration setting somewhere, but I've become so frustrated with it that I think just asking on here will be more productive. Thanks guys. Details below.
I have a WCF web service with the following method:
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public decimal GetOrderStatusJson(int jobId)
I am trying to call this method from a jQuery test page, via a cross-domain JSONP call.
<script type="text/javascript">
getJsonAjaxObject(
"http://localhost:3960/ProcessRequests.svc/json/GetOrderStatusJson",
{ "jobId": 232 });
function getJsonAjaxObject(webServiceUrl, jsonData) {
var request = {
type: "POST",
contentType: "application/json; charset=utf-8",
url: webServiceUrl,
data: jsonData,
dataType: "jsonp",
success: function(msg) {
//success!
alert("blah");
},
error: function() {
//oh nos
alert("bad blah");
}
};
$.ajax(request);
}
</script>
Below are the chunks of the web.config I configure for this purpose:
<services>
<service behaviorConfiguration="MWProcessRequestWCF.ProcessRequestsBehavior"
name="MWProcessRequestWCF.ProcessRequests">
<endpoint address="json" behaviorConfiguration="AspNetAjaxBehavior"
binding="webHttpBinding" contract="MWProcessRequestWCF.IProcessRequests" />
<endpoint address="" binding="wsHttpBinding" contract="MWProcessRequestWCF.IProcessRequests">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MWProcessRequestWCF.ProcessRequestsBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="AspNetAjaxBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
</behaviors>
I'm in the midst of writing a slideShow app (click a button, and you slide through a list of images) for jQuery, but I've run into a little bug where it will respond to the click() request even while an animation is happening. I'm using the animate() function already, so that isn't staving off the additional animation requests.
Any way to program around this?
simply i'm doing a test
i have a div called test and mvc action in the client controler
the view
and the controler
public string testout()
{
return DateTime.Now.ToString();
}
and i'm using jquery to update the div
$("#B1").live("click", function() {
$("#test").load("/client/testout");
return false;
});
first time a click the bottun i see the date and time in the div test second time i click the botton nothing changed
I'm using the jQuery validation plugin to validate a form, and I'd like to remove the validation and submit the form if a certain link is clicked.
I am submitting form with javascript like jQuery('form#listing').submit(), so I must remove the validation rules/function with javascript.
The problem is that I can't figure out how to do this. I've tried things like jQuery('form#listing').validate({}); and jQuery('form#listing').validate = null, but with no luck.
is there anyway to theme an html table (css) with using the jquery css themes ? all of my components look like they belong together except for my html table which look different.
I am having problems with the Jquery qtip plugin.
It works fine in Firefox (see here http://movieo.no-ip.org/ hover over the first image).
But doesn't work in IE. This is the code:
$('.moviebox').each(function() {
$(this).qtip({
content: $(this).children('.info'),
show: 'mouseover',
hide: 'mouseout',
style: { name: 'light' },
position: {
corner: {
target: 'rightbottom',
tooltip: 'bottomleft'
}
}
});
});
And the html
<!--start moviebox-->
<div class="moviebox">
<a href="#">
<img src="http://1.bp.blogspot.com/_mySxtRcQIag/S6deHcoChaI/AAAAAAAAObc/Z1Xg3aB_wkU/s200/rising_sun.jpg" />
</a>
<!--start infobox-->
<div class="info">
<span>Rising Sun (2006)</span>
<div class="description"><strong>Description:</strong><br /> test test test test test test test test test test test test test test test test</div>
<img src="http://1.bp.blogspot.com/_mySxtRcQIag/S6deHcoChaI/AAAAAAAAObc/Z1Xg3aB_wkU/s200/rising_sun.jpg" />
<div class="cast"><strong>Cast:</strong><br /> Sean connery</div>
<div class="rating"><strong>Rating:</strong><br />5stars</div>
</div>
<!--end infobox-->
</div>
<!--end moviebox-->
Why wouldn't that work in IE????? Beats me. Checkout movieo.no-ip.org for the whole source
I just want to use javescript /jquery to determine if and xml file exsists
I don't need to process it I just need to know that its available or not.
can seem to find simple check.
thanks
Hi,
I have a website that changes his inputs ids, and I'm trying to make a semi auto-login, filling automatically the email and the password part...
I'm doing this with greasemonkey and jQuery...
I'm trying something like this
$("input[@type=text]").setValue("[email protected]");
but had no success...
The Page has only the login part, two text type inputs...
What am I missing here?