Jquery Function Calls More Than One Time?
Jan 13, 2011
I am having an aspx page in which I am calling a user control. The user control I am using a pop up to display it when a user clicks a asp:linkbutton. In that user control I am having a textbox and I am calling a Jquery Blur to do some validation. While doing so the function is calling [blur] is calling twice. I just called an alert() with the textbox value.So I can see the alert is coming twice .What I need to do to avoid the second time. I need to do it only whenever the user going out of the textbox and that also one time.
$('#<%=txtCategory.ClientID %>').blur(function() {
alert($(this).val());
});
View 2 Replies
Similar Messages:
Jan 17, 2011
Is it mandatory to write $(document).ready(function () {... }) every time ?
Can't we do it without this line?
View 6 Replies
Jul 27, 2010
I'm using Telerik RadControls, in my codebehind I have the following function, a portion of which adds buttons to the footer.
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs)
If TypeOf e.Item Is GridDataItem Then
Dim editLink As HyperLink = DirectCast(e.Item.FindControl("EditLink"), HyperLink)
editLink.Attributes("href") = "#"
editLink.Attributes("onclick") = [String].Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("ID"), e.Item.ItemIndex)
End If
''Add buttons to footer of grid
If TypeOf e.Item Is GridFooterItem Then
Dim footerItem As GridFooterItem = e.Item
''Creat Ticket button
Dim btn1 As New Button()..........................
View 2 Replies
Jan 28, 2011
I have create a table and create edmx file, and I create a Stored Procedure that return a single row (select by primary key), and I want the edmx to have a function that calls that SP and return a type.
View 1 Replies
Feb 18, 2011
I deployed one webservice which calls function which going take more than 5 -6 hours. I am using this webservice on my asp.net page and I am calling this webservice asynchronously. So how should I increase webservice time out?
View 3 Replies
Jul 19, 2010
If I declare a public variable in my module then publish it out on the server...then have multiple users using the app will the variable get overwritten each time a user calls it?
View 1 Replies
May 12, 2010
Here is a bunch of code from a certain site;
Code:
<script type="text/javascript">
function ShowTime() {
[Code]....
the ShowTime function returns server time or client's time.However, I know that javascript executes in the client side.
View 3 Replies
Jan 7, 2011
I am trying to check how much time does a function takes to execute in my code :
I did this :
void foo()
{
int time = System.DateTime.Now.Millisecond;
// code of my function. do this, that, etc.
Console.WriteLine((System.DateTime.Now.Millisecond-time).ToString());
}
What i get is this :
-247
I don't understand why minus ?? & If pro-filer is an option then recommend me some simple option.
Note : Here I have shown a console app but in practice i need for a Web App in ASP.NET which may be n-tier architecture also.
View 5 Replies
Jun 22, 2010
what is the correct way to pass data through the AJAX calls and have it be model-binded into an object inside my Controller Action?
So far, I've read in some places that jQuery sends data in key-value pairs, so I don't have to do anything extra, while in other places, I've read that I have to first use a JSON deserializer and then bind the result. I've currently implemented my Controller Actions as ones that accept HTTP POST.
View 2 Replies
May 3, 2010
Old school coders are used to having every server control create events in the .cs files.. for example.. Getting the Initial load of data, Saving Data, Deleting data... and then binding datasources to the server control..
New school coders want to do it in Jquery + AJAX calls to .svc files... That gives automatic no post backs so that is a advantage... and I think its a different way of thinking.. All of a sudden the UI related events are all being done in Jquery..
What is the most modern and efficient way to go ? How can I convince the old school coders to let us you this new paradigm ? (assuming it is the better way)
View 3 Replies
Sep 21, 2010
I am working on web application in which all of the data I am submitting back to the server is being done on the client side using JQuery AJAX calls to my .NET web services using JSON. This works perfectly to enhance my user experience and greatly reduces post backs, etc.What I am looking for suggestions on is securing the web services being exposed to the client side from being used by anything but my JQuery code on my site. The security hole that I see here is that since the client-side JQuery can access the web services, so could anything.
View 2 Replies
Nov 14, 2010
How do I go about making true ajax requests to an asp.net page? (Not update panels). I read this tutorial but couldn't get it working. Is there a better approach? Or should this work?
[URL]
View 2 Replies
Nov 19, 2010
I am trying to make 2 separate AJAX calls using buttons. What I want to happen is: when Button1 is clicked ProductsTable shows data from the webservice; when Button2 is clicked OthersTable shows its own data from the webservice. But right now, when either button is clicked, nothing shows up. I know the code works if there's only one of them and it's not wrapped around a .click function.
No error messages. ASP.NET 4.0, JQuery 1.4.4. Not using ScriptManager. Not using UpdatePanels.
Code below:
[Code]....
View 3 Replies
Sep 3, 2010
I got a problem in my Asp.net application.When I try to save some data, I check if the data is right, When not I call a jquery dialog with the error message. But when my jquery dialog appears, my background form dissapears.and I get a javascript error: "html parsing error unable to modify the parent container element before the child element is closed".This is my jquery dialog call in codebehind:
string script = "openDialog('" + text + "', '" + title + "');";
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "open", script, true);
function openDialog(text, title) {
ar $dialog = $('<div></div>')
.html(text)
[code]...
View 1 Replies
Sep 24, 2010
I have been moving my application to be more AJAX-based. Currently I have a web service call where I use jQuery to gather some textbox (string) and checkbox (boolean) results and pass it to a web service. Everything works really well, the response time is super quick. The only downside that I can see to this is
1) you need to use jQuery, which will add to the user's download time - this doesn't really affect my application too much because I am using jQuery throughout the site
2) users can see the code and potentially try to hack the web service because they know where it is
I am most concerned with #2. I've been reading a lot about .NET web service calls, using IAsyncResult,
http://msdn.microsoft.com/en-us/library/2e08f6yc.aspx, and I am beginning to understand the 4 methods available in this article. However, is there extra bloat using this way compared to the jQuery web service call?If there isn't that much bloat or lag time using this method, I'd like to convert my application. Which one of these 4 methods is best in a scenario where I am just returning a small string value? The 4 methods in the article are to wait for EndInvoke itself, which from what I read is not recommended because this may block the first thread; and this should not be used on a service that affects the UI.Create a WaitHandle to wait for the 'OK' before EndInvoke is called Poll the IAsyncResult for .IsCompleted, using sleep() and a Do While until IAsyncResult.IsCompleted is true, then call EndInvoke Pass a delegate function to BeginInvoke to be called once the operation is complete.
View 1 Replies
May 7, 2015
$.ajax({
type: "POST",
url: "./InActiveMerchantList.aspx/LoadStakchart",
[Code]....
View 1 Replies
Jun 6, 2010
I have a WCF service returning JSON to jQuery ajax calls and presenting the results on an ASPX page. When the page is NOT under SSL, the ajax calls work perfectly. When the page IS under SSL, the calls fail. I understand that this behavior must be due to the Same Origin Policy (SOP).
So, how do I setup my WCF service to accept calls from an SSL-secured page? Does the WCF service also need to be secured? If so, how do I do this?
View 3 Replies
Mar 1, 2010
I have noticed that in Google web reader (that lets us read RSS feeds on the web), the page does not seem to load ALL the feeds. Instead, as I scroll down, I can see more and more feeds (and the size of the scrollbar increases if you know what i mean)
I assume they do this by finding the position of the scrollbar and do an AJAX call. Is this correct? How would I do this in ASP.NET?
View 3 Replies
Feb 17, 2010
I have the following Page_Load function...
protected void Page_Load(object sender, EventArgs e)
{
XmlDataSource1.Data = GetXmlFromFile(Request.QueryString["file"]);
XmlDataSource1.DataBind();
Repeater1.DataBind();
}
The page in which this Page_Load resides is called by a parent page. Each time this Page_Load gets called the value of "file" in the query string will be different. So each time I will be receiving the XML contents from a different file which are inserted into the XmlDataSource and then bound against by the Repeater. Getting the XML data from the file works great but when I bind against the repeater that only works the first time through Page_Load. Each time after that when this code is executed the same results from the first XML file are displayed in the repeater.
What am I missing here. How can I get the XML data to be bound against the repeater on each page load instead of just the first one?
View 3 Replies
May 10, 2010
I have a webservice (ASP.NET) deployed on a webfarm. A client application consumes it on daily basis. The problem is that some of its calls are duplicated (with difference of milliseconds). For example I have a function Foo(string a,string b). The client app calls this webmethod as Foo('test1','test2') once but my log shows that it is being called twice or sometimes 3 or 4 times randomly. Is this anything wrong with the webfarm or the code? Note that the webmethod has simple straighfarward insert and update statements.
View 1 Replies
May 27, 2010
I have a gridview control with delete asp:ImageButton for each row of the grid. What I would like is for a jquery dialog to pop up when a user clicks the delete button to ask if they are sure they want to delete it.
So far I have the dialog coming up just fine, Ive got buttons on that dialog and I can make the buttons call server side methods but its getting the dialog to know the ID of the row that the user has selected and then passing that to the server side code. The button in the page row is currently just an 'a' tag with the id 'dialog_link'. The jquery on the page looks like this:
$("button").button();
$("#DeleteButton").click(function () {
$.ajax({
[code]...
The dialog itself is just a set of 'div' tags. Ive thought of lots of different ways of doing this (parameter passing, session variable etc...) but cant figure out how to get any of them working.Any ideas are most welcome
View 1 Replies
Oct 13, 2010
I have a problem I am using a date picker ... jdpicker and I also tried with UI DatePicker and I keep getting this error "..." is not a function even though intellisense detects the function.My code is as simple as using the default options such as
$('#txtDate').jdPicker()
or
$('#txtDate').datePicker()
View 3 Replies
Sep 20, 2010
I have aspx page and in that page i registerd ascx page. i want to access the aspx page <div id = "idofdiv"> from ascx page jquery function. i have jquery function in ascx page. i want to access idofdiv in that function.
View 2 Replies
Dec 21, 2010
In my master.page I load a Web form:
<script type="text/jscript">$("#LoginInformation").load("LoginInformation.aspx");</script>
But when I have a ListView or DataView, etc... with a pager, I get problems when I click on 'next page'.Then I get the error: Validation of viewstate MAC failed. When I don't use Jquery's load function, I don't get an error.
View 6 Replies
Jan 17, 2011
How can I trigger a jQuery function with the Gridview Select button?
I want that the select button trigger the jquery function that has the row details (it's already working with a asp:buttonfield ), and select the row so i can get the values and send it trough e-mail with another button. I don't know if this is possible.
Can I trigger the jQuery function from code behind with the select button Sub? How?
View 3 Replies